@xyo-network/module-model
Advanced tools
Comparing version
@@ -5,4 +5,4 @@ import type { EmptyObject, WithAdditional } from '@xylabs/object'; | ||
import type { ModuleConfigFields } from './Fields.ts'; | ||
export type ModuleConfigSchema = 'network.xyo.module.config'; | ||
export declare const ModuleConfigSchema: ModuleConfigSchema; | ||
export declare const ModuleConfigSchema: "network.xyo.module.config"; | ||
export type ModuleConfigSchema = typeof ModuleConfigSchema; | ||
export type ModuleConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = Payload<WithAdditional<ArchivingModuleConfig & ModuleConfigFields, TConfig>, TSchema extends Schema ? TSchema : TConfig extends Payload ? TConfig['schema'] : ModuleConfigSchema>; | ||
@@ -9,0 +9,0 @@ export type AnyConfigSchema<TConfig extends Omit<ModuleConfig, 'schema'> & { |
import type { Query } from '@xyo-network/payload-model'; | ||
export type ModuleManifestQuerySchema = 'network.xyo.query.module.manifest'; | ||
export declare const ModuleManifestQuerySchema: ModuleManifestQuerySchema; | ||
export declare const ModuleManifestQuerySchema: "network.xyo.query.module.manifest"; | ||
export type ModuleManifestQuerySchema = typeof ModuleManifestQuerySchema; | ||
export type ModuleManifestQuery = Query<{ | ||
@@ -5,0 +5,0 @@ maxDepth?: number; |
import type { Query } from '@xyo-network/payload-model'; | ||
export type ModuleAddressQuerySchema = 'network.xyo.query.module.address'; | ||
export declare const ModuleAddressQuerySchema: ModuleAddressQuerySchema; | ||
export declare const ModuleAddressQuerySchema: "network.xyo.query.module.address"; | ||
export type ModuleAddressQuerySchema = typeof ModuleAddressQuerySchema; | ||
export type ModuleAddressQuery = Query<{ | ||
@@ -5,0 +5,0 @@ schema: ModuleAddressQuerySchema; |
import type { Address } from '@xylabs/hex'; | ||
import type { Query } from '@xyo-network/payload-model'; | ||
export type ModuleSubscribeQuerySchema = 'network.xyo.query.module.subscribe'; | ||
export declare const ModuleSubscribeQuerySchema: ModuleSubscribeQuerySchema; | ||
export declare const ModuleSubscribeQuerySchema: "network.xyo.query.module.subscribe"; | ||
export type ModuleSubscribeQuerySchema = typeof ModuleSubscribeQuerySchema; | ||
export interface ModuleSubscribeFilter { | ||
@@ -6,0 +6,0 @@ /** @field if specified, at least one of the schemas must be present in the boundwtness to generate a notification */ |
{ | ||
"name": "@xyo-network/module-model", | ||
"version": "3.6.9", | ||
"version": "3.6.10", | ||
"description": "Primary SDK for using XYO Protocol 2.0", | ||
@@ -32,15 +32,15 @@ "homepage": "https://xyo.network", | ||
"dependencies": { | ||
"@xylabs/assert": "^4.4.34", | ||
"@xylabs/exists": "^4.4.34", | ||
"@xylabs/hex": "^4.4.34", | ||
"@xylabs/logger": "^4.4.34", | ||
"@xylabs/object": "^4.4.34", | ||
"@xylabs/promise": "^4.4.34", | ||
"@xylabs/retry": "^4.4.34", | ||
"@xylabs/typeof": "^4.4.34", | ||
"@xyo-network/account-model": "^3.6.9", | ||
"@xyo-network/boundwitness-model": "^3.6.9", | ||
"@xyo-network/manifest-model": "^3.6.9", | ||
"@xyo-network/module-events": "^3.6.9", | ||
"@xyo-network/payload-model": "^3.6.9" | ||
"@xylabs/assert": "^4.5.1", | ||
"@xylabs/exists": "^4.5.1", | ||
"@xylabs/hex": "^4.5.1", | ||
"@xylabs/logger": "^4.5.1", | ||
"@xylabs/object": "^4.5.1", | ||
"@xylabs/promise": "^4.5.1", | ||
"@xylabs/retry": "^4.5.1", | ||
"@xylabs/typeof": "^4.5.1", | ||
"@xyo-network/account-model": "^3.6.10", | ||
"@xyo-network/boundwitness-model": "^3.6.10", | ||
"@xyo-network/manifest-model": "^3.6.10", | ||
"@xyo-network/module-events": "^3.6.10", | ||
"@xyo-network/payload-model": "^3.6.10" | ||
}, | ||
@@ -50,5 +50,5 @@ "devDependencies": { | ||
"@xylabs/tsconfig": "^4.2.6", | ||
"@xylabs/vitest-extended": "^4.4.34", | ||
"typescript": "^5.7.2", | ||
"vitest": "^2.1.8" | ||
"@xylabs/vitest-extended": "^4.5.1", | ||
"typescript": "^5.7.3", | ||
"vitest": "^3.0.4" | ||
}, | ||
@@ -55,0 +55,0 @@ "publishConfig": { |
@@ -7,4 +7,4 @@ import type { EmptyObject, WithAdditional } from '@xylabs/object' | ||
export type ModuleConfigSchema = 'network.xyo.module.config' | ||
export const ModuleConfigSchema: ModuleConfigSchema = 'network.xyo.module.config' | ||
export const ModuleConfigSchema = 'network.xyo.module.config' as const | ||
export type ModuleConfigSchema = typeof ModuleConfigSchema | ||
@@ -11,0 +11,0 @@ export type ModuleConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = Payload< |
import type { Query } from '@xyo-network/payload-model' | ||
export type ModuleManifestQuerySchema = 'network.xyo.query.module.manifest' | ||
export const ModuleManifestQuerySchema: ModuleManifestQuerySchema = 'network.xyo.query.module.manifest' | ||
export const ModuleManifestQuerySchema = 'network.xyo.query.module.manifest' as const | ||
export type ModuleManifestQuerySchema = typeof ModuleManifestQuerySchema | ||
@@ -6,0 +6,0 @@ export type ModuleManifestQuery = Query<{ |
import type { Query } from '@xyo-network/payload-model' | ||
export type ModuleAddressQuerySchema = 'network.xyo.query.module.address' | ||
export const ModuleAddressQuerySchema: ModuleAddressQuerySchema = 'network.xyo.query.module.address' | ||
export const ModuleAddressQuerySchema = 'network.xyo.query.module.address' as const | ||
export type ModuleAddressQuerySchema = typeof ModuleAddressQuerySchema | ||
@@ -6,0 +6,0 @@ export type ModuleAddressQuery = Query<{ |
import type { Address } from '@xylabs/hex' | ||
import type { Query } from '@xyo-network/payload-model' | ||
export type ModuleSubscribeQuerySchema = 'network.xyo.query.module.subscribe' | ||
export const ModuleSubscribeQuerySchema: ModuleSubscribeQuerySchema = 'network.xyo.query.module.subscribe' | ||
export const ModuleSubscribeQuerySchema = 'network.xyo.query.module.subscribe' as const | ||
export type ModuleSubscribeQuerySchema = typeof ModuleSubscribeQuerySchema | ||
@@ -7,0 +7,0 @@ export interface ModuleSubscribeFilter { |
@@ -71,3 +71,3 @@ import type { Address } from '@xylabs/hex' | ||
= (await resolveAddressToInstanceDown(root, address, includePrivate ?? false, ignore)) | ||
?? (await resolveAddressToInstanceUp(root, address, includePrivate ?? true, ignore)) | ||
?? (await resolveAddressToInstanceUp(root, address, includePrivate ?? true, ignore)) | ||
cache?.set(address, result ? new WeakRef(result) : null) | ||
@@ -74,0 +74,0 @@ return result |
@@ -190,3 +190,3 @@ /* eslint-disable max-statements */ | ||
= (await resolver.resolve(first, { maxDepth: firstIsAddress ? 10 : 1 })) | ||
?? (first ? await resolver.resolvePrivate(first, { maxDepth: firstIsAddress ? 10 : 1 }) : undefined) | ||
?? (first ? await resolver.resolvePrivate(first, { maxDepth: firstIsAddress ? 10 : 1 }) : undefined) | ||
const finalModule = required ? assertEx(resolvedModule, () => `Failed to resolve [${first}] [${firstIsAddress}]`) : resolvedModule | ||
@@ -193,0 +193,0 @@ const firstModule = asModuleInstance(finalModule, () => `Resolved invalid module instance [${first}]`) as T |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
320949
-3.06%3936
-2.36%Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated