@seedprotocol/sdk 0.7.7-next.988.g7046e66 → 0.7.7
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/{ClientManager-DdqRofK6.js → ClientManager-2GtDWHq6.js} +21 -21
- package/dist/{ClientManager-DdqRofK6.js.map → ClientManager-2GtDWHq6.js.map} +1 -1
- package/dist/{Item-DmK1PgK9.js → Item-D6j0IvBP.js} +53 -53
- package/dist/{Item-DmK1PgK9.js.map → Item-D6j0IvBP.js.map} +1 -1
- package/dist/{ModelProperty-DaJAII87.js → ModelProperty-B52C3CQ2.js} +26 -26
- package/dist/{ModelProperty-DaJAII87.js.map → ModelProperty-B52C3CQ2.js.map} +1 -1
- package/dist/{Schema-DhlbBQs8.js → Schema-O1QLoXv6.js} +31 -31
- package/dist/{Schema-DhlbBQs8.js.map → Schema-O1QLoXv6.js.map} +1 -1
- package/dist/{SchemaValidationService-9KHQAYQ4.js → SchemaValidationService-BxCbfDaI.js} +6 -6
- package/dist/{SchemaValidationService-9KHQAYQ4.js.map → SchemaValidationService-BxCbfDaI.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-qoVxUEEl.js → backfillMetadataPropertyIds-CzSbuucw.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-qoVxUEEl.js.map → backfillMetadataPropertyIds-CzSbuucw.js.map} +1 -1
- package/dist/{configurePlatform-CazqABrK.js → configurePlatform-Bbpw_R4y.js} +2 -2
- package/dist/{configurePlatform-CazqABrK.js.map → configurePlatform-Bbpw_R4y.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-yatbnC27.js → detachRowsBeforeDelete-D1TyEMco.js} +2 -2
- package/dist/{detachRowsBeforeDelete-yatbnC27.js.map → detachRowsBeforeDelete-D1TyEMco.js.map} +1 -1
- package/dist/{discardNewDraft-q1krLqtL.js → discardNewDraft-hiVaUVjV.js} +5 -5
- package/dist/{discardNewDraft-q1krLqtL.js.map → discardNewDraft-hiVaUVjV.js.map} +1 -1
- package/dist/dist/{ClientManager-DdqRofK6.d.ts → ClientManager-2GtDWHq6.d.ts} +1 -1
- package/dist/dist/{ClientManager-DdqRofK6.d.ts.map → ClientManager-2GtDWHq6.d.ts.map} +1 -1
- package/dist/dist/{Item-DmK1PgK9.d.ts → Item-D6j0IvBP.d.ts} +1 -1
- package/dist/dist/{Item-DmK1PgK9.d.ts.map → Item-D6j0IvBP.d.ts.map} +1 -1
- package/dist/dist/{ModelProperty-DaJAII87.d.ts → ModelProperty-B52C3CQ2.d.ts} +1 -1
- package/dist/dist/{ModelProperty-DaJAII87.d.ts.map → ModelProperty-B52C3CQ2.d.ts.map} +1 -1
- package/dist/dist/{Schema-DhlbBQs8.d.ts → Schema-O1QLoXv6.d.ts} +1 -1
- package/dist/dist/{Schema-DhlbBQs8.d.ts.map → Schema-O1QLoXv6.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-9KHQAYQ4.d.ts → SchemaValidationService-BxCbfDaI.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-9KHQAYQ4.d.ts.map → SchemaValidationService-BxCbfDaI.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-qoVxUEEl.d.ts → backfillMetadataPropertyIds-CzSbuucw.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-CzSbuucw.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CazqABrK.d.ts → configurePlatform-Bbpw_R4y.d.ts} +1 -1
- package/dist/dist/configurePlatform-Bbpw_R4y.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-yatbnC27.d.ts → detachRowsBeforeDelete-D1TyEMco.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-D1TyEMco.d.ts.map +1 -0
- package/dist/dist/{discardNewDraft-q1krLqtL.d.ts → discardNewDraft-hiVaUVjV.d.ts} +1 -1
- package/dist/dist/discardNewDraft-hiVaUVjV.d.ts.map +1 -0
- package/dist/dist/{eas-CPYt-QVJ.d.ts → eas-DOdj-EMK.d.ts} +1 -1
- package/dist/dist/eas-DOdj-EMK.d.ts.map +1 -0
- package/dist/dist/{errors-DuFqGrjo.d.ts → errors-KM-yq2MD.d.ts} +1 -1
- package/dist/dist/{errors-DuFqGrjo.d.ts.map → errors-KM-yq2MD.d.ts.map} +1 -1
- package/dist/dist/{getItem-DPapr9uy.d.ts → getItem-Bh0zv-o1.d.ts} +1 -1
- package/dist/dist/getItem-Bh0zv-o1.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-Dnv38ZW1.d.ts → getPublishPayload-oH8wJhnH.d.ts} +1 -1
- package/dist/dist/{getPublishPayload-Dnv38ZW1.d.ts.map → getPublishPayload-oH8wJhnH.d.ts.map} +1 -1
- package/dist/dist/{getPublishUploads-Dd7dCxNi.d.ts → getPublishUploads-Cex-NBe6.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-Dd7dCxNi.d.ts.map → getPublishUploads-Cex-NBe6.d.ts.map} +1 -1
- package/dist/dist/{index-CTidoFhC.d.ts → index-BAao3_Po.d.ts} +5 -5
- package/dist/dist/index-BAao3_Po.d.ts.map +1 -0
- package/dist/dist/{index-PnK3Ak9Z.d.ts → index-BbFwftAv.d.ts} +1 -1
- package/dist/dist/{index-PnK3Ak9Z.d.ts.map → index-BbFwftAv.d.ts.map} +1 -1
- package/dist/dist/{index-DeUHrBqA.d.ts → index-DpgQMIRq.d.ts} +1 -1
- package/dist/dist/{index-DeUHrBqA.d.ts.map → index-DpgQMIRq.d.ts.map} +1 -1
- package/dist/dist/{index.browser-CRvkFEhl.d.ts → index.browser-nndbVM7z.d.ts} +1 -1
- package/dist/dist/{index.browser-CRvkFEhl.d.ts.map → index.browser-nndbVM7z.d.ts.map} +1 -1
- package/dist/dist/{index.node-DQTc7kEl.d.ts → index.node-BUfx-JaP.d.ts} +1 -1
- package/dist/dist/{index.node-DQTc7kEl.d.ts.map → index.node-BUfx-JaP.d.ts.map} +1 -1
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-Dk_5t4-p.d.ts → property-BDBvImLs.d.ts} +3 -3
- package/dist/dist/property-BDBvImLs.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-BtUZdfft.d.ts → propertyValidationRules-BlfLn4rP.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-BlfLn4rP.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-CN7EsPVb.d.ts → publishDraftGraph-CLO85LLz.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-CN7EsPVb.d.ts.map → publishDraftGraph-CLO85LLz.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.d.ts → resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-C_BzNN8r.d.ts → resolveModelForSyncedSeed-DFr4COc4.d.ts} +3 -3
- package/dist/dist/resolveModelForSyncedSeed-DFr4COc4.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-BMmxPq5o.d.ts → syncDbWithEas-CAOlw3i-.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-CAOlw3i-.d.ts.map +1 -0
- package/dist/dist/{tabEvents-DyGJcILs.d.ts → tabEvents-DksXwk3X.d.ts} +1 -1
- package/dist/dist/{tabEvents-DyGJcILs.d.ts.map → tabEvents-DksXwk3X.d.ts.map} +1 -1
- package/dist/dist/{tolerantWebAccess-Zxy2EUzu.d.ts → tolerantWebAccess-CEIjFGf0.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-Zxy2EUzu.d.ts.map → tolerantWebAccess-CEIjFGf0.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-DxhC4ABM.d.ts → updateSeedRevokedAt-Cjr35YjE.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-Cjr35YjE.d.ts.map +1 -0
- package/dist/{eas-CPYt-QVJ.js → eas-DOdj-EMK.js} +3 -3
- package/dist/{eas-CPYt-QVJ.js.map → eas-DOdj-EMK.js.map} +1 -1
- package/dist/{errors-DuFqGrjo.js → errors-KM-yq2MD.js} +27 -27
- package/dist/{errors-DuFqGrjo.js.map → errors-KM-yq2MD.js.map} +1 -1
- package/dist/{getItem-DPapr9uy.js → getItem-Bh0zv-o1.js} +4 -4
- package/dist/{getItem-DPapr9uy.js.map → getItem-Bh0zv-o1.js.map} +1 -1
- package/dist/{getPublishPayload-Dnv38ZW1.js → getPublishPayload-oH8wJhnH.js} +13 -13
- package/dist/{getPublishPayload-Dnv38ZW1.js.map → getPublishPayload-oH8wJhnH.js.map} +1 -1
- package/dist/{getPublishUploads-Dd7dCxNi.js → getPublishUploads-Cex-NBe6.js} +6 -6
- package/dist/{getPublishUploads-Dd7dCxNi.js.map → getPublishUploads-Cex-NBe6.js.map} +1 -1
- package/dist/{index-CTidoFhC.js → index-BAao3_Po.js} +8 -8
- package/dist/index-BAao3_Po.js.map +1 -0
- package/dist/{index-PnK3Ak9Z.js → index-BbFwftAv.js} +2 -2
- package/dist/index-BbFwftAv.js.map +1 -0
- package/dist/{index-DeUHrBqA.js → index-DpgQMIRq.js} +2 -2
- package/dist/{index-DeUHrBqA.js.map → index-DpgQMIRq.js.map} +1 -1
- package/dist/{index.browser-CRvkFEhl.js → index.browser-nndbVM7z.js} +10 -12
- package/dist/index.browser-nndbVM7z.js.map +1 -0
- package/dist/{index.node-DQTc7kEl.js → index.node-BUfx-JaP.js} +6 -6
- package/dist/{index.node-DQTc7kEl.js.map → index.node-BUfx-JaP.js.map} +1 -1
- package/dist/main.js +22 -22
- package/dist/node.js +12 -12
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-Dk_5t4-p.js → property-BDBvImLs.js} +6 -6
- package/dist/{property-Dk_5t4-p.js.map → property-BDBvImLs.js.map} +1 -1
- package/dist/{propertyValidationRules-BtUZdfft.js → propertyValidationRules-BlfLn4rP.js} +6 -6
- package/dist/{propertyValidationRules-BtUZdfft.js.map → propertyValidationRules-BlfLn4rP.js.map} +1 -1
- package/dist/{publishDraftGraph-CN7EsPVb.js → publishDraftGraph-CLO85LLz.js} +6 -6
- package/dist/{publishDraftGraph-CN7EsPVb.js.map → publishDraftGraph-CLO85LLz.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.js → resetAmbiguousLegacyItemData-Cy8ik7xk.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.js.map → resetAmbiguousLegacyItemData-Cy8ik7xk.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-C_BzNN8r.js → resolveModelForSyncedSeed-DFr4COc4.js} +4 -4
- package/dist/resolveModelForSyncedSeed-DFr4COc4.js.map +1 -0
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/db/read/resolveModelForSyncedSeed.d.ts +2 -2
- package/dist/src/node/helpers/scripts.d.ts +1 -1
- package/dist/{syncDbWithEas-BMmxPq5o.js → syncDbWithEas-CAOlw3i-.js} +13 -13
- package/dist/{syncDbWithEas-BMmxPq5o.js.map → syncDbWithEas-CAOlw3i-.js.map} +1 -1
- package/dist/{tabEvents-DyGJcILs.js → tabEvents-DksXwk3X.js} +4 -4
- package/dist/{tabEvents-DyGJcILs.js.map → tabEvents-DksXwk3X.js.map} +1 -1
- package/dist/{tolerantWebAccess-Zxy2EUzu.js → tolerantWebAccess-CEIjFGf0.js} +6 -6
- package/dist/{tolerantWebAccess-Zxy2EUzu.js.map → tolerantWebAccess-CEIjFGf0.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-DxhC4ABM.js → updateSeedRevokedAt-Cjr35YjE.js} +3 -3
- package/dist/{updateSeedRevokedAt-DxhC4ABM.js.map → updateSeedRevokedAt-Cjr35YjE.js.map} +1 -1
- package/package.json +6 -6
- package/dist/dist/backfillMetadataPropertyIds-qoVxUEEl.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CazqABrK.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-yatbnC27.d.ts.map +0 -1
- package/dist/dist/discardNewDraft-q1krLqtL.d.ts.map +0 -1
- package/dist/dist/eas-CPYt-QVJ.d.ts.map +0 -1
- package/dist/dist/getItem-DPapr9uy.d.ts.map +0 -1
- package/dist/dist/index-CTidoFhC.d.ts.map +0 -1
- package/dist/dist/property-Dk_5t4-p.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-BtUZdfft.d.ts.map +0 -1
- package/dist/dist/resetAmbiguousLegacyItemData-DzVlhD9u.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-C_BzNN8r.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-BMmxPq5o.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-DxhC4ABM.d.ts.map +0 -1
- package/dist/index-CTidoFhC.js.map +0 -1
- package/dist/index-PnK3Ak9Z.js.map +0 -1
- package/dist/index.browser-CRvkFEhl.js.map +0 -1
- package/dist/resolveModelForSyncedSeed-C_BzNN8r.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveModelForSyncedSeed-DFr4COc4.js","sources":["../../src/db/read/resolveModelForSyncedSeed.ts"],"sourcesContent":["import debug from 'debug'\nimport { eventEmitter } from '@/eventBus'\nimport { AmbiguousModelError } from '@/Model/errors'\n\nconst logger = debug('seedSdk:db:read:resolveModelForSyncedSeed')\n\n/** Emitted when background work skips a seed whose model name exists in several schemas. */\nexport const MODEL_AMBIGUOUS_EVENT = 'model:ambiguous' as const\n\nexport type ModelAmbiguousEventPayload = {\n modelName: string\n schemaNames: string[]\n seedLocalId?: string\n seedUid?: string\n /** What was being done when the seed was skipped (e.g. 'easSync.metadata'). */\n context: string\n}\n\nexport type SyncedSeedInfo = {\n seedUid?: string | null\n seedLocalId?: string | null\n /** seeds.type as synced from EAS (the EAS schema name, i.e. snake_case model name). */\n modelType?: string | null\n /** EAS schema UID of the seed attestation. */\n schemaUid?: string | null\n}\n\n/**\n * Seam for matching an EAS-synced seed to a local model (its schemaFileId).\n *\n * EAS identifies a seed's model only by name (`bytes32 <model_name>`), so when several local schemas\n * define a model with that name the seed alone can't say which one it is. The original plan was to\n * match by the seed's properties and metadata; docs/adr/0006-schema-scoped-seeds.md replaced it.\n *\n * TODO(eas-synced-seed-model-resolution): not implemented yet. Returns undefined, so callers fall\n * back to the name, which throws AmbiguousModelError when the name is ambiguous.\n */\nexport const resolveModelForSyncedSeed = async (_seed: SyncedSeedInfo): Promise<string | undefined> => {\n return undefined\n}\n\n/**\n * Run background work for one seed; if it hits an ambiguous model name, log, emit\n * MODEL_AMBIGUOUS_EVENT and return undefined (skip) instead of failing the whole job. Loading the\n * item directly still throws, so the problem surfaces where the app touches it.\n */\nexport const skipSeedOnAmbiguousModel = async <T>(\n seed: { seedLocalId?: string | null; seedUid?: string | null },\n context: string,\n work: () => Promise<T>,\n): Promise<T | undefined> => {\n try {\n return await work()\n } catch (error) {\n if (!(error instanceof AmbiguousModelError)) throw error\n logger(`Skipping seed ${seed.seedLocalId ?? seed.seedUid} in ${context}: ${error.message}`)\n const payload: ModelAmbiguousEventPayload = {\n modelName: error.modelName,\n schemaNames: error.schemaNames,\n seedLocalId: seed.seedLocalId ?? undefined,\n seedUid: seed.seedUid ?? undefined,\n context,\n }\n eventEmitter.emit(MODEL_AMBIGUOUS_EVENT, payload)\n return undefined\n }\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,MAAM,GAAG,KAAK,CAAC,2CAA2C,CAAC;AAEjE;AACO,MAAM,qBAAqB,GAAG;AAoBrC;;;;;;;;;AASG;MACU,yBAAyB,GAAG,OAAO,KAAqB,KAAiC;AACpG,IAAA,OAAO,SAAS;AAClB;AAEA;;;;AAIG;AACI,MAAM,wBAAwB,GAAG,OACtC,IAA8D,EAC9D,OAAe,EACf,IAAsB,KACI;AAC1B,IAAA,IAAI;QAC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5D,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmEvD,wEAAwE;YAC1D,aAAa;IAiB3B,+GAA+G;YACjG,mBAAmB;IAoB3B,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjF;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAS,CAAC,CAAC,EACT,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,GAAG,GAC/B,UAAU,CAAC,CAAC,EAAE,CAAC;CAqCnB;AAED,mCAAmC;AACnC,eAAO,MAAM,EAAE,kBAAY,CAAA"}
|
|
@@ -20,8 +20,8 @@ export type SyncedSeedInfo = {
|
|
|
20
20
|
* Seam for matching an EAS-synced seed to a local model (its schemaFileId).
|
|
21
21
|
*
|
|
22
22
|
* EAS identifies a seed's model only by name (`bytes32 <model_name>`), so when several local schemas
|
|
23
|
-
* define a model with that name the seed alone can't say which one it is. The plan
|
|
24
|
-
* the seed's properties and metadata
|
|
23
|
+
* define a model with that name the seed alone can't say which one it is. The original plan was to
|
|
24
|
+
* match by the seed's properties and metadata; docs/adr/0006-schema-scoped-seeds.md replaced it.
|
|
25
25
|
*
|
|
26
26
|
* TODO(eas-synced-seed-model-resolution): not implemented yet. Returns undefined, so callers fall
|
|
27
27
|
* back to the name, which throws AmbiguousModelError when the name is ambiguous.
|
|
@@ -6,7 +6,7 @@ export declare const commandExists: (command: string) => boolean;
|
|
|
6
6
|
export declare const findSeedBinary: () => string | null;
|
|
7
7
|
/**
|
|
8
8
|
* Ensures the Node app DB exists and SDK migrations are applied.
|
|
9
|
-
* (Formerly `runSeedInit`; CLI spawn / npx fallbacks
|
|
9
|
+
* (Formerly `runSeedInit`; its CLI spawn / npx fallbacks were removed in 0.5.0, see docs/adr/0018-fixed-sdk-tables-no-runtime-codegen.md.)
|
|
10
10
|
*/
|
|
11
11
|
export declare const ensureNodeDbSchema: (_schemaFileDir?: string, appFilesDirPath?: string) => Promise<void>;
|
|
12
12
|
/** @deprecated Use ensureNodeDbSchema */
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { n as normalizeDataType, a9 as INTERNAL_DATA_TYPES, B as BaseDb, s as modelUids, t as models, J as nameMatchLevels, ae as normalizePublisher, C as seeds, af as getAllAddressesFromDb, ag as loadNameMatchLevels, ah as scheduleBulkFilesDownloadFromEasSync, ad as EAS_SEED_DATA_SYNCED_TO_DB_EVENT, ai as generateId, aj as normalizeHexAddress, F as versions, m as metadata, K as getPropertyIdForModelAndName, L as resolveItemModelFileId, aa as listRelationEasPropertyName, ab as easPropertyNameForPublish, ak as toMetadataPropertyName, al as getItemStoragePropertiesForModel } from './index-
|
|
2
|
-
import { r as resolveModelForSyncedSeed, s as skipSeedOnAmbiguousModel } from './resolveModelForSyncedSeed-
|
|
1
|
+
import { n as normalizeDataType, a9 as INTERNAL_DATA_TYPES, B as BaseDb, s as modelUids, t as models, J as nameMatchLevels, ae as normalizePublisher, C as seeds, af as getAllAddressesFromDb, ag as loadNameMatchLevels, ah as scheduleBulkFilesDownloadFromEasSync, ad as EAS_SEED_DATA_SYNCED_TO_DB_EVENT, ai as generateId, aj as normalizeHexAddress, F as versions, m as metadata, K as getPropertyIdForModelAndName, L as resolveItemModelFileId, aa as listRelationEasPropertyName, ab as easPropertyNameForPublish, ak as toMetadataPropertyName, al as getItemStoragePropertiesForModel } from './index-DpgQMIRq.js';
|
|
2
|
+
import { r as resolveModelForSyncedSeed, s as skipSeedOnAmbiguousModel } from './resolveModelForSyncedSeed-DFr4COc4.js';
|
|
3
3
|
import { camelCase } from 'lodash-es';
|
|
4
4
|
import { decodeEasNumber, isNumericEasType, easName, matchEasName, getSeedsFromSchemaUids, getItemVersionsFromEas, partitionByRefAttester, getItemPropertiesFromEas, BaseEasClient, GET_SEEDS, pickLatestPropertyAttestationsByRefAndSchema, setSchemaUidForSchemaDefinition, isNameMatchLevel } from '@seedprotocol/eas';
|
|
5
5
|
import pluralize from 'pluralize';
|
|
6
6
|
import { eq, inArray, and, or, isNull, ne, isNotNull } from 'drizzle-orm';
|
|
7
7
|
import { modelPropertiesToObject } from './model-oHA3YhOd.js';
|
|
8
8
|
import { parseEasPropertyMetadata, parseEasRelationPropertyName } from '@seedprotocol/query';
|
|
9
|
-
import { j as chunkValues, r as rowsPerInsert, k as getGetAdditionalSyncAddresses, s as selectInBatches, w as writeInBatches } from './Item-
|
|
10
|
-
import { u as updateSeedRevokedAt } from './updateSeedRevokedAt-
|
|
11
|
-
import { getModelSchemasFromEas } from './eas-
|
|
12
|
-
import { w as waitForEasReadChain, d as assertLocalDbChain } from './ClientManager-
|
|
13
|
-
import { e as emitAcrossTabs } from './tabEvents-
|
|
9
|
+
import { j as chunkValues, r as rowsPerInsert, k as getGetAdditionalSyncAddresses, s as selectInBatches, w as writeInBatches } from './Item-D6j0IvBP.js';
|
|
10
|
+
import { u as updateSeedRevokedAt } from './updateSeedRevokedAt-Cjr35YjE.js';
|
|
11
|
+
import { getModelSchemasFromEas } from './eas-DOdj-EMK.js';
|
|
12
|
+
import { w as waitForEasReadChain, d as assertLocalDbChain } from './ClientManager-2GtDWHq6.js';
|
|
13
|
+
import { e as emitAcrossTabs } from './tabEvents-DksXwk3X.js';
|
|
14
14
|
import 'debug';
|
|
15
15
|
import '@seedprotocol/arweave';
|
|
16
16
|
import 'xstate';
|
|
@@ -67,7 +67,7 @@ function syncedPropertyValue(dataType, easType, value) {
|
|
|
67
67
|
const schemaStringToModelRecord = new Map();
|
|
68
68
|
const getModelSchemas = async () => {
|
|
69
69
|
// Dynamic import to break circular dependency
|
|
70
|
-
const _mod_0 = await import('./errors-
|
|
70
|
+
const _mod_0 = await import('./errors-KM-yq2MD.js');
|
|
71
71
|
const _ns_0 = _mod_0.j;
|
|
72
72
|
const modelMod = _ns_0;
|
|
73
73
|
const { Model } = modelMod;
|
|
@@ -287,7 +287,7 @@ const modelSchemaForSyncedProperty = async (Model, property, state) => {
|
|
|
287
287
|
* only newly stored ones, so related seeds are refreshed (new versions, revocations) on each sync.
|
|
288
288
|
*/
|
|
289
289
|
const collectRelatedSeedUids = async (properties, state) => {
|
|
290
|
-
const _mod_1 = await import('./errors-
|
|
290
|
+
const _mod_1 = await import('./errors-KM-yq2MD.js');
|
|
291
291
|
const _ns_1 = _mod_1.j;
|
|
292
292
|
const { Model } = _ns_1;
|
|
293
293
|
for (const property of properties) {
|
|
@@ -344,7 +344,7 @@ const isSqlEscapedAttestationRaw = (stored, fresh) => {
|
|
|
344
344
|
* of HTMLPage have. A name matching no local model, or several, is kept as it is.
|
|
345
345
|
*/
|
|
346
346
|
const localModelType = async (easModelName) => {
|
|
347
|
-
const _mod_2 = await import('./errors-
|
|
347
|
+
const _mod_2 = await import('./errors-KM-yq2MD.js');
|
|
348
348
|
const _ns_2 = _mod_2.j;
|
|
349
349
|
const { Model } = _ns_2;
|
|
350
350
|
try {
|
|
@@ -745,7 +745,7 @@ const resolveSyncedSeedModel = async (Model, modelType, seed) => {
|
|
|
745
745
|
const insertSyncedProperties = async ({ newProperties, itemSeeds, state, }) => {
|
|
746
746
|
const { seedUidToLocalId, seedUidToModelType, versionUidToLocalId, versionUidToSeedUid } = state;
|
|
747
747
|
// Dynamic import to break circular dependency
|
|
748
|
-
const _mod_3 = await import('./errors-
|
|
748
|
+
const _mod_3 = await import('./errors-KM-yq2MD.js');
|
|
749
749
|
const _ns_3 = _mod_3.j;
|
|
750
750
|
const modelMod = _ns_3;
|
|
751
751
|
const { Model } = modelMod;
|
|
@@ -1030,7 +1030,7 @@ const runSyncFromEas = async (options) => {
|
|
|
1030
1030
|
await getRelatedSeedsAndVersions(state);
|
|
1031
1031
|
scheduleBulkFilesDownloadFromEasSync(addresses);
|
|
1032
1032
|
try {
|
|
1033
|
-
const _mod_4 = await import('./Item-
|
|
1033
|
+
const _mod_4 = await import('./Item-D6j0IvBP.js');
|
|
1034
1034
|
const _ns_4 = _mod_4.a6;
|
|
1035
1035
|
const itemMod = _ns_4;
|
|
1036
1036
|
await itemMod.Item.rehydrateCachedItemsFromDbAfterEasSync();
|
|
@@ -1043,4 +1043,4 @@ const runSyncFromEas = async (options) => {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
|
|
1045
1045
|
export { VERSION_INSERT_BATCH, isSqlEscapedAttestationRaw, runSyncFromEas };
|
|
1046
|
-
//# sourceMappingURL=syncDbWithEas-
|
|
1046
|
+
//# sourceMappingURL=syncDbWithEas-CAOlw3i-.js.map
|