@xyo-network/bridge-model 3.3.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TypeCheck } from '@xylabs/object';
|
|
2
|
+
import type { ObjectTypeShape } from '@xylabs/typeof';
|
|
2
3
|
import type { AttachableBridgeInstance } from './AttachableInstance.ts';
|
|
3
4
|
export declare const requiredAttachableBridgeInstanceFunctions: ObjectTypeShape;
|
|
4
5
|
export declare const isAttachableBridgeInstance: TypeCheck<AttachableBridgeInstance>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAttachableInstance.d.ts","sourceRoot":"","sources":["../../../src/attachable/isAttachableInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"isAttachableInstance.d.ts","sourceRoot":"","sources":["../../../src/attachable/isAttachableInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAEvE,eAAO,MAAM,yCAAyC,EAAE,eAAoB,CAAA;AAK5E,eAAO,MAAM,0BAA0B,EAAE,SAAS,CAAC,wBAAwB,CAGzE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Connect.ts","../../src/Queries/Disconnect.ts","../../src/Queries/Expose.ts","../../src/Queries/Unexpose.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isAttachableBridgeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableBridgeInstance = AsObjectFactory.create(isAttachableBridgeInstance)\n","import type {
|
|
1
|
+
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Connect.ts","../../src/Queries/Disconnect.ts","../../src/Queries/Expose.ts","../../src/Queries/Unexpose.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isAttachableBridgeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableBridgeInstance = AsObjectFactory.create(isAttachableBridgeInstance)\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { ObjectTypeShape } from '@xylabs/typeof'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isBridgeInstance } from '../typeChecks.ts'\nimport type { AttachableBridgeInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableBridgeInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableBridgeInstance>()\n\nexport const isAttachableBridgeInstance: TypeCheck<AttachableBridgeInstance> = factory.create(requiredAttachableBridgeInstanceFunctions, [\n isBridgeInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/object'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { BridgeInstance } from './Instance.ts'\nimport type { BridgeModule } from './Module.ts'\nimport { BridgeConnectQuerySchema, BridgeDisconnectQuerySchema } from './Queries/index.ts'\n\nexport const isBridgeInstance = new IsInstanceFactory<BridgeInstance>().create(\n { expose: 'function' },\n [isModuleInstance],\n)\nexport const isBridgeModule = new IsModuleFactory<BridgeModule>().create([BridgeConnectQuerySchema, BridgeDisconnectQuerySchema])\n\nexport const asBridgeModule = AsObjectFactory.create(isBridgeModule)\nexport const asBridgeInstance = AsObjectFactory.create(isBridgeInstance)\nexport const withBridgeModule = WithFactory.create(isBridgeModule)\nexport const withBridgeInstance = WithFactory.create(isBridgeInstance)\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport const BridgeConnectQuerySchema = 'network.xyo.query.bridge.connect' as const\nexport type BridgeConnectQuerySchema = typeof BridgeConnectQuerySchema\n\nexport type BridgeConnectQuery = Query<{\n id?: ModuleIdentifier\n maxDepth?: number\n schema: BridgeConnectQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type BridgeDisconnectQuerySchema = 'network.xyo.query.bridge.disconnect'\nexport const BridgeDisconnectQuerySchema: BridgeDisconnectQuerySchema = 'network.xyo.query.bridge.disconnect'\n\nexport type BridgeDisconnectQuery = Query<{\n id?: ModuleIdentifier\n maxDepth?: number\n schema: BridgeDisconnectQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Payload, Query } from '@xyo-network/payload-model'\n\nexport const BridgeExposeQuerySchema = 'network.xyo.query.bridge.expose' as const\nexport type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema\n\nexport interface BridgeExposeOptions {\n maxDepth?: number\n required?: boolean\n}\n\nexport const ModuleFilterPayloadSchema = 'network.xyo.module.filter'\nexport type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema\n\nexport type ModuleFilterPayload = Payload<{ id: ModuleIdentifier } & BridgeExposeOptions, ModuleFilterPayloadSchema>\n\nexport type BridgeExposeQuery = Query<void, BridgeExposeQuerySchema>\n","import type { Query } from '@xyo-network/payload-model'\n\nimport type { BridgeExposeOptions } from './Expose.ts'\n\nexport const BridgeUnexposeQuerySchema = 'network.xyo.query.bridge.unexpose' as const\nexport type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema\n\nexport interface BridgeUnexposeOptions extends BridgeExposeOptions {}\n\nexport type BridgeUnexposeQuery = Query<void, BridgeUnexposeQuerySchema>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\n\nimport type { BridgeModuleEventData } from '../EventData.ts'\nimport type { BridgeInstance } from '../Instance.ts'\nimport type { BridgeModule } from '../Module.ts'\nimport type { BridgeParams } from '../Params.ts'\n\nexport interface AttachableBridgeInstance<\n TParams extends BridgeParams = BridgeParams,\n TEventData extends BridgeModuleEventData = BridgeModuleEventData,\n> extends BridgeModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n BridgeInstance<TParams, TEventData> {}\n\nexport type AttachableBridgeInstanceTypeCheck<T extends AttachableBridgeInstance = AttachableBridgeInstance> = TypeCheck<T>\n\nexport class IsAttachableBridgeInstanceFactory<T extends AttachableBridgeInstance = AttachableBridgeInstance> extends IsObjectFactory<T> {}\n","import type { EmptyObject, WithAdditional } from '@xylabs/object'\nimport type { CacheConfig, ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const BridgeConfigSchema = 'network.xyo.bridge.config' as const\nexport type BridgeConfigSchema = typeof BridgeConfigSchema\n\nexport type BridgeClientConfig = {\n cache?: CacheConfig | true\n discoverRoots?: 'start' | 'lazy'\n maxDepth?: number\n}\n\nexport type BridgeHostConfig = {\n cache?: CacheConfig | true\n maxDepth?: number\n}\n\nexport type BridgeConfig<\n TConfig extends Payload | EmptyObject | void = void,\n TSchema extends string | void = void,\n TClient extends EmptyObject | void = void,\n THost extends EmptyObject | void = void,\n> = ModuleConfig<\n WithAdditional<\n {\n client?: WithAdditional<BridgeClientConfig, TClient>\n /** @deprecated use client.discoverRoots instead */\n discoverRoots?: 'start' | 'lazy'\n host?: WithAdditional<BridgeHostConfig, THost>\n schema: TConfig extends Payload ? TConfig['schema'] : BridgeConfigSchema\n },\n TConfig\n >,\n TSchema\n>\n"],"mappings":";;;;AAAA,SAASA,mBAAAA,wBAAuB;;;ACChC,SAASC,uBAAuB;AAEhC,SAASC,kCAAkC;;;ACH3C,SAASC,uBAAuB;AAChC,SACEC,mBAAmBC,iBAAiBC,kBAAkBC,mBACjD;;;ACAA,IAAMC,2BAA2B;;;ACCjC,IAAMC,8BAA2D;;;ACDjE,IAAMC,0BAA0B;AAQhC,IAAMC,4BAA4B;;;ACPlC,IAAMC,4BAA4B;;;AJKlC,IAAMC,mBAAmB,IAAIC,kBAAAA,EAAoCC,OACtE;EAAEC,QAAQ;AAAW,GACrB;EAACC;CAAiB;AAEb,IAAMC,iBAAiB,IAAIC,gBAAAA,EAAgCJ,OAAO;EAACK;EAA0BC;CAA4B;AAEzH,IAAMC,iBAAiBC,gBAAgBR,OAAOG,cAAAA;AAC9C,IAAMM,mBAAmBD,gBAAgBR,OAAOF,gBAAAA;AAChD,IAAMY,mBAAmBC,YAAYX,OAAOG,cAAAA;AAC5C,IAAMS,qBAAqBD,YAAYX,OAAOF,gBAAAA;;;ADV9C,IAAMe,4CAA6D,CAAC;AAG3E,IAAMC,UAAU,IAAIC,gBAAAA;AAEb,IAAMC,6BAAkEF,QAAQG,OAAOJ,2CAA2C;EACvIK;EACAC;CACD;;;ADZM,IAAMC,6BAA6BC,iBAAgBC,OAAOC,0BAAAA;;;AOHjE,SAASC,mBAAAA,wBAAuB;AAiBzB,IAAMC,oCAAN,cAA+GC,iBAAAA;EAjBtH,OAiBsHA;;;AAAoB;;;ACdnI,IAAMC,qBAAqB;","names":["AsObjectFactory","IsObjectFactory","isAttachableModuleInstance","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","BridgeConnectQuerySchema","BridgeDisconnectQuerySchema","BridgeExposeQuerySchema","ModuleFilterPayloadSchema","BridgeUnexposeQuerySchema","isBridgeInstance","IsInstanceFactory","create","expose","isModuleInstance","isBridgeModule","IsModuleFactory","BridgeConnectQuerySchema","BridgeDisconnectQuerySchema","asBridgeModule","AsObjectFactory","asBridgeInstance","withBridgeModule","WithFactory","withBridgeInstance","requiredAttachableBridgeInstanceFunctions","factory","IsObjectFactory","isAttachableBridgeInstance","create","isBridgeInstance","isAttachableModuleInstance","asAttachableBridgeInstance","AsObjectFactory","create","isAttachableBridgeInstance","IsObjectFactory","IsAttachableBridgeInstanceFactory","IsObjectFactory","BridgeConfigSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/bridge-model",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,17 +29,18 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/hex": "^4.3.
|
|
33
|
-
"@xylabs/object": "^4.3.
|
|
34
|
-
"@xylabs/promise": "^4.3.
|
|
35
|
-
"@
|
|
36
|
-
"@xyo-network/
|
|
37
|
-
"@xyo-network/module-
|
|
38
|
-
"@xyo-network/
|
|
32
|
+
"@xylabs/hex": "^4.3.13",
|
|
33
|
+
"@xylabs/object": "^4.3.13",
|
|
34
|
+
"@xylabs/promise": "^4.3.13",
|
|
35
|
+
"@xylabs/typeof": "^4.3.13",
|
|
36
|
+
"@xyo-network/boundwitness-model": "^3.4.0",
|
|
37
|
+
"@xyo-network/module-events": "^3.4.0",
|
|
38
|
+
"@xyo-network/module-model": "^3.4.0",
|
|
39
|
+
"@xyo-network/payload-model": "^3.4.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@xylabs/ts-scripts-yarn3": "^4.2.
|
|
42
|
-
"@xylabs/tsconfig": "^4.2.
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^4.2.4",
|
|
43
|
+
"@xylabs/tsconfig": "^4.2.4",
|
|
43
44
|
"typescript": "^5.6.3"
|
|
44
45
|
},
|
|
45
46
|
"publishConfig": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TypeCheck } from '@xylabs/object'
|
|
2
2
|
import { IsObjectFactory } from '@xylabs/object'
|
|
3
|
+
import type { ObjectTypeShape } from '@xylabs/typeof'
|
|
3
4
|
import { isAttachableModuleInstance } from '@xyo-network/module-model'
|
|
4
5
|
|
|
5
6
|
import { isBridgeInstance } from '../typeChecks.ts'
|