From b14f3ae086a330dee698bce35e9543f9d9c87341 Mon Sep 17 00:00:00 2001 From: Arie Trouw Date: Tue, 16 Jan 2024 19:15:33 -0800 Subject: [PATCH] Module types to interfaces --- .../archivist/packages/model/src/Archivist.ts | 16 +++++-------- .../packages/model/src/ArchivistInstance.ts | 6 +++-- .../bridge/packages/model/src/Bridge.ts | 12 +++++----- .../packages/model/src/Queries/Connect.ts | 9 +++---- .../packages/model/src/Queries/Connected.ts | 7 +++--- .../packages/model/src/Queries/Disconnect.ts | 9 +++---- .../diviner/packages/model/src/Instance.ts | 17 ++++++------- .../diviner/packages/model/src/Module.ts | 10 ++++---- .../model/src/instance/ModuleInstance.ts | 22 ++++++++--------- .../packages/model/src/module/Module.ts | 7 +++--- .../packages/wrapper/src/ModuleWrapper.ts | 2 +- .../packages/node/packages/model/src/Node.ts | 24 +++++++------------ .../sentinel/packages/model/src/Instance.ts | 13 +++++++--- .../sentinel/packages/model/src/Module.ts | 7 +++--- .../packages/model/src/CustomInstance.ts | 4 ++-- .../witness/packages/model/src/Instance.ts | 12 +++++----- .../witness/packages/model/src/Module.ts | 6 ++--- .../src/{Witness.ts => QueryFunctions.ts} | 2 +- .../witness/packages/model/src/index.ts | 2 +- .../payload/packages/address/package.json | 18 +++++++------- packages/payload/packages/config/package.json | 18 +++++++------- packages/payload/packages/domain/package.json | 18 +++++++------- packages/payload/packages/id/package.json | 18 +++++++------- packages/payload/packages/query/package.json | 18 +++++++------- packages/payload/packages/value/package.json | 18 +++++++------- 25 files changed, 146 insertions(+), 149 deletions(-) rename packages/modules/packages/witness/packages/model/src/{Witness.ts => QueryFunctions.ts} (59%) diff --git a/packages/modules/packages/archivist/packages/model/src/Archivist.ts b/packages/modules/packages/archivist/packages/model/src/Archivist.ts index 2eb1d2ecfb0..2ac9abe553a 100644 --- a/packages/modules/packages/archivist/packages/model/src/Archivist.ts +++ b/packages/modules/packages/archivist/packages/model/src/Archivist.ts @@ -27,15 +27,11 @@ export interface Archivist = Archivist< - TReadResponse, - TWriteResponse, - TWrite, - TId -> & - ModuleQueryFunctions - -export type ArchivistModule< +export interface ArchivistQueryFunctions + extends Archivist, + ModuleQueryFunctions {} + +export interface ArchivistModule< TParams extends ModuleParams> = ModuleParams>, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData, -> = Module +> extends Module {} diff --git a/packages/modules/packages/archivist/packages/model/src/ArchivistInstance.ts b/packages/modules/packages/archivist/packages/model/src/ArchivistInstance.ts index 81256799d63..296ce20db8a 100644 --- a/packages/modules/packages/archivist/packages/model/src/ArchivistInstance.ts +++ b/packages/modules/packages/archivist/packages/model/src/ArchivistInstance.ts @@ -3,7 +3,9 @@ import { ModuleInstance } from '@xyo-network/module-model' import { ArchivistModule, ArchivistModuleEventData, ArchivistQueryFunctions } from './Archivist' import { ArchivistParams } from './Params' -export type ArchivistInstance< +export interface ArchivistInstance< TParams extends ArchivistParams = ArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData, -> = ArchivistModule & ArchivistQueryFunctions & ModuleInstance +> extends ArchivistModule, + ArchivistQueryFunctions, + ModuleInstance {} diff --git a/packages/modules/packages/bridge/packages/model/src/Bridge.ts b/packages/modules/packages/bridge/packages/model/src/Bridge.ts index e51b36ebab5..78e4c626247 100644 --- a/packages/modules/packages/bridge/packages/model/src/Bridge.ts +++ b/packages/modules/packages/bridge/packages/model/src/Bridge.ts @@ -22,7 +22,9 @@ export interface Bridge { disconnect: () => Promisable } -export type BridgeParams = AnyConfigSchema> = ModuleParams & ModuleParams +export interface BridgeParams = AnyConfigSchema> + extends ModuleParams, + ModuleParams {} export interface BridgeModule extends ModuleInstance { @@ -44,8 +46,6 @@ export interface BridgeModule } -export type BridgeInstance = BridgeModule< - TParams, - TEventData -> & - Bridge +export interface BridgeInstance + extends BridgeModule, + Bridge {} diff --git a/packages/modules/packages/bridge/packages/model/src/Queries/Connect.ts b/packages/modules/packages/bridge/packages/model/src/Queries/Connect.ts index 5cd01d8c8a1..88a75396394 100644 --- a/packages/modules/packages/bridge/packages/model/src/Queries/Connect.ts +++ b/packages/modules/packages/bridge/packages/model/src/Queries/Connect.ts @@ -3,7 +3,8 @@ import { Query } from '@xyo-network/payload-model' export type BridgeConnectQuerySchema = 'network.xyo.query.bridge.connect' export const BridgeConnectQuerySchema: BridgeConnectQuerySchema = 'network.xyo.query.bridge.connect' -export type BridgeConnectQuery = Query<{ - schema: BridgeConnectQuerySchema - uri?: string -}> +export interface BridgeConnectQuery + extends Query<{ + schema: BridgeConnectQuerySchema + uri?: string + }> {} diff --git a/packages/modules/packages/bridge/packages/model/src/Queries/Connected.ts b/packages/modules/packages/bridge/packages/model/src/Queries/Connected.ts index 1faac4e49c0..96e8bb5dd78 100644 --- a/packages/modules/packages/bridge/packages/model/src/Queries/Connected.ts +++ b/packages/modules/packages/bridge/packages/model/src/Queries/Connected.ts @@ -3,6 +3,7 @@ import { Query } from '@xyo-network/payload-model' export type BridgeConnectedQuerySchema = 'network.xyo.query.bridge.connected' export const BridgeConnectedQuerySchema: BridgeConnectedQuerySchema = 'network.xyo.query.bridge.connected' -export type BridgeConnectedQuery = Query<{ - schema: BridgeConnectedQuerySchema -}> +export interface BridgeConnectedQuery + extends Query<{ + schema: BridgeConnectedQuerySchema + }> {} diff --git a/packages/modules/packages/bridge/packages/model/src/Queries/Disconnect.ts b/packages/modules/packages/bridge/packages/model/src/Queries/Disconnect.ts index 91d6a953a4b..b3f1ba22513 100644 --- a/packages/modules/packages/bridge/packages/model/src/Queries/Disconnect.ts +++ b/packages/modules/packages/bridge/packages/model/src/Queries/Disconnect.ts @@ -3,7 +3,8 @@ import { Query } from '@xyo-network/payload-model' export type BridgeDisconnectQuerySchema = 'network.xyo.query.bridge.disconnect' export const BridgeDisconnectQuerySchema: BridgeDisconnectQuerySchema = 'network.xyo.query.bridge.disconnect' -export type BridgeDisconnectQuery = Query<{ - schema: BridgeDisconnectQuerySchema - uri?: string -}> +export interface BridgeDisconnectQuery + extends Query<{ + schema: BridgeDisconnectQuerySchema + uri?: string + }> {} diff --git a/packages/modules/packages/diviner/packages/model/src/Instance.ts b/packages/modules/packages/diviner/packages/model/src/Instance.ts index 8bd6abe8b22..ee44a712083 100644 --- a/packages/modules/packages/diviner/packages/model/src/Instance.ts +++ b/packages/modules/packages/diviner/packages/model/src/Instance.ts @@ -6,13 +6,12 @@ import { DivinerModuleEventData } from './EventData' import { CustomDivinerModule, DivinerModule } from './Module' import { DivinerParams } from './Params' -export type DivinerInstance< - TParams extends DivinerParams = DivinerParams, - TIn extends Payload = Payload, - TOut extends Payload = Payload, -> = DivinerModule & DivinerQueryFunctions & ModuleInstance +export interface DivinerInstance + extends DivinerModule, + DivinerQueryFunctions, + ModuleInstance>> {} -export type CustomDivinerInstance< +export interface CustomDivinerInstance< TParams extends DivinerParams = DivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, @@ -21,7 +20,9 @@ export type CustomDivinerInstance< TIn, TOut >, -> = CustomDivinerModule & DivinerQueryFunctions & ModuleInstance +> extends CustomDivinerModule, + DivinerQueryFunctions, + ModuleInstance {} /** @deprecated use DivinerInstance instead */ -export type Diviner = DivinerInstance +export interface Diviner extends DivinerInstance {} diff --git a/packages/modules/packages/diviner/packages/model/src/Module.ts b/packages/modules/packages/diviner/packages/model/src/Module.ts index 24d1ac9cc8a..c46a977c443 100644 --- a/packages/modules/packages/diviner/packages/model/src/Module.ts +++ b/packages/modules/packages/diviner/packages/model/src/Module.ts @@ -4,14 +4,12 @@ import { Payload } from '@xyo-network/payload-model' import { DivinerModuleEventData } from './EventData' import { DivinerParams } from './Params' -export type DivinerModule = Module< - TParams, - DivinerModuleEventData> -> +export interface DivinerModule + extends Module>> {} -export type CustomDivinerModule< +export interface CustomDivinerModule< TParams extends DivinerParams = DivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEvents extends DivinerModuleEventData> = DivinerModuleEventData>, -> = Module +> extends Module {} diff --git a/packages/modules/packages/module/packages/model/src/instance/ModuleInstance.ts b/packages/modules/packages/module/packages/model/src/instance/ModuleInstance.ts index e16ce935161..101086ad261 100644 --- a/packages/modules/packages/module/packages/model/src/instance/ModuleInstance.ts +++ b/packages/modules/packages/module/packages/model/src/instance/ModuleInstance.ts @@ -20,19 +20,17 @@ export interface ModuleResolver extends ResolveFunctions { removeResolver: (resolver: ModuleResolver) => this } -export type ModuleInstance = Module< - TParams, - TEventData -> & - ResolveFunctions & - ModuleQueryFunctions & { - /* The resolver is a 'down' resolver. It can resolve the module or any children (if it is a node for example), that are in the module*/ - readonly downResolver: Omit +export interface ModuleInstance + extends Module, + ResolveFunctions, + ModuleQueryFunctions { + /* The resolver is a 'down' resolver. It can resolve the module or any children (if it is a node for example), that are in the module*/ + readonly downResolver: Omit - /* The resolver is a 'up' resolver. It can resolve the parent or any children of the parent*/ - /* This is set by a NodeModule when attaching to the module */ - readonly upResolver: Omit - } + /* The resolver is a 'up' resolver. It can resolve the parent or any children of the parent*/ + /* This is set by a NodeModule when attaching to the module */ + readonly upResolver: Omit +} export type InstanceTypeCheck = TypeCheck diff --git a/packages/modules/packages/module/packages/model/src/module/Module.ts b/packages/modules/packages/module/packages/model/src/module/Module.ts index 6a16b67ac11..68fbd8ffddf 100644 --- a/packages/modules/packages/module/packages/model/src/module/Module.ts +++ b/packages/modules/packages/module/packages/model/src/module/Module.ts @@ -4,7 +4,6 @@ import { ModuleEventData } from '../EventsModels' import { ModuleParams } from '../ModuleParams' import { ModuleFields } from './ModuleFields' -export type Module< - TParams extends ModuleParams = ModuleParams, - TEventData extends ModuleEventData = ModuleEventData, -> = ModuleFields & EventFunctions +export interface Module = ModuleEventData> + extends ModuleFields, + EventFunctions {} diff --git a/packages/modules/packages/module/packages/wrapper/src/ModuleWrapper.ts b/packages/modules/packages/module/packages/wrapper/src/ModuleWrapper.ts index 80676b1b1ab..81abc12952b 100644 --- a/packages/modules/packages/module/packages/wrapper/src/ModuleWrapper.ts +++ b/packages/modules/packages/module/packages/wrapper/src/ModuleWrapper.ts @@ -82,7 +82,7 @@ export function constructableModuleWrapper() { @constructableModuleWrapper() export class ModuleWrapper extends Base & { config: Exclude }, undefined>> - implements ModuleInstance + implements ModuleInstance { static instanceIdentityCheck: InstanceTypeCheck = isModuleInstance static moduleIdentityCheck: ModuleTypeCheck = isModule diff --git a/packages/modules/packages/node/packages/model/src/Node.ts b/packages/modules/packages/node/packages/model/src/Node.ts index 734f9aa9eb1..060c76e3a44 100644 --- a/packages/modules/packages/node/packages/model/src/Node.ts +++ b/packages/modules/packages/node/packages/model/src/Node.ts @@ -1,5 +1,4 @@ import { Promisable } from '@xylabs/promise' -import { ModuleManifestPayload } from '@xyo-network/manifest-model' import { Module, ModuleEventData, ModuleInstance } from '@xyo-network/module-model' import { ModuleAttachedEventData, ModuleDetachedEventData, ModuleRegisteredEventData, ModuleUnregisteredEventData } from './EventsModels' @@ -9,7 +8,6 @@ export interface NodeQueryFunctions { attach(nameOrAddress: string, external?: boolean): Promisable attached(): Promisable detach(nameOrAddress: string): Promisable - manifest(maxDepth?: number): Promise registered(): Promisable } @@ -20,17 +18,13 @@ export interface NodeModuleEventData ModuleUnregisteredEventData, ModuleEventData {} -export type NodeModule = Module< - TParams, - TEventData -> +export interface NodeModule + extends Module {} -export type NodeInstance = NodeModule< - TParams, - TEventData -> & - NodeQueryFunctions & - ModuleInstance & { - register: (mod: ModuleInstance) => Promisable - registeredModules(): Promisable - } +export interface NodeInstance + extends NodeModule, + NodeQueryFunctions, + ModuleInstance { + register: (mod: ModuleInstance) => Promisable + registeredModules(): Promisable +} diff --git a/packages/modules/packages/sentinel/packages/model/src/Instance.ts b/packages/modules/packages/sentinel/packages/model/src/Instance.ts index 9d35e21e1f4..16414dfbb97 100644 --- a/packages/modules/packages/sentinel/packages/model/src/Instance.ts +++ b/packages/modules/packages/sentinel/packages/model/src/Instance.ts @@ -5,9 +5,16 @@ import { CustomSentinelModule, SentinelModule } from './Module' import { SentinelParams } from './Params' import { Sentinel } from './Sentinel' -export type SentinelInstance = SentinelModule & Sentinel & ModuleInstance +export interface SentinelInstance< + TParams extends SentinelParams = SentinelParams, + TEventData extends SentinelModuleEventData = SentinelModuleEventData, +> extends SentinelModule, + Sentinel, + ModuleInstance {} -export type CustomSentinelInstance< +export interface CustomSentinelInstance< TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData> = SentinelModuleEventData>, -> = CustomSentinelModule & Sentinel & SentinelInstance +> extends CustomSentinelModule, + Sentinel, + SentinelInstance {} diff --git a/packages/modules/packages/sentinel/packages/model/src/Module.ts b/packages/modules/packages/sentinel/packages/model/src/Module.ts index e33f1468cfa..c8d29debf60 100644 --- a/packages/modules/packages/sentinel/packages/model/src/Module.ts +++ b/packages/modules/packages/sentinel/packages/model/src/Module.ts @@ -3,9 +3,10 @@ import { Module } from '@xyo-network/module-model' import { SentinelModuleEventData } from './EventData' import { SentinelParams } from './Params' -export type SentinelModule = Module> +export interface SentinelModule + extends Module {} -export type CustomSentinelModule< +export interface CustomSentinelModule< TParams extends SentinelParams = SentinelParams, TEvents extends SentinelModuleEventData> = SentinelModuleEventData>, -> = Module +> extends Module {} diff --git a/packages/modules/packages/witness/packages/model/src/CustomInstance.ts b/packages/modules/packages/witness/packages/model/src/CustomInstance.ts index fbfafff06ba..69ac94149ef 100644 --- a/packages/modules/packages/witness/packages/model/src/CustomInstance.ts +++ b/packages/modules/packages/witness/packages/model/src/CustomInstance.ts @@ -5,7 +5,7 @@ import { CustomWitnessModule } from './CustomModule' import { WitnessModuleEventData } from './EventData' import { WitnessInstance } from './Instance' import { WitnessParams } from './Params' -import { Witness } from './Witness' +import { WitnessQueryFunctions } from './QueryFunctions' export type CustomWitnessInstance< TParams extends WitnessParams = WitnessParams, @@ -16,4 +16,4 @@ export type CustomWitnessInstance< TIn, TOut >, -> = CustomWitnessModule & Witness & ModuleInstance +> = CustomWitnessModule & WitnessQueryFunctions & ModuleInstance diff --git a/packages/modules/packages/witness/packages/model/src/Instance.ts b/packages/modules/packages/witness/packages/model/src/Instance.ts index 6534c2ad237..9bda9b237d6 100644 --- a/packages/modules/packages/witness/packages/model/src/Instance.ts +++ b/packages/modules/packages/witness/packages/model/src/Instance.ts @@ -1,12 +1,12 @@ import { ModuleInstance } from '@xyo-network/module-model' import { Payload } from '@xyo-network/payload-model' +import { WitnessModuleEventData } from './EventData' import { WitnessModule } from './Module' import { WitnessParams } from './Params' -import { Witness } from './Witness' +import { WitnessQueryFunctions } from './QueryFunctions' -export type WitnessInstance< - TParams extends WitnessParams = WitnessParams, - TIn extends Payload = Payload, - TOut extends Payload = Payload, -> = WitnessModule & Witness & ModuleInstance +export interface WitnessInstance + extends WitnessModule, + WitnessQueryFunctions, + ModuleInstance>> {} diff --git a/packages/modules/packages/witness/packages/model/src/Module.ts b/packages/modules/packages/witness/packages/model/src/Module.ts index 9a658034181..a0c873327ec 100644 --- a/packages/modules/packages/witness/packages/model/src/Module.ts +++ b/packages/modules/packages/witness/packages/model/src/Module.ts @@ -4,7 +4,5 @@ import { Payload } from '@xyo-network/payload-model' import { WitnessModuleEventData } from './EventData' import { WitnessParams } from './Params' -export type WitnessModule = Module< - TParams, - WitnessModuleEventData -> +export interface WitnessModule + extends Module>> {} diff --git a/packages/modules/packages/witness/packages/model/src/Witness.ts b/packages/modules/packages/witness/packages/model/src/QueryFunctions.ts similarity index 59% rename from packages/modules/packages/witness/packages/model/src/Witness.ts rename to packages/modules/packages/witness/packages/model/src/QueryFunctions.ts index 0fe3d85f89f..07a64dedb6d 100644 --- a/packages/modules/packages/witness/packages/model/src/Witness.ts +++ b/packages/modules/packages/witness/packages/model/src/QueryFunctions.ts @@ -1,6 +1,6 @@ import { Promisable } from '@xylabs/promise' import { Payload } from '@xyo-network/payload-model' -export interface Witness { +export interface WitnessQueryFunctions { observe: (payloads?: TIn[]) => Promisable } diff --git a/packages/modules/packages/witness/packages/model/src/index.ts b/packages/modules/packages/witness/packages/model/src/index.ts index b42edac51f0..2b554a10ed4 100644 --- a/packages/modules/packages/witness/packages/model/src/index.ts +++ b/packages/modules/packages/witness/packages/model/src/index.ts @@ -7,5 +7,5 @@ export * from './Instance' export * from './Module' export * from './Params' export * from './Queries' +export * from './QueryFunctions' export * from './typeChecks' -export * from './Witness' diff --git a/packages/payload/packages/address/package.json b/packages/payload/packages/address/package.json index 6656a3786a9..bf5b6b85dde 100644 --- a/packages/payload/packages/address/package.json +++ b/packages/payload/packages/address/package.json @@ -19,7 +19,6 @@ "typescript": "^5.3.3" }, "description": "Typescript/Javascript Plugins for XYO Platform", - "docs": "dist/docs.json", "exports": { ".": { "browser": { @@ -34,19 +33,20 @@ }, "node": { "require": { - "types": "./dist/node/index.d.ts", - "default": "./dist/node/index.js" + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" }, "import": { "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.mjs" + "default": "./dist/node/index.js" } } }, "./package.json": "./package.json" }, - "main": "dist/node/index.js", - "module": "dist/node/index.mjs", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", "homepage": "https://xyo.network", "license": "LGPL-3.0-only", "publishConfig": { @@ -57,6 +57,6 @@ "url": "https://github.com/XYOracleNetwork/plugins.git" }, "sideEffects": false, - "types": "dist/node/index.d.ts", - "version": "2.87.0" -} + "version": "2.87.0", + "type": "module" +} \ No newline at end of file diff --git a/packages/payload/packages/config/package.json b/packages/payload/packages/config/package.json index a6cd2efba80..a1d8132fd62 100644 --- a/packages/payload/packages/config/package.json +++ b/packages/payload/packages/config/package.json @@ -20,7 +20,6 @@ "typescript": "^5.3.3" }, "description": "Typescript/Javascript Plugins for XYO Platform", - "docs": "dist/docs.json", "exports": { ".": { "browser": { @@ -35,19 +34,20 @@ }, "node": { "require": { - "types": "./dist/node/index.d.ts", - "default": "./dist/node/index.js" + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" }, "import": { "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.mjs" + "default": "./dist/node/index.js" } } }, "./package.json": "./package.json" }, - "main": "dist/node/index.js", - "module": "dist/node/index.mjs", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", "homepage": "https://xyo.network", "license": "LGPL-3.0-only", "publishConfig": { @@ -58,6 +58,6 @@ "url": "https://github.com/XYOracleNetwork/plugins.git" }, "sideEffects": false, - "types": "dist/node/index.d.ts", - "version": "2.87.0" -} + "version": "2.87.0", + "type": "module" +} \ No newline at end of file diff --git a/packages/payload/packages/domain/package.json b/packages/payload/packages/domain/package.json index fc5c8b797ba..2c8ebe7e6db 100644 --- a/packages/payload/packages/domain/package.json +++ b/packages/payload/packages/domain/package.json @@ -28,7 +28,6 @@ "typescript": "^5.3.3" }, "description": "Typescript/Javascript Plugins for XYO Platform", - "docs": "dist/docs.json", "exports": { ".": { "browser": { @@ -43,19 +42,20 @@ }, "node": { "require": { - "types": "./dist/node/index.d.ts", - "default": "./dist/node/index.js" + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" }, "import": { "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.mjs" + "default": "./dist/node/index.js" } } }, "./package.json": "./package.json" }, - "main": "dist/node/index.js", - "module": "dist/node/index.mjs", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", "homepage": "https://xyo.network", "license": "LGPL-3.0-only", "publishConfig": { @@ -66,6 +66,6 @@ "url": "https://github.com/XYOracleNetwork/plugins.git" }, "sideEffects": false, - "types": "dist/node/index.d.ts", - "version": "2.87.0" -} + "version": "2.87.0", + "type": "module" +} \ No newline at end of file diff --git a/packages/payload/packages/id/package.json b/packages/payload/packages/id/package.json index a2e53f78e20..f7e421931d4 100644 --- a/packages/payload/packages/id/package.json +++ b/packages/payload/packages/id/package.json @@ -19,7 +19,6 @@ "typescript": "^5.3.3" }, "description": "Typescript/Javascript Plugins for XYO Platform", - "docs": "dist/docs.json", "exports": { ".": { "browser": { @@ -34,19 +33,20 @@ }, "node": { "require": { - "types": "./dist/node/index.d.ts", - "default": "./dist/node/index.js" + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" }, "import": { "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.mjs" + "default": "./dist/node/index.js" } } }, "./package.json": "./package.json" }, - "main": "dist/node/index.js", - "module": "dist/node/index.mjs", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", "homepage": "https://xyo.network", "license": "LGPL-3.0-only", "publishConfig": { @@ -57,6 +57,6 @@ "url": "https://github.com/XYOracleNetwork/plugins.git" }, "sideEffects": false, - "types": "dist/node/index.d.ts", - "version": "2.87.0" -} + "version": "2.87.0", + "type": "module" +} \ No newline at end of file diff --git a/packages/payload/packages/query/package.json b/packages/payload/packages/query/package.json index f9882b87da5..76ecd5430ce 100644 --- a/packages/payload/packages/query/package.json +++ b/packages/payload/packages/query/package.json @@ -19,7 +19,6 @@ "typescript": "^5.3.3" }, "description": "Typescript/Javascript Plugins for XYO Platform", - "docs": "dist/docs.json", "exports": { ".": { "browser": { @@ -34,19 +33,20 @@ }, "node": { "require": { - "types": "./dist/node/index.d.ts", - "default": "./dist/node/index.js" + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" }, "import": { "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.mjs" + "default": "./dist/node/index.js" } } }, "./package.json": "./package.json" }, - "main": "dist/node/index.js", - "module": "dist/node/index.mjs", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", "homepage": "https://xyo.network", "license": "LGPL-3.0-only", "publishConfig": { @@ -57,6 +57,6 @@ "url": "https://github.com/XYOracleNetwork/plugins.git" }, "sideEffects": false, - "types": "dist/node/index.d.ts", - "version": "2.87.0" -} + "version": "2.87.0", + "type": "module" +} \ No newline at end of file diff --git a/packages/payload/packages/value/package.json b/packages/payload/packages/value/package.json index 772c9dd19a7..3f76725d458 100644 --- a/packages/payload/packages/value/package.json +++ b/packages/payload/packages/value/package.json @@ -19,7 +19,6 @@ "typescript": "^5.3.3" }, "description": "Typescript/Javascript Plugins for XYO Platform", - "docs": "dist/docs.json", "exports": { ".": { "browser": { @@ -34,19 +33,20 @@ }, "node": { "require": { - "types": "./dist/node/index.d.ts", - "default": "./dist/node/index.js" + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" }, "import": { "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.mjs" + "default": "./dist/node/index.js" } } }, "./package.json": "./package.json" }, - "main": "dist/node/index.js", - "module": "dist/node/index.mjs", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", "homepage": "https://xyo.network", "license": "LGPL-3.0-only", "publishConfig": { @@ -57,6 +57,6 @@ "url": "https://github.com/XYOracleNetwork/plugins.git" }, "sideEffects": false, - "types": "dist/node/index.d.ts", - "version": "2.87.0" -} + "version": "2.87.0", + "type": "module" +} \ No newline at end of file