@xyo-network/bridge-model 5.2.25 → 5.3.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.
- package/dist/neutral/Config.d.ts +5 -3
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/Queries/Connect.d.ts +4 -2
- package/dist/neutral/Queries/Connect.d.ts.map +1 -1
- package/dist/neutral/Queries/Disconnect.d.ts +5 -3
- package/dist/neutral/Queries/Disconnect.d.ts.map +1 -1
- package/dist/neutral/Queries/Expose.d.ts +7 -3
- package/dist/neutral/Queries/Expose.d.ts.map +1 -1
- package/dist/neutral/Queries/Unexpose.d.ts +4 -2
- package/dist/neutral/Queries/Unexpose.d.ts.map +1 -1
- package/dist/neutral/index.mjs +13 -6
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/Config.ts +7 -3
- package/src/Queries/Connect.ts +2 -2
- package/src/Queries/Disconnect.ts +3 -3
- package/src/Queries/Expose.ts +5 -3
- package/src/Queries/Unexpose.ts +2 -2
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js';
|
|
2
2
|
import type { CacheConfig, ModuleConfig } from '@xyo-network/module-model';
|
|
3
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
4
|
-
export declare const BridgeConfigSchema: "network.xyo.bridge.config"
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
export declare const BridgeConfigSchema: "network.xyo.bridge.config" & {
|
|
5
|
+
readonly __schema: true;
|
|
6
|
+
};
|
|
5
7
|
export type BridgeConfigSchema = typeof BridgeConfigSchema;
|
|
6
8
|
export type BridgeClientConfig = {
|
|
7
9
|
cache?: CacheConfig | true;
|
|
@@ -12,7 +14,7 @@ export type BridgeHostConfig = {
|
|
|
12
14
|
cache?: CacheConfig | true;
|
|
13
15
|
maxDepth?: number;
|
|
14
16
|
};
|
|
15
|
-
export type BridgeConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends
|
|
17
|
+
export type BridgeConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void, TClient extends EmptyObject | void = void, THost extends EmptyObject | void = void> = ModuleConfig<WithAdditional<{
|
|
16
18
|
client?: WithAdditional<BridgeClientConfig, TClient>;
|
|
17
19
|
/** @deprecated use client.discoverRoots instead */
|
|
18
20
|
discoverRoots?: 'start' | 'lazy';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACP,MAAM,4BAA4B,CAAA;AAGnC,eAAO,MAAM,kBAAkB;;CAA8C,CAAA;AAC7E,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,EACnD,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,EACpC,OAAO,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,EACzC,KAAK,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,IACrC,YAAY,CACd,cAAc,CACZ;IACE,MAAM,CAAC,EAAE,cAAc,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAA;IACpD,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAChC,IAAI,CAAC,EAAE,cAAc,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAA;IAC9C,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,kBAAkB,CAAA;CACzE,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type
|
|
3
|
-
export declare const BridgeConnectQuerySchema: "network.xyo.query.bridge.connect"
|
|
2
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const BridgeConnectQuerySchema: "network.xyo.query.bridge.connect" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type BridgeConnectQuerySchema = typeof BridgeConnectQuerySchema;
|
|
5
7
|
export type BridgeConnectQuery = Query<{
|
|
6
8
|
id?: ModuleIdentifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,wBAAwB;;CAAqD,CAAA;AAC1F,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC;IACrC,EAAE,CAAC,EAAE,gBAAgB,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,wBAAwB,CAAA;CACjC,CAAC,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type
|
|
3
|
-
export
|
|
4
|
-
|
|
2
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const BridgeDisconnectQuerySchema: "network.xyo.query.bridge.disconnect" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
6
|
+
export type BridgeDisconnectQuerySchema = typeof BridgeDisconnectQuerySchema;
|
|
5
7
|
export type BridgeDisconnectQuery = Query<{
|
|
6
8
|
id?: ModuleIdentifier;
|
|
7
9
|
maxDepth?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Disconnect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Disconnect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Disconnect.d.ts","sourceRoot":"","sources":["../../../src/Queries/Disconnect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,2BAA2B;;CAAwD,CAAA;AAChG,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC;IACxC,EAAE,CAAC,EAAE,gBAAgB,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,2BAA2B,CAAA;CACpC,CAAC,CAAA"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type
|
|
3
|
-
export declare const BridgeExposeQuerySchema: "network.xyo.query.bridge.expose"
|
|
2
|
+
import { type Payload, type Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const BridgeExposeQuerySchema: "network.xyo.query.bridge.expose" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema;
|
|
5
7
|
export interface BridgeExposeOptions {
|
|
6
8
|
maxDepth?: number;
|
|
7
9
|
required?: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare const ModuleFilterPayloadSchema
|
|
11
|
+
export declare const ModuleFilterPayloadSchema: "network.xyo.module.filter" & {
|
|
12
|
+
readonly __schema: true;
|
|
13
|
+
};
|
|
10
14
|
export type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema;
|
|
11
15
|
export type ModuleFilterPayload = Payload<{
|
|
12
16
|
id: ModuleIdentifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Expose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Expose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Expose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EACK,KAAK,OAAO,EAAE,KAAK,KAAK,EACnC,MAAM,4BAA4B,CAAA;AAEnC,eAAO,MAAM,uBAAuB;;CAAoD,CAAA;AACxF,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,yBAAyB;;CAA8C,CAAA;AACpF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,gBAAgB,CAAA;CAAE,GAAG,mBAAmB,EAAE,yBAAyB,CAAC,CAAA;AAEpH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
2
2
|
import type { BridgeExposeOptions } from './Expose.ts';
|
|
3
|
-
export declare const BridgeUnexposeQuerySchema: "network.xyo.query.bridge.unexpose"
|
|
3
|
+
export declare const BridgeUnexposeQuerySchema: "network.xyo.query.bridge.unexpose" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema;
|
|
5
7
|
export interface BridgeUnexposeOptions extends BridgeExposeOptions {
|
|
6
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unexpose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Unexpose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Unexpose.d.ts","sourceRoot":"","sources":["../../../src/Queries/Unexpose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,eAAO,MAAM,yBAAyB;;CAAsD,CAAA;AAC5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;CAAG;AAErE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -15,17 +15,23 @@ import {
|
|
|
15
15
|
} from "@xyo-network/module-model";
|
|
16
16
|
|
|
17
17
|
// src/Queries/Connect.ts
|
|
18
|
-
|
|
18
|
+
import { asSchema } from "@xyo-network/payload-model";
|
|
19
|
+
var BridgeConnectQuerySchema = asSchema("network.xyo.query.bridge.connect", true);
|
|
19
20
|
|
|
20
21
|
// src/Queries/Disconnect.ts
|
|
21
|
-
|
|
22
|
+
import { asSchema as asSchema2 } from "@xyo-network/payload-model";
|
|
23
|
+
var BridgeDisconnectQuerySchema = asSchema2("network.xyo.query.bridge.disconnect", true);
|
|
22
24
|
|
|
23
25
|
// src/Queries/Expose.ts
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
import {
|
|
27
|
+
asSchema as asSchema3
|
|
28
|
+
} from "@xyo-network/payload-model";
|
|
29
|
+
var BridgeExposeQuerySchema = asSchema3("network.xyo.query.bridge.expose", true);
|
|
30
|
+
var ModuleFilterPayloadSchema = asSchema3("network.xyo.module.filter", true);
|
|
26
31
|
|
|
27
32
|
// src/Queries/Unexpose.ts
|
|
28
|
-
|
|
33
|
+
import { asSchema as asSchema4 } from "@xyo-network/payload-model";
|
|
34
|
+
var BridgeUnexposeQuerySchema = asSchema4("network.xyo.query.bridge.unexpose", true);
|
|
29
35
|
|
|
30
36
|
// src/typeChecks.ts
|
|
31
37
|
var isBridgeInstance = new IsInstanceFactory().create(
|
|
@@ -55,7 +61,8 @@ var IsAttachableBridgeInstanceFactory = class extends IsObjectFactory2 {
|
|
|
55
61
|
};
|
|
56
62
|
|
|
57
63
|
// src/Config.ts
|
|
58
|
-
|
|
64
|
+
import { asSchema as asSchema5 } from "@xyo-network/payload-model";
|
|
65
|
+
var BridgeConfigSchema = asSchema5("network.xyo.bridge.config", true);
|
|
59
66
|
export {
|
|
60
67
|
BridgeConfigSchema,
|
|
61
68
|
BridgeConnectQuerySchema,
|
|
@@ -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/sdk-js'\n\nimport { isAttachableBridgeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableBridgeInstance = AsObjectFactory.create(isAttachableBridgeInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\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/sdk-js'\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
|
|
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/sdk-js'\n\nimport { isAttachableBridgeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableBridgeInstance = AsObjectFactory.create(isAttachableBridgeInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\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/sdk-js'\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 { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const BridgeConnectQuerySchema = asSchema('network.xyo.query.bridge.connect', true)\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 { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const BridgeDisconnectQuerySchema = asSchema('network.xyo.query.bridge.disconnect', true)\nexport type BridgeDisconnectQuerySchema = typeof BridgeDisconnectQuerySchema\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 {\n asSchema, type Payload, type Query,\n} from '@xyo-network/payload-model'\n\nexport const BridgeExposeQuerySchema = asSchema('network.xyo.query.bridge.expose', true)\nexport type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema\n\nexport interface BridgeExposeOptions {\n maxDepth?: number\n required?: boolean\n}\n\nexport const ModuleFilterPayloadSchema = asSchema('network.xyo.module.filter', true)\nexport type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema\n\nexport type ModuleFilterPayload = Payload<{ id: ModuleIdentifier } & BridgeExposeOptions, ModuleFilterPayloadSchema>\n\nexport type BridgeExposeQuery = Query<void, BridgeExposeQuerySchema>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nimport type { BridgeExposeOptions } from './Expose.ts'\n\nexport const BridgeUnexposeQuerySchema = asSchema('network.xyo.query.bridge.unexpose', true)\nexport type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema\n\nexport interface BridgeUnexposeOptions extends BridgeExposeOptions {}\n\nexport type BridgeUnexposeQuery = Query<void, BridgeUnexposeQuerySchema>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\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/sdk-js'\nimport type { CacheConfig, ModuleConfig } from '@xyo-network/module-model'\nimport type {\n Payload,\n Schema,\n} from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nexport const BridgeConfigSchema = asSchema('network.xyo.bridge.config', true)\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 Schema | 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,SAAS,mBAAAA,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACF3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACFP,SAAS,gBAA4B;AAE9B,IAAM,2BAA2B,SAAS,oCAAoC,IAAI;;;ACFzF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,8BAA8BA,UAAS,uCAAuC,IAAI;;;ACF/F;AAAA,EACE,YAAAC;AAAA,OACK;AAEA,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;AAQhF,IAAM,4BAA4BA,UAAS,6BAA6B,IAAI;;;ACbnF,SAAS,YAAAC,iBAA4B;AAI9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;AJKpF,IAAM,mBAAmB,IAAI,kBAAkC,EAAE;AAAA,EACtE,EAAE,QAAQ,WAAW;AAAA,EACrB,CAAC,gBAAgB;AACnB;AACO,IAAM,iBAAiB,IAAI,gBAA8B,EAAE,OAAO,CAAC,0BAA0B,2BAA2B,CAAC;AAEzH,IAAM,iBAAiB,gBAAgB,OAAO,cAAc;AAC5D,IAAM,mBAAmB,gBAAgB,OAAO,gBAAgB;AAChE,IAAM,mBAAmB,YAAY,OAAO,cAAc;AAC1D,IAAM,qBAAqB,YAAY,OAAO,gBAAgB;;;ADX9D,IAAM,4CAA6D,CAAC;AAG3E,IAAM,UAAU,IAAI,gBAA0C;AAEvD,IAAM,6BAAkE,QAAQ,OAAO,2CAA2C;AAAA,EACvI;AAAA,EACA;AACF,CAAC;;;ADXM,IAAM,6BAA6BC,iBAAgB,OAAO,0BAA0B;;;AOH3F,SAAS,mBAAAC,wBAAuB;AAiBzB,IAAM,oCAAN,cAA+GA,iBAAmB;AAAC;;;ACZ1I,SAAS,YAAAC,iBAAgB;AAElB,IAAM,qBAAqBA,UAAS,6BAA6B,IAAI;","names":["AsObjectFactory","asSchema","asSchema","asSchema","AsObjectFactory","IsObjectFactory","asSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/bridge-model",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"!**/*.test.*"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/sdk-js": "~5.0.
|
|
40
|
-
"@xyo-network/boundwitness-model": "~5.
|
|
41
|
-
"@xyo-network/module-model": "~5.
|
|
42
|
-
"@xyo-network/payload-model": "~5.
|
|
39
|
+
"@xylabs/sdk-js": "~5.0.64",
|
|
40
|
+
"@xyo-network/boundwitness-model": "~5.3.0",
|
|
41
|
+
"@xyo-network/module-model": "~5.3.0",
|
|
42
|
+
"@xyo-network/payload-model": "~5.3.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "~7.2
|
|
46
|
-
"@xylabs/tsconfig": "~7.2
|
|
45
|
+
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
|
46
|
+
"@xylabs/tsconfig": "~7.3.2",
|
|
47
47
|
"typescript": "~5.9.3"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
package/src/Config.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'
|
|
2
2
|
import type { CacheConfig, ModuleConfig } from '@xyo-network/module-model'
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
Payload,
|
|
5
|
+
Schema,
|
|
6
|
+
} from '@xyo-network/payload-model'
|
|
7
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
4
8
|
|
|
5
|
-
export const BridgeConfigSchema = 'network.xyo.bridge.config'
|
|
9
|
+
export const BridgeConfigSchema = asSchema('network.xyo.bridge.config', true)
|
|
6
10
|
export type BridgeConfigSchema = typeof BridgeConfigSchema
|
|
7
11
|
|
|
8
12
|
export type BridgeClientConfig = {
|
|
@@ -18,7 +22,7 @@ export type BridgeHostConfig = {
|
|
|
18
22
|
|
|
19
23
|
export type BridgeConfig<
|
|
20
24
|
TConfig extends Payload | EmptyObject | void = void,
|
|
21
|
-
TSchema extends
|
|
25
|
+
TSchema extends Schema | void = void,
|
|
22
26
|
TClient extends EmptyObject | void = void,
|
|
23
27
|
THost extends EmptyObject | void = void,
|
|
24
28
|
> = ModuleConfig<
|
package/src/Queries/Connect.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
-
import type
|
|
2
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export const BridgeConnectQuerySchema = 'network.xyo.query.bridge.connect'
|
|
4
|
+
export const BridgeConnectQuerySchema = asSchema('network.xyo.query.bridge.connect', true)
|
|
5
5
|
export type BridgeConnectQuerySchema = typeof BridgeConnectQuerySchema
|
|
6
6
|
|
|
7
7
|
export type BridgeConnectQuery = Query<{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
-
import type
|
|
2
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export const BridgeDisconnectQuerySchema = asSchema('network.xyo.query.bridge.disconnect', true)
|
|
5
|
+
export type BridgeDisconnectQuerySchema = typeof BridgeDisconnectQuerySchema
|
|
6
6
|
|
|
7
7
|
export type BridgeDisconnectQuery = Query<{
|
|
8
8
|
id?: ModuleIdentifier
|
package/src/Queries/Expose.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
-
import
|
|
2
|
+
import {
|
|
3
|
+
asSchema, type Payload, type Query,
|
|
4
|
+
} from '@xyo-network/payload-model'
|
|
3
5
|
|
|
4
|
-
export const BridgeExposeQuerySchema = 'network.xyo.query.bridge.expose'
|
|
6
|
+
export const BridgeExposeQuerySchema = asSchema('network.xyo.query.bridge.expose', true)
|
|
5
7
|
export type BridgeExposeQuerySchema = typeof BridgeExposeQuerySchema
|
|
6
8
|
|
|
7
9
|
export interface BridgeExposeOptions {
|
|
@@ -9,7 +11,7 @@ export interface BridgeExposeOptions {
|
|
|
9
11
|
required?: boolean
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
export const ModuleFilterPayloadSchema = 'network.xyo.module.filter'
|
|
14
|
+
export const ModuleFilterPayloadSchema = asSchema('network.xyo.module.filter', true)
|
|
13
15
|
export type ModuleFilterPayloadSchema = typeof ModuleFilterPayloadSchema
|
|
14
16
|
|
|
15
17
|
export type ModuleFilterPayload = Payload<{ id: ModuleIdentifier } & BridgeExposeOptions, ModuleFilterPayloadSchema>
|
package/src/Queries/Unexpose.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
import type { BridgeExposeOptions } from './Expose.ts'
|
|
4
4
|
|
|
5
|
-
export const BridgeUnexposeQuerySchema = 'network.xyo.query.bridge.unexpose'
|
|
5
|
+
export const BridgeUnexposeQuerySchema = asSchema('network.xyo.query.bridge.unexpose', true)
|
|
6
6
|
export type BridgeUnexposeQuerySchema = typeof BridgeUnexposeQuerySchema
|
|
7
7
|
|
|
8
8
|
export interface BridgeUnexposeOptions extends BridgeExposeOptions {}
|