From 54886e033369f9a4bcb530a657e43e3f1b2402bb Mon Sep 17 00:00:00 2001 From: Arie Trouw Date: Mon, 26 Aug 2024 14:29:08 -0700 Subject: [PATCH] params not optional --- .yarn/versions/2912f7c2.yml | 187 ++++++++++++++++++ .../src/CreatableModule/ModuleFactory.ts | 4 +- 2 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 .yarn/versions/2912f7c2.yml diff --git a/.yarn/versions/2912f7c2.yml b/.yarn/versions/2912f7c2.yml new file mode 100644 index 0000000000..9bebb4d2b6 --- /dev/null +++ b/.yarn/versions/2912f7c2.yml @@ -0,0 +1,187 @@ +releases: + "@xyo-network/abstract-witness": patch + "@xyo-network/account": patch + "@xyo-network/account-model": patch + "@xyo-network/address-payload-plugin": patch + "@xyo-network/api": patch + "@xyo-network/api-models": patch + "@xyo-network/archivist": patch + "@xyo-network/archivist-abstract": patch + "@xyo-network/archivist-cookie": patch + "@xyo-network/archivist-indexeddb": patch + "@xyo-network/archivist-memory": patch + "@xyo-network/archivist-model": patch + "@xyo-network/archivist-storage": patch + "@xyo-network/archivist-view": patch + "@xyo-network/archivist-wrapper": patch + "@xyo-network/bip39": patch + "@xyo-network/boundwitness": patch + "@xyo-network/boundwitness-builder": patch + "@xyo-network/boundwitness-loader": patch + "@xyo-network/boundwitness-model": patch + "@xyo-network/boundwitness-validator": patch + "@xyo-network/boundwitness-wrapper": patch + "@xyo-network/bridge": patch + "@xyo-network/bridge-abstract": patch + "@xyo-network/bridge-http": patch + "@xyo-network/bridge-model": patch + "@xyo-network/bridge-module-resolver": patch + "@xyo-network/bridge-pub-sub": patch + "@xyo-network/bridge-websocket": patch + "@xyo-network/bridge-worker": patch + "@xyo-network/bridge-wrapper": patch + "@xyo-network/config-payload-plugin": patch + "@xyo-network/core": patch + "@xyo-network/core-payload-plugins": patch + "@xyo-network/data": patch + "@xyo-network/diviner": patch + "@xyo-network/diviner-abstract": patch + "@xyo-network/diviner-address-chain": patch + "@xyo-network/diviner-address-chain-abstract": patch + "@xyo-network/diviner-address-chain-memory": patch + "@xyo-network/diviner-address-chain-model": patch + "@xyo-network/diviner-address-history": patch + "@xyo-network/diviner-address-history-model": patch + "@xyo-network/diviner-address-space": patch + "@xyo-network/diviner-address-space-abstract": patch + "@xyo-network/diviner-address-space-memory": patch + "@xyo-network/diviner-address-space-model": patch + "@xyo-network/diviner-archivist": patch + "@xyo-network/diviner-boundwitness": patch + "@xyo-network/diviner-boundwitness-abstract": patch + "@xyo-network/diviner-boundwitness-indexeddb": patch + "@xyo-network/diviner-boundwitness-memory": patch + "@xyo-network/diviner-boundwitness-model": patch + "@xyo-network/diviner-boundwitness-stats": patch + "@xyo-network/diviner-boundwitness-stats-abstract": patch + "@xyo-network/diviner-boundwitness-stats-memory": patch + "@xyo-network/diviner-boundwitness-stats-model": patch + "@xyo-network/diviner-coin": patch + "@xyo-network/diviner-coin-user-locations": patch + "@xyo-network/diviner-coin-user-locations-abstract": patch + "@xyo-network/diviner-coin-user-locations-model": patch + "@xyo-network/diviner-distinct": patch + "@xyo-network/diviner-distinct-model": patch + "@xyo-network/diviner-forecasting": patch + "@xyo-network/diviner-forecasting-abstract": patch + "@xyo-network/diviner-forecasting-memory": patch + "@xyo-network/diviner-forecasting-method-arima": patch + "@xyo-network/diviner-forecasting-model": patch + "@xyo-network/diviner-hash-lease": patch + "@xyo-network/diviner-huri": patch + "@xyo-network/diviner-identity": patch + "@xyo-network/diviner-indexeddb": patch + "@xyo-network/diviner-indexing": patch + "@xyo-network/diviner-indexing-memory": patch + "@xyo-network/diviner-indexing-model": patch + "@xyo-network/diviner-jsonpatch": patch + "@xyo-network/diviner-jsonpatch-memory": patch + "@xyo-network/diviner-jsonpatch-model": patch + "@xyo-network/diviner-jsonpath": patch + "@xyo-network/diviner-jsonpath-aggregate": patch + "@xyo-network/diviner-jsonpath-aggregate-memory": patch + "@xyo-network/diviner-jsonpath-aggregate-model": patch + "@xyo-network/diviner-jsonpath-memory": patch + "@xyo-network/diviner-jsonpath-model": patch + "@xyo-network/diviner-model": patch + "@xyo-network/diviner-models": patch + "@xyo-network/diviner-payload": patch + "@xyo-network/diviner-payload-abstract": patch + "@xyo-network/diviner-payload-generic": patch + "@xyo-network/diviner-payload-indexeddb": patch + "@xyo-network/diviner-payload-memory": patch + "@xyo-network/diviner-payload-model": patch + "@xyo-network/diviner-payload-pointer": patch + "@xyo-network/diviner-payload-pointer-memory": patch + "@xyo-network/diviner-payload-pointer-model": patch + "@xyo-network/diviner-payload-stats": patch + "@xyo-network/diviner-payload-stats-abstract": patch + "@xyo-network/diviner-payload-stats-memory": patch + "@xyo-network/diviner-payload-stats-model": patch + "@xyo-network/diviner-range": patch + "@xyo-network/diviner-range-model": patch + "@xyo-network/diviner-schema-list": patch + "@xyo-network/diviner-schema-list-abstract": patch + "@xyo-network/diviner-schema-list-memory": patch + "@xyo-network/diviner-schema-list-model": patch + "@xyo-network/diviner-schema-stats": patch + "@xyo-network/diviner-schema-stats-abstract": patch + "@xyo-network/diviner-schema-stats-memory": patch + "@xyo-network/diviner-schema-stats-model": patch + "@xyo-network/diviner-stateful": patch + "@xyo-network/diviner-temporal-indexing": patch + "@xyo-network/diviner-temporal-indexing-memory": patch + "@xyo-network/diviner-temporal-indexing-model": patch + "@xyo-network/diviner-transform": patch + "@xyo-network/diviner-transform-abstract": patch + "@xyo-network/diviner-transform-memory": patch + "@xyo-network/diviner-transform-model": patch + "@xyo-network/diviner-wrapper": patch + "@xyo-network/dns": patch + "@xyo-network/domain-payload-plugin": patch + "@xyo-network/filesystem-archivist": patch + "@xyo-network/hash": patch + "@xyo-network/huri": patch + "@xyo-network/id-payload-plugin": patch + "@xyo-network/key-model": patch + "@xyo-network/manifest": patch + "@xyo-network/manifest-model": patch + "@xyo-network/manifest-wrapper": patch + "@xyo-network/metamask-connector": patch + "@xyo-network/module": patch + "@xyo-network/module-abstract": patch + "@xyo-network/module-events": patch + "@xyo-network/module-factory-locator": patch + "@xyo-network/module-model": patch + "@xyo-network/module-resolver": patch + "@xyo-network/module-wrapper": patch + "@xyo-network/modules": patch + "@xyo-network/network": patch + "@xyo-network/node": patch + "@xyo-network/node-abstract": patch + "@xyo-network/node-memory": patch + "@xyo-network/node-model": patch + "@xyo-network/node-view": patch + "@xyo-network/node-wrapper": patch + "@xyo-network/object": patch + "@xyo-network/payload": patch + "@xyo-network/payload-builder": patch + "@xyo-network/payload-model": patch + "@xyo-network/payload-plugin": patch + "@xyo-network/payload-utils": patch + "@xyo-network/payload-validator": patch + "@xyo-network/payload-wrapper": patch + "@xyo-network/payloadset-plugin": patch + "@xyo-network/previous-hash-store": patch + "@xyo-network/previous-hash-store-indexeddb": patch + "@xyo-network/previous-hash-store-model": patch + "@xyo-network/previous-hash-store-storage": patch + "@xyo-network/protocol": patch + "@xyo-network/quadkey": patch + "@xyo-network/query-payload-plugin": patch + "@xyo-network/schema-cache": patch + "@xyo-network/schema-name-validator": patch + "@xyo-network/schema-payload-plugin": patch + "@xyo-network/sdk-js": patch + "@xyo-network/sdk-utils": patch + "@xyo-network/sentinel": patch + "@xyo-network/sentinel-abstract": patch + "@xyo-network/sentinel-memory": patch + "@xyo-network/sentinel-model": patch + "@xyo-network/sentinel-wrapper": patch + "@xyo-network/shared": patch + "@xyo-network/typeof": patch + "@xyo-network/value-payload-plugin": patch + "@xyo-network/wallet-model": patch + "@xyo-network/wasm": patch + "@xyo-network/witness": patch + "@xyo-network/witness-adhoc": patch + "@xyo-network/witness-blockchain": patch + "@xyo-network/witness-blockchain-abstract": patch + "@xyo-network/witness-environment": patch + "@xyo-network/witness-evm": patch + "@xyo-network/witness-evm-abstract": patch + "@xyo-network/witness-model": patch + "@xyo-network/witness-timestamp": patch + "@xyo-network/witness-wrapper": patch + "@xyo-network/witnesses": patch diff --git a/packages/modules/packages/module/packages/model/src/CreatableModule/ModuleFactory.ts b/packages/modules/packages/module/packages/model/src/CreatableModule/ModuleFactory.ts index dbb9ac1c2d..9b8d40aef9 100644 --- a/packages/modules/packages/module/packages/model/src/CreatableModule/ModuleFactory.ts +++ b/packages/modules/packages/module/packages/model/src/CreatableModule/ModuleFactory.ts @@ -58,14 +58,14 @@ export class ModuleFactory implements assertEx(thisFunc === rootFunc, () => `Override not allowed for [${functionName}] - override ${functionName}Handler instead`) } - create(this: CreatableModuleFactory, params: TModule['params'] | undefined): Promise { + create(this: CreatableModuleFactory, params: TModule['params']): Promise { const factory = this as ModuleFactory const schema = factory.creatableModule.defaultConfigSchema const mergedParams: TModule['params'] = merge( {}, factory.defaultParams, params, - { config: merge({}, factory.defaultParams?.config, params?.config, { schema }) }, + { config: merge({}, factory.defaultParams?.config, params.config, { schema }) }, ) return factory.creatableModule.create(mergedParams) }