@seedprotocol/sdk 0.6.5 → 0.6.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/{BasePathResolver-BGxb4Qod.js → BasePathResolver-qV0apdVY.js} +124 -2
- package/dist/BasePathResolver-qV0apdVY.js.map +1 -0
- package/dist/{index-BMeU7u_g.js → ClientManager-Y5EWQuJj.js} +1517 -5491
- package/dist/ClientManager-Y5EWQuJj.js.map +1 -0
- package/dist/{ModelProperty-BKvUJGud.js → ModelProperty-DuB5nk6A.js} +33 -30
- package/dist/ModelProperty-DuB5nk6A.js.map +1 -0
- package/dist/{Schema-BBh7ZhRk.js → Schema-BYM-GNdE.js} +40 -39
- package/dist/{Schema-BBh7ZhRk.js.map → Schema-BYM-GNdE.js.map} +1 -1
- package/dist/{SchemaValidationService-BnJ43zov.js → SchemaValidationService-Dr6nmwPm.js} +12 -9
- package/dist/{SchemaValidationService-BnJ43zov.js.map → SchemaValidationService-Dr6nmwPm.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-BEryy6Mu.js → backfillMetadataPropertyIds-BzbAB-C5.js} +4 -3
- package/dist/{backfillMetadataPropertyIds-BEryy6Mu.js.map → backfillMetadataPropertyIds-BzbAB-C5.js.map} +1 -1
- package/dist/cjs/{ModelProperty-CGjXNHFW.js → ModelProperty-CDTOx5zi.js} +21 -20
- package/dist/cjs/{ModelProperty-CGjXNHFW.js.map → ModelProperty-CDTOx5zi.js.map} +1 -1
- package/dist/cjs/{Schema-CLMqGTHn.js → Schema-XXcwj3hV.js} +24 -23
- package/dist/cjs/{Schema-CLMqGTHn.js.map → Schema-XXcwj3hV.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-BnS8o5FK.js → SchemaValidationService-Z7OhtGn5.js} +6 -5
- package/dist/cjs/{SchemaValidationService-BnS8o5FK.js.map → SchemaValidationService-Z7OhtGn5.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-B3xNIFjQ.js → backfillMetadataPropertyIds-Bt4fzfIV.js} +6 -5
- package/dist/cjs/{backfillMetadataPropertyIds-B3xNIFjQ.js.map → backfillMetadataPropertyIds-Bt4fzfIV.js.map} +1 -1
- package/dist/cjs/{eas-wqfFyiti.js → eas-DdI-4vwl.js} +31 -6
- package/dist/cjs/eas-DdI-4vwl.js.map +1 -0
- package/dist/cjs/{getItem-BbEWSf4-.js → getItem-B_2GeTQf.js} +5 -4
- package/dist/cjs/{getItem-BbEWSf4-.js.map → getItem-B_2GeTQf.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-i3UrBhza.js → getPublishPayload-Jmgi1RUj.js} +13 -12
- package/dist/cjs/getPublishPayload-Jmgi1RUj.js.map +1 -0
- package/dist/cjs/{getPublishUploads-CHhrLQmE.js → getPublishUploads-DNULcrN5.js} +8 -7
- package/dist/cjs/{getPublishUploads-CHhrLQmE.js.map → getPublishUploads-DNULcrN5.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-ZlOTqI0r.js → getSegmentedItemProperties-DK82kjri.js} +3 -3
- package/dist/cjs/{getSegmentedItemProperties-ZlOTqI0r.js.map → getSegmentedItemProperties-DK82kjri.js.map} +1 -1
- package/dist/cjs/{index-Bx8ReSFI.js → index-DM1WR83P.js} +5148 -4967
- package/dist/cjs/index-DM1WR83P.js.map +1 -0
- package/dist/cjs/{index-DBGNShZR.js → index-tpO1Nj4v.js} +7 -6
- package/dist/cjs/index-tpO1Nj4v.js.map +1 -0
- package/dist/cjs/{property-CWZoijFu.js → property-DmvgA8FD.js} +8 -7
- package/dist/cjs/{property-CWZoijFu.js.map → property-DmvgA8FD.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-DRbf_wzk.js → syncDbWithEas-3hOoPdu1.js} +9 -8
- package/dist/cjs/{syncDbWithEas-DRbf_wzk.js.map → syncDbWithEas-3hOoPdu1.js.map} +1 -1
- package/dist/{configurePlatform-bGvKBBQy.js → configurePlatform-CCYQruij.js} +6 -3
- package/dist/{configurePlatform-bGvKBBQy.js.map → configurePlatform-CCYQruij.js.map} +1 -1
- package/dist/constants-DSqHBPNe.js +1347 -0
- package/dist/constants-DSqHBPNe.js.map +1 -0
- package/dist/{db-CbeA8ykN.js → db-CceyWksv.js} +29 -35
- package/dist/{db-CbeA8ykN.js.map → db-CceyWksv.js.map} +1 -1
- package/dist/{eas-CDANhqoz.js → eas-CH8iFIST.js} +9 -6
- package/dist/eas-CH8iFIST.js.map +1 -0
- package/dist/generateId-BopUwD8F.js +9 -0
- package/dist/generateId-BopUwD8F.js.map +1 -0
- package/dist/{getItem-CUOCDTe8.js → getItem-C7Mtfz6O.js} +11 -9
- package/dist/{getItem-CUOCDTe8.js.map → getItem-C7Mtfz6O.js.map} +1 -1
- package/dist/{getPublishPayload-0ntIkzv8.js → getPublishPayload-2gnnDdMh.js} +23 -20
- package/dist/getPublishPayload-2gnnDdMh.js.map +1 -0
- package/dist/{getPublishUploads-DLeAkS2m.js → getPublishUploads-AKISt3JA.js} +14 -11
- package/dist/{getPublishUploads-DLeAkS2m.js.map → getPublishUploads-AKISt3JA.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-C0rMewcl.js → getSegmentedItemProperties-eIjvhCP_.js} +5 -5
- package/dist/{getSegmentedItemProperties-C0rMewcl.js.map → getSegmentedItemProperties-eIjvhCP_.js.map} +1 -1
- package/dist/index-BFpbtEsg.js +3492 -0
- package/dist/index-BFpbtEsg.js.map +1 -0
- package/dist/{index-CQIlolE1.js → index-CHi212ST.js} +15 -12
- package/dist/index-CHi212ST.js.map +1 -0
- package/dist/{index-C_5xwOPQ.js → index-CsmiM0RI.js} +2 -2
- package/dist/index-CsmiM0RI.js.map +1 -0
- package/dist/{index.node-DkpiPLbZ.js → index.node-CbWB4MDz.js} +4 -5
- package/dist/{index.node-DkpiPLbZ.js.map → index.node-CbWB4MDz.js.map} +1 -1
- package/dist/main.cjs +5 -4
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +33 -31
- package/dist/main.js.map +1 -1
- package/dist/model-DGMe-TTm.js +25 -0
- package/dist/model-DGMe-TTm.js.map +1 -0
- package/dist/node.js +19 -16
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +177 -43
- package/dist/platform.browser.js.map +1 -1
- package/dist/platform.node.js +4 -5
- package/dist/platform.node.js.map +1 -1
- package/dist/{property-B-9szEcZ.js → property-CWKcZ5YZ.js} +18 -16
- package/dist/property-CWKcZ5YZ.js.map +1 -0
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts.map +1 -1
- package/dist/src/browser/db/Db.d.ts +1 -1
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/db/createSqlocalDrizzle.d.ts +21 -0
- package/dist/src/browser/db/createSqlocalDrizzle.d.ts.map +1 -0
- package/dist/src/browser/db/embeddedMigrations.d.ts +17 -0
- package/dist/src/browser/db/embeddedMigrations.d.ts.map +1 -0
- package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
- package/dist/src/eas.d.ts +2 -2
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts +1 -1
- package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts.map +1 -1
- package/dist/src/helpers/constants.d.ts +1 -2
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/crypto.d.ts +3 -2
- package/dist/src/helpers/crypto.d.ts.map +1 -1
- package/dist/src/helpers/ensureImageLocal.d.ts +24 -0
- package/dist/src/helpers/ensureImageLocal.d.ts.map +1 -0
- package/dist/src/helpers/ethereumUtils.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +10 -2
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CNBuYKo_.js → syncDbWithEas-5kZneTEL.js} +19 -17
- package/dist/syncDbWithEas-5kZneTEL.js.map +1 -0
- package/dist/{updateSeedRevokedAt-D5ZbBehZ.js → updateSeedRevokedAt-CgfOBtqJ.js} +2 -2
- package/dist/{updateSeedRevokedAt-D5ZbBehZ.js.map → updateSeedRevokedAt-CgfOBtqJ.js.map} +1 -1
- package/package.json +6 -6
- package/dist/BasePathResolver-BGxb4Qod.js.map +0 -1
- package/dist/ModelProperty-BKvUJGud.js.map +0 -1
- package/dist/cjs/eas-wqfFyiti.js.map +0 -1
- package/dist/cjs/getPublishPayload-i3UrBhza.js.map +0 -1
- package/dist/cjs/index-Bx8ReSFI.js.map +0 -1
- package/dist/cjs/index-DBGNShZR.js.map +0 -1
- package/dist/constants-Bre6dTJR.js +0 -122
- package/dist/constants-Bre6dTJR.js.map +0 -1
- package/dist/constants-CTs2RUrM.js +0 -657
- package/dist/constants-CTs2RUrM.js.map +0 -1
- package/dist/eas-CDANhqoz.js.map +0 -1
- package/dist/getPublishPayload-0ntIkzv8.js.map +0 -1
- package/dist/index-BMeU7u_g.js.map +0 -1
- package/dist/index-CQIlolE1.js.map +0 -1
- package/dist/index-C_5xwOPQ.js.map +0 -1
- package/dist/property-B-9szEcZ.js.map +0 -1
- package/dist/syncDbWithEas-CNBuYKo_.js.map +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import {
|
|
3
|
-
import { C as ClientManagerState } from './constants-
|
|
4
|
-
import {
|
|
5
|
-
import { a as BaseDb, s as schemas, m as models, i as modelSchemas, p as properties, B as BaseFileManager } from './BasePathResolver-
|
|
2
|
+
import { h as getRefValueType, ab as createModelsFromJson, Q as listCompleteSchemaFiles, ac as getLatestSchemaVersion, ad as createModelFromJson, l as loadSchemaFromFile, w as waitForEntityIdle, k as createReactiveProxy, m as findEntity, R as loadAllSchemasFromDb, B as getClient, a9 as unloadEntity, aa as clearDestroySubscriptions, n as forceRemoveFromCaches, o as runDestroyLifecycle } from './ClientManager-Y5EWQuJj.js';
|
|
3
|
+
import { C as ClientManagerState } from './constants-DSqHBPNe.js';
|
|
4
|
+
import { l as addSchemaToDb, c as addModelsToDb, m as loadModelsFromDbForSchema } from './db-CceyWksv.js';
|
|
5
|
+
import { D as SEED_PROTOCOL_SCHEMA_NAME, a as BaseDb, s as schemas, m as models, i as modelSchemas, p as properties, B as BaseFileManager, G as isInternalSchema } from './BasePathResolver-qV0apdVY.js';
|
|
6
6
|
import { eq, desc, and } from 'drizzle-orm';
|
|
7
7
|
import debug from 'debug';
|
|
8
|
-
import {
|
|
9
|
-
import { SchemaValidationService } from './SchemaValidationService-
|
|
8
|
+
import { generateId } from './generateId-BopUwD8F.js';
|
|
9
|
+
import { SchemaValidationService } from './SchemaValidationService-Dr6nmwPm.js';
|
|
10
|
+
import { M as Model, w as writeProcessMachine, C as ConflictError, s as setupEntityLiveQuery } from './index-BFpbtEsg.js';
|
|
10
11
|
import 'pluralize';
|
|
11
12
|
|
|
12
13
|
const logger$d = debug('seedSdk:schema:actors:loadOrCreateSchema');
|
|
@@ -51,8 +52,8 @@ const createModelInstances$2 = async (modelIds) => {
|
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
54
|
try {
|
|
54
|
-
const _mod_0 = await import('./index-
|
|
55
|
-
const _ns_0 = _mod_0.
|
|
55
|
+
const _mod_0 = await import('./index-BFpbtEsg.js');
|
|
56
|
+
const _ns_0 = _mod_0.b;
|
|
56
57
|
const modelMod = _ns_0;
|
|
57
58
|
const { Model } = modelMod;
|
|
58
59
|
// Create instances for all model IDs in parallel
|
|
@@ -166,8 +167,8 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
166
167
|
// For Seed Protocol, always load from internal file, never create new
|
|
167
168
|
logger$d(`Loading internal Seed Protocol schema from SDK`);
|
|
168
169
|
try {
|
|
169
|
-
const _mod_1 = await import('./
|
|
170
|
-
const _ns_1 = _mod_1.
|
|
170
|
+
const _mod_1 = await import('./ClientManager-Y5EWQuJj.js');
|
|
171
|
+
const _ns_1 = _mod_1.ah;
|
|
171
172
|
const internalSchema = _ns_1;
|
|
172
173
|
const schemaFile = internalSchema.default;
|
|
173
174
|
// Check if it exists in database, if not, add it
|
|
@@ -661,8 +662,8 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
661
662
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
662
663
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
663
664
|
try {
|
|
664
|
-
const _mod_2 = await import('./
|
|
665
|
-
const _ns_2 = _mod_2.
|
|
665
|
+
const _mod_2 = await import('./ClientManager-Y5EWQuJj.js');
|
|
666
|
+
const _ns_2 = _mod_2.ah;
|
|
666
667
|
const internalSchema = _ns_2;
|
|
667
668
|
const internalSchemaFile = internalSchema.default;
|
|
668
669
|
mergedModels = { ...(internalSchemaFile.models || {}) };
|
|
@@ -890,8 +891,8 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
890
891
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
891
892
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
892
893
|
try {
|
|
893
|
-
const _mod_3 = await import('./
|
|
894
|
-
const _ns_3 = _mod_3.
|
|
894
|
+
const _mod_3 = await import('./ClientManager-Y5EWQuJj.js');
|
|
895
|
+
const _ns_3 = _mod_3.ah;
|
|
895
896
|
const internalSchema = _ns_3;
|
|
896
897
|
const internalSchemaFile = internalSchema.default;
|
|
897
898
|
mergedModels = { ...(internalSchemaFile.models || {}) };
|
|
@@ -981,8 +982,8 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
981
982
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
982
983
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
983
984
|
try {
|
|
984
|
-
const _mod_4 = await import('./
|
|
985
|
-
const _ns_4 = _mod_4.
|
|
985
|
+
const _mod_4 = await import('./ClientManager-Y5EWQuJj.js');
|
|
986
|
+
const _ns_4 = _mod_4.ah;
|
|
986
987
|
const internalSchema = _ns_4;
|
|
987
988
|
const internalSchemaFile = internalSchema.default;
|
|
988
989
|
mergedModels = { ...(internalSchemaFile.models || {}) };
|
|
@@ -1069,8 +1070,8 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1069
1070
|
// If schemaData is missing, try to load from internal schema file for seed-protocol
|
|
1070
1071
|
if (!dbSchema.schemaData && schemaName === 'Seed Protocol') {
|
|
1071
1072
|
try {
|
|
1072
|
-
const _mod_5 = await import('./
|
|
1073
|
-
const _ns_5 = _mod_5.
|
|
1073
|
+
const _mod_5 = await import('./ClientManager-Y5EWQuJj.js');
|
|
1074
|
+
const _ns_5 = _mod_5.ah;
|
|
1074
1075
|
const internalSchema = _ns_5;
|
|
1075
1076
|
const schemaFile = internalSchema.default;
|
|
1076
1077
|
logger$d(`Found seed-protocol schema in internal file (schemaData missing, using internal schema)`);
|
|
@@ -1180,8 +1181,8 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1180
1181
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
1181
1182
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
1182
1183
|
try {
|
|
1183
|
-
const _mod_6 = await import('./
|
|
1184
|
-
const _ns_6 = _mod_6.
|
|
1184
|
+
const _mod_6 = await import('./ClientManager-Y5EWQuJj.js');
|
|
1185
|
+
const _ns_6 = _mod_6.ah;
|
|
1185
1186
|
const internalSchema = _ns_6;
|
|
1186
1187
|
const internalSchemaFile = internalSchema.default;
|
|
1187
1188
|
mergedModels = { ...(internalSchemaFile.models || {}) };
|
|
@@ -2083,8 +2084,8 @@ const createModelInstances$1 = async (modelIds) => {
|
|
|
2083
2084
|
return;
|
|
2084
2085
|
}
|
|
2085
2086
|
try {
|
|
2086
|
-
const _mod_7 = await import('./index-
|
|
2087
|
-
const _ns_7 = _mod_7.
|
|
2087
|
+
const _mod_7 = await import('./index-BFpbtEsg.js');
|
|
2088
|
+
const _ns_7 = _mod_7.b;
|
|
2088
2089
|
const mod = _ns_7;
|
|
2089
2090
|
const Model = mod?.Model ?? mod?.default;
|
|
2090
2091
|
if (!Model) {
|
|
@@ -2130,8 +2131,8 @@ const checkExistingSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2130
2131
|
if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
2131
2132
|
// For Seed Protocol, check if it exists in database
|
|
2132
2133
|
try {
|
|
2133
|
-
const _mod_8 = await import('./
|
|
2134
|
-
const _ns_8 = _mod_8.
|
|
2134
|
+
const _mod_8 = await import('./ClientManager-Y5EWQuJj.js');
|
|
2135
|
+
const _ns_8 = _mod_8.ah;
|
|
2135
2136
|
const internalSchema = _ns_8;
|
|
2136
2137
|
const schemaFile = internalSchema.default;
|
|
2137
2138
|
if (db && schemaFile.id) {
|
|
@@ -2490,8 +2491,8 @@ const writeSchemaToDb = fromCallback(({ sendBack, input }) => {
|
|
|
2490
2491
|
if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
2491
2492
|
// For Seed Protocol, load from internal file
|
|
2492
2493
|
logger$b(`Loading internal Seed Protocol schema from SDK`);
|
|
2493
|
-
const _mod_9 = await import('./
|
|
2494
|
-
const _ns_9 = _mod_9.
|
|
2494
|
+
const _mod_9 = await import('./ClientManager-Y5EWQuJj.js');
|
|
2495
|
+
const _ns_9 = _mod_9.ah;
|
|
2495
2496
|
const internalSchema = _ns_9;
|
|
2496
2497
|
finalSchema = internalSchema.default;
|
|
2497
2498
|
const db = BaseDb.getAppDb();
|
|
@@ -2960,8 +2961,8 @@ const createModelInstances = fromCallback(({ sendBack, input }) => {
|
|
|
2960
2961
|
return;
|
|
2961
2962
|
}
|
|
2962
2963
|
try {
|
|
2963
|
-
const _mod_10 = await import('./index-
|
|
2964
|
-
const _ns_10 = _mod_10.
|
|
2964
|
+
const _mod_10 = await import('./index-BFpbtEsg.js');
|
|
2965
|
+
const _ns_10 = _mod_10.b;
|
|
2965
2966
|
const modelMod = _ns_10;
|
|
2966
2967
|
const { Model } = modelMod;
|
|
2967
2968
|
// Create instances for all model IDs in parallel
|
|
@@ -3048,8 +3049,8 @@ const verifyModelInstancesInCache = fromCallback(({ sendBack, input }) => {
|
|
|
3048
3049
|
}
|
|
3049
3050
|
try {
|
|
3050
3051
|
const result = await verifyWithRetry$2(async () => {
|
|
3051
|
-
const _mod_11 = await import('./index-
|
|
3052
|
-
const _ns_11 = _mod_11.
|
|
3052
|
+
const _mod_11 = await import('./index-BFpbtEsg.js');
|
|
3053
|
+
const _ns_11 = _mod_11.b;
|
|
3053
3054
|
const modelMod = _ns_11;
|
|
3054
3055
|
const { Model } = modelMod;
|
|
3055
3056
|
// Check each model ID in the cache
|
|
@@ -3107,7 +3108,7 @@ const writePropertiesToDb = fromCallback(({ sendBack, input }) => {
|
|
|
3107
3108
|
const _write = async () => {
|
|
3108
3109
|
const { modelIds } = input;
|
|
3109
3110
|
try {
|
|
3110
|
-
const _mod_12 = await import('./BasePathResolver-
|
|
3111
|
+
const _mod_12 = await import('./BasePathResolver-qV0apdVY.js');
|
|
3111
3112
|
const _ns_12 = _mod_12.M;
|
|
3112
3113
|
const modelSchemaMod = _ns_12;
|
|
3113
3114
|
const { models: modelsTable, properties: propertiesTable } = modelSchemaMod;
|
|
@@ -3297,10 +3298,10 @@ const createPropertyInstances = fromCallback(({ sendBack, input }) => {
|
|
|
3297
3298
|
return;
|
|
3298
3299
|
}
|
|
3299
3300
|
try {
|
|
3300
|
-
const modProp = await import('./ModelProperty-
|
|
3301
|
+
const modProp = await import('./ModelProperty-DuB5nk6A.js');
|
|
3301
3302
|
const ModelProperty = modProp?.ModelProperty ?? modProp?.default;
|
|
3302
|
-
const _mod_13 = await import('./index-
|
|
3303
|
-
const _ns_13 = _mod_13.
|
|
3303
|
+
const _mod_13 = await import('./index-BFpbtEsg.js');
|
|
3304
|
+
const _ns_13 = _mod_13.b;
|
|
3304
3305
|
const modModel = _ns_13;
|
|
3305
3306
|
const Model = modModel?.Model ?? modModel?.default;
|
|
3306
3307
|
if (!ModelProperty || !Model) {
|
|
@@ -3406,7 +3407,7 @@ const verifyPropertyInstancesInCache = fromCallback(({ sendBack, input }) => {
|
|
|
3406
3407
|
}
|
|
3407
3408
|
try {
|
|
3408
3409
|
const result = await verifyWithRetry(async () => {
|
|
3409
|
-
const mod = await import('./ModelProperty-
|
|
3410
|
+
const mod = await import('./ModelProperty-DuB5nk6A.js');
|
|
3410
3411
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
3411
3412
|
if (!ModelProperty) {
|
|
3412
3413
|
throw new Error('ModelProperty not available from dynamic import');
|
|
@@ -4428,7 +4429,7 @@ async function loadSchemaWithRenames(schemaFilePath, modelRenames) {
|
|
|
4428
4429
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
4429
4430
|
};
|
|
4430
4431
|
// Use dynamic import to break circular dependency
|
|
4431
|
-
const _mod_14 = await import('./db-
|
|
4432
|
+
const _mod_14 = await import('./db-CceyWksv.js');
|
|
4432
4433
|
const _ns_14 = _mod_14.q;
|
|
4433
4434
|
const dbMod = _ns_14;
|
|
4434
4435
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
@@ -4541,7 +4542,7 @@ async function renameModelProperty(schemaName, modelName, oldPropertyName, newPr
|
|
|
4541
4542
|
await BaseFileManager.waitForFileWithContent(newFilePath);
|
|
4542
4543
|
logger$1(`Renamed property ${oldPropertyName} to ${newPropertyName} in schema ${schemaName} v${newVersion}`);
|
|
4543
4544
|
// Migrate metadata rows so ItemProperty values follow the new name (prevents duplicate ItemProperties)
|
|
4544
|
-
const _mod_15 = await import('./db-
|
|
4545
|
+
const _mod_15 = await import('./db-CceyWksv.js');
|
|
4545
4546
|
const _ns_15 = _mod_15.q;
|
|
4546
4547
|
const { migrateMetadataForPropertyRename } = _ns_15;
|
|
4547
4548
|
const migratedCount = await migrateMetadataForPropertyRename(modelName, oldPropertyName, newPropertyName, oldProperty.id);
|
|
@@ -5752,7 +5753,7 @@ class Schema {
|
|
|
5752
5753
|
_dbVersion: publishedSchema.version,
|
|
5753
5754
|
});
|
|
5754
5755
|
// Clear edited flags on all ModelProperty instances and in database
|
|
5755
|
-
const modelPropertyMod = await import('./ModelProperty-
|
|
5756
|
+
const modelPropertyMod = await import('./ModelProperty-DuB5nk6A.js');
|
|
5756
5757
|
const { ModelProperty } = modelPropertyMod;
|
|
5757
5758
|
for (const propertyKey of context._editedProperties) {
|
|
5758
5759
|
const [modelName, propertyName] = propertyKey.split(':');
|
|
@@ -6555,4 +6556,4 @@ var Schema$1 = /*#__PURE__*/Object.freeze({
|
|
|
6555
6556
|
});
|
|
6556
6557
|
|
|
6557
6558
|
export { Schema as S, deletePropertyFromModel as a, Schema$1 as b, deleteModelFromSchema as d, renameModelProperty as r, schemaMachine as s, updateModelProperties as u };
|
|
6558
|
-
//# sourceMappingURL=Schema-
|
|
6559
|
+
//# sourceMappingURL=Schema-BYM-GNdE.js.map
|