@seedprotocol/sdk 0.7.11-next.1384.g8b47246 → 0.7.11

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.
Files changed (122) hide show
  1. package/dist/{BaseFileManager-DLou1TZS.js → BaseFileManager-D-pLXQAp.js} +2 -14
  2. package/dist/BaseFileManager-D-pLXQAp.js.map +1 -0
  3. package/dist/{Item-Ld1iPicQ.js → Item-BU9wIT7l.js} +61 -59
  4. package/dist/Item-BU9wIT7l.js.map +1 -0
  5. package/dist/{ModelProperty-C8gTx4pO.js → ModelProperty-Bv7KzP97.js} +40 -37
  6. package/dist/ModelProperty-Bv7KzP97.js.map +1 -0
  7. package/dist/{Schema-BzeBUZxi.js → Schema-C_4wv0RP.js} +22 -22
  8. package/dist/{Schema-BzeBUZxi.js.map → Schema-C_4wv0RP.js.map} +1 -1
  9. package/dist/{SchemaValidationService-CW0s7V7R.js → SchemaValidationService-Dc-lpFQX.js} +9 -6
  10. package/dist/{SchemaValidationService-CW0s7V7R.js.map → SchemaValidationService-Dc-lpFQX.js.map} +1 -1
  11. package/dist/{tabEvents-BnBzIdEi.js → arweaveContentTags-iW_HcWJA.js} +53 -5
  12. package/dist/arweaveContentTags-iW_HcWJA.js.map +1 -0
  13. package/dist/{configurePlatform-WkmvqeTO.js → configurePlatform-BH1YOZpg.js} +2 -2
  14. package/dist/{configurePlatform-WkmvqeTO.js.map → configurePlatform-BH1YOZpg.js.map} +1 -1
  15. package/dist/db/drizzle/0030_drop_property_uids.sql +1 -0
  16. package/dist/db/drizzle/meta/0030_snapshot.json +1638 -0
  17. package/dist/db/drizzle/meta/_journal.json +8 -1
  18. package/dist/{detachRowsBeforeDelete-BZr_0iZU.js → detachRowsBeforeDelete-Cie55SoG.js} +4 -6
  19. package/dist/detachRowsBeforeDelete-Cie55SoG.js.map +1 -0
  20. package/dist/dist/{BaseFileManager-DLou1TZS.d.ts → BaseFileManager-D-pLXQAp.d.ts} +432 -495
  21. package/dist/dist/BaseFileManager-D-pLXQAp.d.ts.map +1 -0
  22. package/dist/dist/{configurePlatform-WkmvqeTO.d.ts → configurePlatform-BH1YOZpg.d.ts} +1 -1
  23. package/dist/dist/configurePlatform-BH1YOZpg.d.ts.map +1 -0
  24. package/dist/dist/{index-BjWk0x4-.d.ts → index-2PaIhvOU.d.ts} +1 -64
  25. package/dist/dist/{index-BjWk0x4-.d.ts.map → index-2PaIhvOU.d.ts.map} +1 -1
  26. package/dist/dist/{index.node-DV1OXCp0.d.ts → index.node-C3rI1upv.d.ts} +1 -253
  27. package/dist/dist/{index.node-DV1OXCp0.d.ts.map → index.node-C3rI1upv.d.ts.map} +1 -1
  28. package/dist/dist/minimumUpgradeVersion-Dg2MguFf.d.ts +20 -0
  29. package/dist/dist/minimumUpgradeVersion-Dg2MguFf.d.ts.map +1 -0
  30. package/dist/dist/platform.node.d.ts +2 -2
  31. package/dist/{download-Cvac_VGu.js → download-DHWUPLlK.js} +4 -5
  32. package/dist/{download-Cvac_VGu.js.map → download-DHWUPLlK.js.map} +1 -1
  33. package/dist/{eas-CdhfODXL.js → eas-MXEdKKVc.js} +10 -7
  34. package/dist/{eas-CdhfODXL.js.map → eas-MXEdKKVc.js.map} +1 -1
  35. package/dist/{ensureImageLocal-DNM6c2yD.js → ensureImageLocal-B6suz6FC.js} +8 -9
  36. package/dist/{ensureImageLocal-DNM6c2yD.js.map → ensureImageLocal-B6suz6FC.js.map} +1 -1
  37. package/dist/{getPublishPayload-CLrAcZwr.js → getPublishPayload-Dd3HCYeI.js} +8 -49
  38. package/dist/getPublishPayload-Dd3HCYeI.js.map +1 -0
  39. package/dist/{getPublishPendingDiff-DiPff8pS.js → getPublishPendingDiff-kcTP52Kj.js} +11 -9
  40. package/dist/{getPublishPendingDiff-DiPff8pS.js.map → getPublishPendingDiff-kcTP52Kj.js.map} +1 -1
  41. package/dist/{index-BjWk0x4-.js → index-2PaIhvOU.js} +2 -4
  42. package/dist/index-2PaIhvOU.js.map +1 -0
  43. package/dist/{index-9udoYObJ.js → index-BXTyvnKb.js} +11 -8
  44. package/dist/index-BXTyvnKb.js.map +1 -0
  45. package/dist/{index-CghAYA-z.js → index-CmNqUKQN.js} +11 -8
  46. package/dist/index-CmNqUKQN.js.map +1 -0
  47. package/dist/{index-Cdm7Q7el.js → index-Xs_EDi-_.js} +18 -403
  48. package/dist/index-Xs_EDi-_.js.map +1 -0
  49. package/dist/{index.browser-D9oC-KKx.js → index.browser-BkcOQGhw.js} +25 -69
  50. package/dist/index.browser-BkcOQGhw.js.map +1 -0
  51. package/dist/{index.node-DV1OXCp0.js → index.node-C3rI1upv.js} +8 -6
  52. package/dist/index.node-C3rI1upv.js.map +1 -0
  53. package/dist/main.js +19 -22
  54. package/dist/main.js.map +1 -1
  55. package/dist/{minimumUpgradeVersion-BDhHvHtr.js → minimumUpgradeVersion-Dg2MguFf.js} +38 -9
  56. package/dist/minimumUpgradeVersion-Dg2MguFf.js.map +1 -0
  57. package/dist/{modelPropertyRecordSchemas-se4QMXSi.js → modelPropertyRecordSchemas-CEac3FB8.js} +8 -5
  58. package/dist/{modelPropertyRecordSchemas-se4QMXSi.js.map → modelPropertyRecordSchemas-CEac3FB8.js.map} +1 -1
  59. package/dist/node.js +14 -11
  60. package/dist/node.js.map +1 -1
  61. package/dist/platform.browser.js +6 -7
  62. package/dist/platform.browser.js.map +1 -1
  63. package/dist/platform.node.js +5 -5
  64. package/dist/{property-Broz_CWj.js → property-4jSqHieb.js} +11 -8
  65. package/dist/property-4jSqHieb.js.map +1 -0
  66. package/dist/{errors-DKxFSvb3.js → publishErrors-DZXDX3B6.js} +1688 -195
  67. package/dist/publishErrors-DZXDX3B6.js.map +1 -0
  68. package/dist/{readHtmlBodyForStorageSeed-FvwYPn4m.js → readHtmlBodyForStorageSeed-Cva1DPzE.js} +9 -9
  69. package/dist/{readHtmlBodyForStorageSeed-FvwYPn4m.js.map → readHtmlBodyForStorageSeed-Cva1DPzE.js.map} +1 -1
  70. package/dist/seedSchema/index.ts +0 -1
  71. package/dist/src/ItemProperty/ItemProperty.d.ts +1 -0
  72. package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
  73. package/dist/src/browser/db/Db.d.ts.map +1 -1
  74. package/dist/src/browser/db/drizzleFiles.d.ts +3 -2
  75. package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
  76. package/dist/src/db/minimumUpgradeVersion.d.ts +20 -5
  77. package/dist/src/db/minimumUpgradeVersion.d.ts.map +1 -1
  78. package/dist/src/helpers/entity/detachRowsBeforeDelete.d.ts +2 -3
  79. package/dist/src/helpers/entity/detachRowsBeforeDelete.d.ts.map +1 -1
  80. package/dist/src/index.d.ts +4 -1
  81. package/dist/src/index.d.ts.map +1 -1
  82. package/dist/src/node/db/Db.d.ts.map +1 -1
  83. package/dist/src/node/index.d.ts +9 -1
  84. package/dist/src/node/index.d.ts.map +1 -1
  85. package/dist/src/seedSchema/index.d.ts +0 -1
  86. package/dist/src/seedSchema/index.d.ts.map +1 -1
  87. package/dist/{syncDbWithEas-Dj_8VqM7.js → syncDbWithEas-V_9gIyHp.js} +21 -20
  88. package/dist/syncDbWithEas-V_9gIyHp.js.map +1 -0
  89. package/dist/{tolerantWebAccess-CNfvmR3m.js → tolerantWebAccess-D6hFxREe.js} +7 -8
  90. package/dist/{tolerantWebAccess-CNfvmR3m.js.map → tolerantWebAccess-D6hFxREe.js.map} +1 -1
  91. package/dist/{updateSeedRevokedAt-D-3SLW-D.js → updateSeedRevokedAt-CsAoUEEt.js} +4 -4
  92. package/dist/{updateSeedRevokedAt-D-3SLW-D.js.map → updateSeedRevokedAt-CsAoUEEt.js.map} +1 -1
  93. package/package.json +7 -7
  94. package/dist/BaseFileManager-DLou1TZS.js.map +0 -1
  95. package/dist/Item-Ld1iPicQ.js.map +0 -1
  96. package/dist/ModelProperty-C8gTx4pO.js.map +0 -1
  97. package/dist/arweaveContentTags-Bh4wCTal.js +0 -51
  98. package/dist/arweaveContentTags-Bh4wCTal.js.map +0 -1
  99. package/dist/detachRowsBeforeDelete-BZr_0iZU.js.map +0 -1
  100. package/dist/dist/BaseFileManager-DLou1TZS.d.ts.map +0 -1
  101. package/dist/dist/configurePlatform-WkmvqeTO.d.ts.map +0 -1
  102. package/dist/dist/minimumUpgradeVersion-BDhHvHtr.d.ts +0 -9
  103. package/dist/dist/minimumUpgradeVersion-BDhHvHtr.d.ts.map +0 -1
  104. package/dist/errors-DKxFSvb3.js.map +0 -1
  105. package/dist/getPublishPayload-CLrAcZwr.js.map +0 -1
  106. package/dist/getPublishUploads-DFcgc27c.js +0 -784
  107. package/dist/getPublishUploads-DFcgc27c.js.map +0 -1
  108. package/dist/index-9udoYObJ.js.map +0 -1
  109. package/dist/index-BjWk0x4-.js.map +0 -1
  110. package/dist/index-Cdm7Q7el.js.map +0 -1
  111. package/dist/index-CghAYA-z.js.map +0 -1
  112. package/dist/index.browser-D9oC-KKx.js.map +0 -1
  113. package/dist/index.node-DV1OXCp0.js.map +0 -1
  114. package/dist/minimumUpgradeVersion-BDhHvHtr.js.map +0 -1
  115. package/dist/property-Broz_CWj.js.map +0 -1
  116. package/dist/publishGraph-DnWoWZRP.js +0 -311
  117. package/dist/publishGraph-DnWoWZRP.js.map +0 -1
  118. package/dist/seedSchema/PropertyUidSchema.ts +0 -16
  119. package/dist/src/seedSchema/PropertyUidSchema.d.ts +0 -64
  120. package/dist/src/seedSchema/PropertyUidSchema.d.ts.map +0 -1
  121. package/dist/syncDbWithEas-Dj_8VqM7.js.map +0 -1
  122. package/dist/tabEvents-BnBzIdEi.js.map +0 -1
@@ -286,18 +286,6 @@ const modelRelations = relations(modelUids, ({ one }) => ({
286
286
  model: one(models),
287
287
  }));
288
288
 
289
- const propertyUids = sqliteTable('property_uids', {
290
- id: int('id').primaryKey({ autoIncrement: true }),
291
- uid: text('uid').notNull(),
292
- propertyId: int('property_id')
293
- .notNull()
294
- .unique()
295
- .references(() => properties.id),
296
- });
297
- const propertyUidRelations = relations(propertyUids, ({ one }) => ({
298
- property: one(properties),
299
- }));
300
-
301
289
  const config = sqliteTable('config', {
302
290
  id: integer('id').primaryKey({ autoIncrement: true }),
303
291
  key: text('key').notNull(),
@@ -650,5 +638,5 @@ var BaseFileManager$1 = /*#__PURE__*/Object.freeze({
650
638
  BaseFileManager: BaseFileManager
651
639
  });
652
640
 
653
- export { BaseFileManager$1 as A, BaseDb as B, ModelSchemaSchema as M, SQLITE_BUSY_RETRY_DELAYS_MS as S, appState as a, modelUids as b, config as c, models as d, arweaveL1FinalizeJobs as e, easSyncProcesses as f, entityChanges as g, htmlEmbeddedImageCoPublish as h, modelRelations as i, modelSchemas as j, modelsRelations as k, properties as l, metadata as m, propertiesRelations as n, propertyUidRelations as o, pendingWrites as p, propertyUids as q, publishProcesses as r, seeds as s, schemas as t, uploadProcesses as u, versions as v, BaseFileManager as w, isSqliteBusyError as x, withSqliteBusyRetry as y, SchemaSchema as z };
654
- //# sourceMappingURL=BaseFileManager-DLou1TZS.js.map
641
+ export { BaseDb as B, ModelSchemaSchema as M, SQLITE_BUSY_RETRY_DELAYS_MS as S, appState as a, modelUids as b, config as c, models as d, arweaveL1FinalizeJobs as e, easSyncProcesses as f, entityChanges as g, htmlEmbeddedImageCoPublish as h, modelRelations as i, modelSchemas as j, modelsRelations as k, properties as l, metadata as m, propertiesRelations as n, publishProcesses as o, pendingWrites as p, schemas as q, BaseFileManager as r, seeds as s, isSqliteBusyError as t, uploadProcesses as u, versions as v, withSqliteBusyRetry as w, SchemaSchema as x, BaseFileManager$1 as y };
642
+ //# sourceMappingURL=BaseFileManager-D-pLXQAp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseFileManager-D-pLXQAp.js","sources":["../../src/browser/db/sqliteBusyRetry.ts","../../src/db/Db/BaseDb.ts","../../src/seedSchema/ModelSchema.ts","../../src/seedSchema/attestedUid.ts","../../src/seedSchema/SeedSchema.ts","../../src/seedSchema/VersionSchema.ts","../../src/seedSchema/MetadataSchema.ts","../../src/seedSchema/AppStateSchema.ts","../../src/seedSchema/ModelUidSchema.ts","../../src/seedSchema/ConfigSchema.ts","../../src/seedSchema/SchemaSchema.ts","../../src/seedSchema/ModelSchemaSchema.ts","../../src/seedSchema/PublishProcessSchema.ts","../../src/seedSchema/UploadProcessSchema.ts","../../src/seedSchema/ArweaveL1FinalizeSchema.ts","../../src/seedSchema/EasSyncProcessSchema.ts","../../src/seedSchema/HtmlEmbeddedImageCoPublishSchema.ts","../../src/seedSchema/PendingWriteSchema.ts","../../src/seedSchema/EntityChangeSchema.ts","../../src/helpers/FileManager/BaseFileManager.ts"],"sourcesContent":["import debug from 'debug'\n\nconst logger = debug('seedSdk:browser:db:sqliteBusyRetry')\n\n/** Waits between attempts; about 1 s in total. */\nexport const SQLITE_BUSY_RETRY_DELAYS_MS = [25, 75, 150, 300, 450]\n\n/**\n * Another connection (usually another tab) holds the database lock. SQLite reports this as\n * SQLITE_BUSY (\"database is locked\") or SQLITE_LOCKED (\"database table is locked\").\n */\nexport function isSqliteBusyError(error: unknown): boolean {\n // Drizzle wraps a driver's error (\"Failed query: ...\") and keeps it as `cause`\n for (let current: unknown = error, depth = 0; current != null && depth < 5; depth++) {\n const message = current instanceof Error ? current.message : String(current)\n if (/SQLITE_BUSY|SQLITE_LOCKED|database (table )?is locked/i.test(message)) return true\n current = (current as { cause?: unknown }).cause\n }\n return false\n}\n\n/**\n * Retries a statement another tab's lock rejected. Safe for the SDK's writes because each is a\n * single autocommit statement: one that failed with SQLITE_BUSY didn't apply. Don't use this for\n * statements inside a transaction, where a retry would replay part of it.\n */\nexport function withSqliteBusyRetry<Args extends unknown[], R>(\n driver: (...args: Args) => Promise<R>,\n delaysMs: number[] = SQLITE_BUSY_RETRY_DELAYS_MS,\n): (...args: Args) => Promise<R> {\n return async (...args: Args) => {\n for (let attempt = 0; ; attempt++) {\n try {\n return await driver(...args)\n } catch (error) {\n if (!isSqliteBusyError(error) || attempt >= delaysMs.length) throw error\n logger(`database busy (attempt ${attempt + 1}); retrying`)\n await new Promise((resolve) => setTimeout(resolve, delaysMs[attempt]))\n }\n }\n }\n}\n","import type { IDb } from '@/interfaces/IDb'\nimport { Observable } from 'rxjs'\nimport { isSqliteBusyError, SQLITE_BUSY_RETRY_DELAYS_MS } from '@/browser/db/sqliteBusyRetry'\n\nexport abstract class BaseDb {\n static filesDir: string | undefined\n private static _impl: IDb | null = null\n\n static configure(impl: IDb): void {\n if (!impl) {\n throw new Error(\n 'Cannot configure Db with undefined or null. Ensure the platform-specific Db is properly created.',\n )\n }\n BaseDb._impl = impl\n }\n\n private static requireImpl(): IDb {\n if (!BaseDb._impl) {\n throw new Error(\n 'Db not configured. Call BaseDb.configure() during platform init.',\n )\n }\n return BaseDb._impl\n }\n\n static getAppDb(): any {\n return BaseDb.requireImpl().getAppDb()\n }\n\n static prepareDb(filesDir: string, config?: any): Promise<any> {\n return BaseDb.requireImpl().prepareDb(filesDir, config)\n }\n\n /** Closes the app database; see IDb.close. Does nothing before configure(). */\n static async close(): Promise<void> {\n await BaseDb._impl?.close()\n }\n\n static isAppDbReady(): boolean {\n if (!BaseDb._impl) {\n return false\n }\n return BaseDb._impl.isAppDbReady()\n }\n\n static connectToDb(pathToDir: string): Promise<unknown> {\n return BaseDb.requireImpl().connectToDb(pathToDir)\n }\n\n static async migrate(pathToDbDir: string, dbName: string, dbId: string): Promise<void> {\n return BaseDb.requireImpl().migrate(pathToDbDir, dbName, dbId)\n }\n\n /**\n * Execute a reactive query that emits new results whenever the underlying data changes.\n *\n * Supports two usage patterns:\n * 1. SQL tag function (browser only): liveQuery((sql) => sql`SELECT * FROM models`)\n * 2. Drizzle query builder: liveQuery(db.select().from(models))\n *\n * On Node only the query builder works (a tag function throws), and it is re-run every second;\n * the observable emits when the result changes.\n */\n static liveQuery<T>(query: ((sql: any) => any) | any): Observable<T[]> {\n return BaseDb.requireImpl().liveQuery<T>(query)\n }\n\n /**\n * Runs `fn` in one transaction: every query it runs on `tx` (a Drizzle database, used like\n * `getAppDb()`) commits together, or none does when `fn` throws. Queries on `getAppDb()` inside\n * `fn` are not part of the transaction, and in the browser they wait for it to end, so don't\n * call `getAppDb()` or `BaseDb.transaction` from `fn`.\n *\n * When another connection (another tab) holds the database lock, the whole transaction is\n * retried, so `fn` must have no side effects outside `tx`.\n */\n static async transaction<T>(fn: (tx: any) => Promise<T>): Promise<T> {\n const impl = BaseDb.requireImpl()\n for (let attempt = 0; ; attempt++) {\n try {\n return await impl.transaction(fn)\n } catch (error) {\n if (!isSqliteBusyError(error) || attempt >= SQLITE_BUSY_RETRY_DELAYS_MS.length) throw error\n await new Promise((resolve) => setTimeout(resolve, SQLITE_BUSY_RETRY_DELAYS_MS[attempt]))\n }\n }\n }\n}\n","import { integer, sqliteTable, text, unique } from 'drizzle-orm/sqlite-core'\nimport { relations } from 'drizzle-orm'\nimport { InferInsertModel, InferSelectModel } from 'drizzle-orm'\n\n\nexport const models = sqliteTable(\n 'models',\n {\n id: integer('id').primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n schemaFileId: text('schema_file_id'), // ID from JSON file for change tracking - must be unique\n isEdited: integer('is_edited', { mode: 'boolean' }), // true if model has been edited locally, false if matches schema file\n },\n (table) => {\n return {\n uniqueSchemaFileId: unique('unique_schema_file_id').on(table.schemaFileId),\n }\n }\n)\n\nexport const modelsRelations = relations(models, ({ many }) => ({\n properties: many(properties),\n}))\n\nexport type NewModelRecord = typeof models.$inferInsert\nexport type ModelRecordType = typeof models.$inferSelect\n\nexport const properties = sqliteTable(\n 'properties',\n {\n id: integer('id').primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n dataType: text('data_type').notNull(),\n modelId: integer('model_id')\n .notNull()\n .references(() => models.id),\n refModelId: integer('ref_model_id').references(() => models.id),\n refValueType: text('ref_value_type'),\n schemaFileId: text('schema_file_id'), // ID from JSON file for change tracking\n isEdited: integer('is_edited', { mode: 'boolean' }), // true if property has been edited locally, false if matches schema file\n required: integer('required', { mode: 'boolean' }), // true if relation/image property is required (publish fails when related item not found)\n // Storage settings from the schema file's `storage: { type, path, extension }`, in the internal\n // shape ModelProperty uses. Null when the property has no storage config.\n storageType: text('storage_type'), // 'ItemStorage' | 'PropertyStorage'\n localStorageDir: text('local_storage_dir'), // storage.path, e.g. '/html'\n filenameSuffix: text('filename_suffix'), // storage.extension, e.g. '.html'\n // The whole definition as JSON: the schema file's property object, or a code-defined one\n // (validation, htmlEmbeddedDataUriPolicy, description and any other field). The columns above\n // win for the fields they hold. Read through helpers/propertyDefinition.\n definition: text('definition'),\n },\n (table) => {\n return {\n uniqueNameModelId: unique('unique_name_model_id').on(\n table.name,\n table.modelId,\n ),\n uniqueSchemaFileId: unique('unique_property_schema_file_id').on(table.schemaFileId),\n }\n },\n)\n\nexport const propertiesRelations = relations(properties, ({ one }) => ({\n model: one(models),\n refModel: one(models),\n}))\n\nexport type NewPropertyRecord = InferInsertModel<typeof properties>\nexport type PropertyType = InferSelectModel<typeof properties>\n","import { sql, type SQL } from 'drizzle-orm'\nimport type { SQLiteColumn } from 'drizzle-orm/sqlite-core'\n\n/**\n * True for a stored attestation uid, false for the placeholders a draft row holds (NULL, '',\n * 'NULL', ZERO_BYTES32; see `isPlaceholderUid` in @seedprotocol/eas). The predicate of the partial\n * unique indexes on `seeds.uid` and `versions.uid`.\n */\nexport const attestedUidSql = (column: SQLiteColumn): SQL =>\n sql`${column} IS NOT NULL AND trim(${column}) NOT IN ('', 'NULL') AND lower(trim(${column})) != '0x0000000000000000000000000000000000000000000000000000000000000000'`\n","import { InferSelectModel } from 'drizzle-orm'\nimport { index, int, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\nimport { attestedUidSql } from './attestedUid'\n\nexport const seeds = sqliteTable(\n 'seeds',\n {\n localId: text('local_id').unique(),\n uid: text('uid'),\n schemaUid: text('schema_uid'),\n type: text('type'),\n // schemaFileId of the models row this item belongs to (= Model.id). Disambiguates items whose\n // model name exists in more than one schema; null for legacy rows that couldn't be backfilled.\n modelFileId: text('model_file_id'),\n publisher: text('publisher'),\n attestationRaw: text('attestation_raw'),\n attestationCreatedAt: int('attestation_created_at'),\n // Set on insert when the writer leaves it out. No $onUpdate: readers rank rows by\n // COALESCE(attestation_created_at, created_at), and some writers move it on purpose.\n createdAt: int('created_at').$defaultFn(() => Date.now()),\n // Set on every insert and update unless the writer passes a value.\n updatedAt: int('updated_at')\n .$defaultFn(() => Date.now())\n .$onUpdate(() => Date.now()),\n _markedForDeletion: int('_marked_for_deletion'),\n revokedAt: int('revoked_at'),\n },\n (table) => [\n index('seeds_uid_idx').on(table.uid),\n index('seeds_type_idx').on(table.type),\n // One row per attested seed uid (migration 0029). Drafts hold a placeholder uid and are left out.\n uniqueIndex('seeds_attested_uid_unique').on(table.uid).where(attestedUidSql(table.uid)),\n ],\n // {\n // triggers: [\n // sql<string>`CREATE TRIGGER IF NOT EXISTS seeds_created_at_trigger\n // BEFORE INSERT\n // ON seeds\n // FOR EACH ROW\n // BEGIN\n // SELECT strftime('%s', 'now') * 1000 INTO NEW.created_at;\n // END;`,\n // ],\n // },\n)\n\nexport type SeedType = InferSelectModel<typeof seeds>\n","import { index, int, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\nimport { attestedUidSql } from './attestedUid'\nimport { InferSelectModel } from 'drizzle-orm'\n\nexport const versions = sqliteTable('versions', {\n localId: text('local_id').unique(),\n uid: text('uid'),\n seedLocalId: text('seed_local_id'),\n seedUid: text('seed_uid'),\n seedType: text('seed_type'),\n note: text('note'),\n // Set on insert when the writer leaves it out. No $onUpdate: readers rank rows by\n // COALESCE(attestation_created_at, created_at), and some writers move it on purpose.\n createdAt: int('created_at').$defaultFn(() => Date.now()),\n // Set on every insert and update unless the writer passes a value.\n updatedAt: int('updated_at')\n .$defaultFn(() => Date.now())\n .$onUpdate(() => Date.now()),\n attestationCreatedAt: int('attestation_created_at'),\n attestationRaw: text('attestation_raw'),\n publisher: text('publisher'),\n /**\n * When the version attestation was revoked, in Unix seconds (EAS `revocationTime`, or the local\n * unpublish time until sync confirms it). Null while live or unpublished.\n */\n revokedAt: int('revoked_at'),\n}, (table) => [\n index('versions_seed_local_id_idx').on(table.seedLocalId),\n // One row per attested version uid (migration 0029). Drafts hold a placeholder uid and are left out.\n uniqueIndex('versions_attested_uid_unique').on(table.uid).where(attestedUidSql(table.uid)),\n])\n\nexport type VersionsType = InferSelectModel<typeof versions>\n","import { index, int, integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\nimport { properties } from './ModelSchema'\n\nexport const metadata = sqliteTable('metadata', {\n localId: text('local_id').unique(),\n uid: text('uid'),\n propertyId: integer('property_id').references(() => properties.id),\n propertyName: text('property_name'),\n propertyValue: text('property_value'),\n schemaUid: text('schema_uid'),\n modelType: text('model_type'),\n seedLocalId: text('seed_local_id'),\n seedUid: text('seed_uid'),\n versionLocalId: text('version_local_id'),\n versionUid: text('version_uid'),\n easDataType: text('eas_data_type'),\n refValueType: text('ref_value_type'),\n refModelUid: text('ref_schema_uid'),\n refSeedType: text('ref_seed_type'),\n refResolvedValue: text('ref_resolved_value'),\n refResolvedDisplayValue: text('ref_resolved_display_value'),\n localStorageDir: text('local_storage_dir'),\n attestationRaw: text('attestation_raw'),\n attestationCreatedAt: int('attestation_created_at'),\n contentHash: text('content_hash'),\n // Set on insert when the writer leaves it out. No $onUpdate: readers rank rows by\n // COALESCE(attestation_created_at, created_at), and some writers move it on purpose.\n createdAt: int('created_at').$defaultFn(() => Date.now()),\n // Set on every insert and update unless the writer passes a value.\n updatedAt: int('updated_at')\n .$defaultFn(() => Date.now())\n .$onUpdate(() => Date.now()),\n publisher: text('publisher'),\n // Unix seconds when this row's attestation was revoked on EAS; null while it's live (or for a\n // local, unpublished row). EAS sync keeps only the canonical attestation per (version, property\n // schema): the newest live one, or the newest revoked one when all are revoked. So a non-null\n // value marks a property kept only for its last value, not one that is present on the version.\n revokedAt: int('revoked_at'),\n // For a row EAS sync derived for an ItemStorage property from a `storage_transaction_id`\n // attestation (uid null, ref_value_type 'file', value = the transaction id): that attestation's\n // uid. Null for every other row. Marks the row as published content, not a local draft.\n derivedFromUid: text('derived_from_uid'),\n // On a cleared local row (null value): publish revokes the property's attestations instead of\n // attesting the empty value (ADR 0021). Null on every other row.\n retract: int('retract', { mode: 'boolean' }),\n}, (table) => [\n index('metadata_seed_local_id_property_name_idx').on(table.seedLocalId, table.propertyName),\n index('metadata_seed_uid_idx').on(table.seedUid),\n])\n\nexport type MetadataType = InferSelectModel<typeof metadata>\n","import { int, sqliteTable, text } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\nexport const appState = sqliteTable('appState', {\n key: text('key').unique(),\n value: text('value'),\n createdAt: int('created_at'),\n updatedAt: int('updated_at'),\n})\n\nexport type appStateType = InferSelectModel<typeof appState>\n","import { int, sqliteTable, text } from 'drizzle-orm/sqlite-core'\nimport { relations } from 'drizzle-orm'\nimport { models } from './ModelSchema'\n\nexport const modelUids = sqliteTable('model_uids', {\n id: int('id').primaryKey({ autoIncrement: true }),\n uid: text('uid').notNull(),\n modelId: int('model_id')\n .notNull()\n .unique()\n .references(() => models.id),\n})\n\nexport const modelRelations = relations(modelUids, ({ one }) => ({\n model: one(models),\n}))\n","import { integer, sqliteTable, text, blob, } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\n\nexport const config = sqliteTable(\n 'config',\n {\n id: integer('id').primaryKey({ autoIncrement: true }),\n key: text('key').notNull(),\n text: text('text'),\n json: text('json'),\n blob: blob('blob'),\n }\n)\n\nexport type configType = InferSelectModel<typeof config>","import { InferSelectModel, } from 'drizzle-orm'\nimport { int, sqliteTable, text, integer, unique } from 'drizzle-orm/sqlite-core'\n\n\nexport const schemas = sqliteTable(\n 'schemas',\n {\n id: integer('id').primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n version: integer('version').notNull(),\n schemaFileId: text('schema_file_id'), // ID from JSON file for change tracking - must be unique\n schemaData: text('schema_data'), // Full JSON schema content (SchemaFileFormat as JSON string)\n isDraft: integer('is_draft', { mode: 'boolean' }), // true if schema is in draft/editing state, false if published to file\n isEdited: integer('is_edited', { mode: 'boolean' }), // true if schema has been edited locally, false if matches schema file\n // Hash of the schema file applySchemaFile last wrote to the rows (with schema_file_id and\n // version): a file with the same three is not applied again.\n contentHash: text('content_hash'),\n createdAt: int('created_at'),\n updatedAt: int('updated_at'),\n },\n (table) => {\n return {\n uniqueSchemaFileId: unique('unique_schema_schema_file_id').on(table.schemaFileId),\n }\n }\n)\n\nexport type SchemaType = InferSelectModel<typeof schemas>","import { integer, sqliteTable, unique } from 'drizzle-orm/sqlite-core';\nimport { InferSelectModel } from 'drizzle-orm';\nimport { schemas } from './SchemaSchema';\nimport { models } from './ModelSchema';\n\nexport const modelSchemas = sqliteTable('model_schemas', {\n id: integer('id').primaryKey({ autoIncrement: true }),\n modelId: integer('model_id').references(() => models.id),\n schemaId: integer('schema_id').references(() => schemas.id),\n}, (table) => [\n // One link per model and schema (migration 0029)\n unique('model_schemas_model_id_schema_id_unique').on(table.modelId, table.schemaId),\n])\n\nexport type ModelSchemaType = InferSelectModel<typeof modelSchemas>","import { int, sqliteTable, text } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\n\nexport const publishProcesses = sqliteTable('publish_processes', {\n id: int('id').primaryKey({ autoIncrement: true }),\n seedLocalId: text('seed_local_id').notNull(),\n modelName: text('model_name').notNull(),\n schemaId: text('schema_id'),\n status: text('status').notNull(), // 'in_progress' | 'completed' | 'failed' | 'interrupted'\n startedAt: int('started_at').notNull(),\n completedAt: int('completed_at'),\n errorMessage: text('error_message'),\n errorStep: text('error_step'),\n errorDetails: text('error_details'),\n errorCode: text('error_code'), // e.g. ManagedAccountPublishError.code\n persistedSnapshot: text('persisted_snapshot').notNull(),\n seedId: text('seed_id'),\n existingSeedUid: text('existing_seed_uid'),\n createdAt: int('created_at'),\n updatedAt: int('updated_at'),\n})\n\nexport type PublishProcessType = InferSelectModel<typeof publishProcesses>\n","import { int, sqliteTable, text } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\n\nexport const uploadProcesses = sqliteTable('upload_processes', {\n id: int('id').primaryKey({ autoIncrement: true }),\n reimbursementConfirmed: int('reimbursement_confirmed').notNull(), // 0 or 1 for boolean\n reimbursementTransactionId: text('reimbursement_transaction_id'),\n transactionKeys: text('transaction_keys'),\n persistedSnapshot: text('persisted_snapshot').notNull(), // JSON string\n createdAt: int('created_at'),\n updatedAt: int('updated_at'),\n})\n\nexport type UploadProcessType = InferSelectModel<typeof uploadProcesses>\n","import { int, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\n\n/** Background job: resolve L1 tx id and wait for L1 confirmation after bundler publish. */\nexport const arweaveL1FinalizeJobs = sqliteTable(\n 'arweave_l1_finalize_jobs',\n {\n id: int('id').primaryKey({ autoIncrement: true }),\n seedLocalId: text('seed_local_id').notNull(),\n dataItemId: text('data_item_id').notNull(),\n /** L1 bundle / anchor transaction id from gateway GraphQL `bundledIn.id`. */\n l1TransactionId: text('l1_transaction_id'),\n bundleId: text('bundle_id'),\n versionLocalId: text('version_local_id'),\n itemPropertyName: text('item_property_name'),\n /** `pending_l1` | `confirmed` | `failed` */\n phase: text('phase').notNull(),\n statusJson: text('status_json'),\n errorMessage: text('error_message'),\n createdAt: int('created_at').notNull(),\n updatedAt: int('updated_at').notNull(),\n },\n (table) => ({\n dataItemIdUnique: uniqueIndex('arweave_l1_finalize_jobs_data_item_id_unique').on(table.dataItemId),\n }),\n)\n\nexport type ArweaveL1FinalizeJobType = InferSelectModel<typeof arweaveL1FinalizeJobs>\n","import { InferSelectModel } from 'drizzle-orm'\nimport { int, sqliteTable, text } from 'drizzle-orm/sqlite-core'\n\nexport const easSyncProcesses = sqliteTable('eas_sync_processes', {\n id: int('id').primaryKey({ autoIncrement: true }),\n status: text('status').notNull(), // 'in_progress' | 'completed' | 'failed'\n startedAt: int('started_at').notNull(),\n completedAt: int('completed_at'),\n requestPayload: text('request_payload').notNull(),\n errorMessage: text('error_message'),\n errorDetails: text('error_details'),\n persistedSnapshot: text('persisted_snapshot').notNull(),\n createdAt: int('created_at'),\n updatedAt: int('updated_at'),\n})\n\nexport type EasSyncProcessType = InferSelectModel<typeof easSyncProcesses>\n","import { int, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\n\n/**\n * Links Image seeds materialized from Html `data:image/*` URIs to the parent Item seed for co-publish.\n * Rows are removed after a successful publish (see clearHtmlEmbeddedImageCoPublishRows).\n */\nexport const htmlEmbeddedImageCoPublish = sqliteTable(\n 'html_embedded_image_co_publish',\n {\n id: int('id').primaryKey({ autoIncrement: true }),\n parentSeedLocalId: text('parent_seed_local_id').notNull(),\n htmlSeedLocalId: text('html_seed_local_id').notNull(),\n imageSeedLocalId: text('image_seed_local_id').notNull(),\n /** Stable dedup key (e.g. sha256 of data URI or normalized URI string). */\n stableKey: text('stable_key').notNull(),\n createdAt: int('created_at').notNull(),\n },\n (t) => [\n uniqueIndex('html_embed_co_pub_parent_html_stable').on(\n t.parentSeedLocalId,\n t.htmlSeedLocalId,\n t.stableKey,\n ),\n ],\n)\n","import { index, int, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\nimport { InferInsertModel, InferSelectModel } from 'drizzle-orm'\n\n/**\n * The item write outbox (ADR 0019): one row per edit to an item, appended when the value is\n * assigned and applied to `seeds`, `versions` and `metadata` by the leader tab's drainer.\n */\nexport const pendingWrites = sqliteTable(\n 'pending_writes',\n {\n id: int('id').primaryKey({ autoIncrement: true }),\n /** Unique per op; the drainer and `save()` refer to an op by it. */\n opId: text('op_id').notNull(),\n /** Unused: nothing appends grouped ops. Kept until a migration drops it. */\n groupId: text('group_id'),\n seedLocalId: text('seed_local_id').notNull(),\n /** Null for ops on the seed itself (`create`, `delete`). */\n propertyName: text('property_name'),\n /** `create` | `set` | `delete` | `storage` */\n kind: text('kind').notNull(),\n /** JSON-encoded value. */\n value: text('value'),\n /**\n * A storage op's staged file: the assigned bytes, written by the tab that appended the op (an\n * ItemStorage op's staged path is in its JSON value too).\n */\n valueRef: text('value_ref'),\n /** The stored metadata row the edit was made against, to detect a synced row written since. */\n baseRowId: text('base_row_id'),\n /** Unused: the base uid is read through base_row_id. Kept until a migration drops it. */\n baseUid: text('base_uid'),\n createdAt: int('created_at').notNull(),\n /** The tab that appended the op. */\n tabId: text('tab_id'),\n /** `pending` | `applied` | `superseded` | `failed`. An op is claimed and applied in one transaction. */\n status: text('status').notNull(),\n error: text('error'),\n /** The name of the error that failed the op (`OwnershipError`, say), so a waiter can tell why. */\n errorName: text('error_name'),\n attempts: int('attempts').notNull().default(0),\n appliedAt: int('applied_at'),\n /** JSON the applier recorded when the op applied (for a `set`: the metadata row written). */\n result: text('result'),\n /** JSON: the synced value this op was applied over, when there was one (ADR 0019). */\n conflict: text('conflict'),\n conflictResolvedAt: int('conflict_resolved_at'),\n },\n (table) => ({\n opIdUnique: uniqueIndex('pending_writes_op_id_unique').on(table.opId),\n /** The drainer's order: per property, oldest first, among one status. */\n drainOrder: index('pending_writes_drain_order').on(\n table.status,\n table.seedLocalId,\n table.propertyName,\n table.createdAt,\n ),\n }),\n)\n\nexport type PendingWriteType = InferSelectModel<typeof pendingWrites>\nexport type NewPendingWrite = InferInsertModel<typeof pendingWrites>\n","import { index, int, sqliteTable, text } from 'drizzle-orm/sqlite-core'\nimport { InferSelectModel } from 'drizzle-orm'\n\n/**\n * The entity change log (ADR 0020): one row per row written to `seeds`, `versions` or `metadata`,\n * inserted by triggers (migration 0023), so it commits or rolls back with the write. The browser's\n * change feed reads it to tell loaded Items and ItemProperties which seeds changed. Nothing else\n * writes it; the leader tab prunes rows older than 10 minutes.\n */\nexport const entityChanges = sqliteTable(\n 'entity_changes',\n {\n seq: int('seq').primaryKey({ autoIncrement: true }),\n /** `seeds` | `versions` | `metadata` */\n tbl: text('tbl').notNull(),\n seedLocalId: text('seed_local_id'),\n seedUid: text('seed_uid'),\n /** Set for `metadata` rows only. */\n propertyName: text('property_name'),\n /** Unix ms when the trigger ran. */\n at: int('at').notNull(),\n },\n (table) => ({\n at: index('entity_changes_at').on(table.at),\n }),\n)\n\nexport type EntityChangeType = InferSelectModel<typeof entityChanges>\n","import type {\n DownloadAllFilesParams,\n DownloadAllFilesResult,\n DownloadSingleFileParams,\n IFileManager,\n ResizeAllImagesParams,\n ResizeImageParams,\n} from './IFileManager'\n\nexport abstract class BaseFileManager {\n private static fileSystemInitialized = false\n private static initializing = false\n private static workingDir: string | undefined\n private static _impl: IFileManager | null = null\n private static initializePromise: Promise<void> | null = null\n\n static configure(impl: IFileManager): void {\n if (!impl) {\n throw new Error(\n 'Cannot configure FileManager with undefined or null. Ensure the platform-specific FileManager is properly created.',\n )\n }\n BaseFileManager._impl = impl\n }\n\n private static requireImpl(): IFileManager {\n if (!BaseFileManager._impl) {\n throw new Error(\n 'FileManager not configured. Call BaseFileManager.configure() during platform init.',\n )\n }\n return BaseFileManager._impl\n }\n\n /**\n * Clears FS init flags so a later call can retry. Used after a failed init\n * and by tests. Does not unmount or delete any files.\n */\n static resetInitializationState(): void {\n this.fileSystemInitialized = false\n this.initializing = false\n this.initializePromise = null\n this.workingDir = undefined\n }\n\n static initializeFileSystem(workingDir?: string): Promise<void> {\n if (this.fileSystemInitialized) {\n return Promise.resolve()\n }\n if (this.initializePromise) {\n return this.initializePromise\n }\n\n this.initializing = true\n const pending = this.runInitializeFileSystem(workingDir).finally(() => {\n this.initializing = false\n if (this.initializePromise === pending) {\n this.initializePromise = null\n }\n })\n this.initializePromise = pending\n return pending\n }\n\n private static async runInitializeFileSystem(workingDir?: string): Promise<void> {\n await BaseFileManager.requireImpl().initializeFileSystem(workingDir)\n this.fileSystemInitialized = true\n this.workingDir = workingDir\n }\n\n static getWorkingDir(): string {\n if (!this.workingDir) {\n throw new Error('Working directory is not set')\n }\n return this.workingDir\n }\n\n /**\n * Build a path under the configured files root (e.g. /app-files).\n * Use this instead of hardcoding /files/ for images, html, json, etc.\n * @param subpaths - path segments to join (e.g. 'images', fileName)\n * @returns full path like /app-files/images/egg.jpg\n */\n static getFilesPath(...subpaths: string[]): string {\n const root = this.getWorkingDir().replace(/\\/$/, '')\n const parts = [root, ...subpaths].filter(Boolean)\n return parts.join('/').replace(/\\/+/g, '/')\n }\n\n static getContentUrlFromPath(path: string): Promise<string | undefined> {\n return BaseFileManager.requireImpl().getContentUrlFromPath(path)\n }\n\n static downloadAllFiles(params: DownloadAllFilesParams): Promise<DownloadAllFilesResult | void> {\n return BaseFileManager.requireImpl().downloadAllFiles(params)\n }\n\n static downloadFileByTransactionId({\n transactionId,\n arweaveHost,\n arweaveBaseUrls,\n excludedTransactions,\n expectedContentHash,\n compositeChildPaths,\n skipExisting,\n }: DownloadSingleFileParams): Promise<DownloadAllFilesResult | void> {\n return BaseFileManager.requireImpl().downloadAllFiles({\n transactionIds: [transactionId],\n arweaveHost,\n arweaveBaseUrls,\n excludedTransactions,\n expectedContentHashes: expectedContentHash ? { [transactionId]: expectedContentHash } : undefined,\n compositeChildPaths: compositeChildPaths ? { [transactionId]: compositeChildPaths } : undefined,\n skipExisting,\n })\n }\n\n static resizeImage({ filePath, width, height }: ResizeImageParams): Promise<void> {\n return BaseFileManager.requireImpl().resizeImage({ filePath, width, height })\n }\n\n static resizeAllImages({ width, height }: ResizeAllImagesParams): Promise<void> {\n return BaseFileManager.requireImpl().resizeAllImages({ width, height })\n }\n\n static pathExists(filePath: string): Promise<boolean> {\n return BaseFileManager.requireImpl().pathExists(filePath)\n }\n\n static invalidateCachedPaths(filePaths: string[]): Promise<void> {\n return BaseFileManager.requireImpl().invalidateCachedPaths(filePaths)\n }\n\n /** File size in bytes, or null if the path does not exist / cannot be stated. */\n static getFileSize(filePath: string): Promise<number | null> {\n return BaseFileManager.requireImpl().getFileSize(filePath)\n }\n\n /**\n * Returns a list of filenames in the given directory (e.g. 'images', 'files').\n */\n static listFiles(dir: string): Promise<string[]> {\n return BaseFileManager.requireImpl().listFiles(dir)\n }\n\n /**\n * Returns a list of image filenames in the images folder (originals only, excludes size subdirs).\n * Use this to get all stored images without traversing 480/760/1024/1440/1920 subdirectories.\n */\n static listImageFiles(): Promise<string[]> {\n return this.listFiles('images')\n }\n\n static createDirIfNotExists(filePath: string): Promise<void> {\n return BaseFileManager.requireImpl().createDirIfNotExists(filePath)\n }\n\n static async waitForFile(filePath: string): Promise<boolean> {\n return BaseFileManager.requireImpl().waitForFile(filePath)\n }\n\n static async waitForFileWithContent(\n filePath: string,\n interval?: number,\n timeout?: number,\n ): Promise<boolean> {\n return BaseFileManager.requireImpl().waitForFileWithContent(filePath, interval, timeout)\n }\n\n static async saveFile(filePath: string, content: string | Blob | ArrayBuffer): Promise<void> {\n return BaseFileManager.requireImpl().saveFile(filePath, content)\n }\n\n static saveFileSync(filePath: string, content: string | Blob | ArrayBuffer): void {\n return BaseFileManager.requireImpl().saveFileSync(filePath, content)\n }\n\n static async readFile(filePath: string): Promise<File> {\n return BaseFileManager.requireImpl().readFile(filePath)\n }\n\n static readFileSync(filePath: string): File {\n return BaseFileManager.requireImpl().readFileSync(filePath)\n }\n\n static async readFileAsBuffer(filePath: string): Promise<Buffer | Blob> {\n return BaseFileManager.requireImpl().readFileAsBuffer(filePath)\n }\n\n static async readFileAsString(filePath: string): Promise<string> {\n return BaseFileManager.requireImpl().readFileAsString(filePath)\n }\n\n static async getFs(): Promise<any> {\n return BaseFileManager.requireImpl().getFs()\n }\n\n static getFsSync(): any {\n return BaseFileManager.requireImpl().getFsSync()\n }\n\n static getPathModule(): any {\n return BaseFileManager.requireImpl().getPathModule()\n }\n\n static getParentDirPath(filePath: string): string {\n return BaseFileManager.requireImpl().getParentDirPath(filePath)\n }\n\n static getFilenameFromPath(filePath: string): string {\n return BaseFileManager.requireImpl().getFilenameFromPath(filePath)\n }\n}\n"],"names":[],"mappings":";;;;AAEA,MAAM,MAAM,GAAG,KAAK,CAAC,oCAAoC,CAAC;AAE1D;AAC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PES, M as ModelPropertyDataTypes, g as normalizePropertyRecordSchema, k as generateId, a9 as TAB_ID, a1 as onTabMessage, K as whenLeaderTab, C as isLeaderTab, a0 as postTabMessage, v as INTERNAL_PROPERTY_NAMES, x as convertTxIdToImage, i as isDataType, q as getExtensionForMimeType, aa as normalizeMimeType, Q as sniffMimeType, I as ImageSize, h as eventEmitter, ab as timingMarks, a4 as tryWithTabLock, ac as withTabLock, U as createSessionObjectUrl, r as INTERNAL_STORAGE_MODEL_FILE_IDS, ad as revokeSessionObjectUrl, ae as timed, J as watchEntityRows, af as isSessionObjectUrl, ag as timingNow, ah as timingSince, ai as timingLogger, aj as timedDb } from './tabEvents-BnBzIdEi.js';
1
+ import { Z as ZERO_BYTES32, ad as PROPERTY_NAMES_EXEMPT_FROM_ID_SUFFIX_STRIP, n as normalizeDataType, m as INTERNAL_DATA_TYPES, M as ModelPropertyDataTypes, g as normalizePropertyRecordSchema, k as generateId, ae as TAB_ID, a3 as onTabMessage, O as whenLeaderTab, H as isLeaderTab, a2 as postTabMessage, r as INTERNAL_PROPERTY_NAMES, u as convertTxIdToImage, i as isDataType, aa as getExtensionForMimeType, af as normalizeMimeType, U as sniffMimeType, I as ImageSize, h as eventEmitter, ag as timingMarks, a6 as tryWithTabLock, ah as withTabLock, X as createSessionObjectUrl, ab as INTERNAL_STORAGE_MODEL_FILE_IDS, ai as revokeSessionObjectUrl, aj as timed, N as watchEntityRows, ak as isSessionObjectUrl, al as timingNow, am as timingSince, an as timingLogger, ao as timedDb } from './arweaveContentTags-iW_HcWJA.js';
2
2
  import { waitFor, fromCallback, setup, assign, and as and$1, stateIn, createActor, isMachineSnapshot } from 'xstate';
3
3
  import debug from 'debug';
4
4
  import pluralize from 'pluralize';
5
5
  import { DEFAULT_NAME_MATCH_LEVEL, isNameMatchLevel, compareNameMatchTiers, localNamesInBestMatchTier, easName, isValidEasAttestationUid, isPlaceholderUid, getEasSchemaUidForExactDefinition, getSchemaUidForModelFromCache, setSchemaUidForModel, cachedSchemaLookup, getEasModelSchemasForNames } from '@seedprotocol/eas';
6
6
  import { eq, getTableColumns, and, inArray, isNotNull, desc, sql, or, isNull, asc, lt, max, count, gt, ne } from 'drizzle-orm';
7
- import { B as BaseDb, t as schemas, d as models, j as modelSchemas, v as versions, s as seeds, l as properties, p as pendingWrites, a as appState, m as metadata, x as isSqliteBusyError, w as BaseFileManager, b as modelUids, r as publishProcesses, e as arweaveL1FinalizeJobs, h as htmlEmbeddedImageCoPublish } from './BaseFileManager-DLou1TZS.js';
7
+ import { B as BaseDb, q as schemas, d as models, j as modelSchemas, v as versions, s as seeds, l as properties, p as pendingWrites, a as appState, m as metadata, t as isSqliteBusyError, r as BaseFileManager, b as modelUids, o as publishProcesses, e as arweaveL1FinalizeJobs, h as htmlEmbeddedImageCoPublish } from './BaseFileManager-D-pLXQAp.js';
8
8
  import { BehaviorSubject } from 'rxjs';
9
9
  import { orderBy } from 'lodash-es';
10
10
  import { alias } from 'drizzle-orm/sqlite-core';
@@ -1640,8 +1640,8 @@ const addModelsToDb = async (models, schema, modelRenames, schemaFileData, optio
1640
1640
  const modelProcessingErrors = [];
1641
1641
  // Property rows this call changed, so cached ModelProperty instances can be given the new values
1642
1642
  const updatedPropertyFileIds = [];
1643
- const _mod_0 = await import('./tabEvents-BnBzIdEi.js');
1644
- const _ns_0 = _mod_0.ak;
1643
+ const _mod_0 = await import('./arweaveContentTags-iW_HcWJA.js');
1644
+ const _ns_0 = _mod_0.ap;
1645
1645
  const { generateId } = _ns_0;
1646
1646
  const modelNames = [...new Set([...Object.keys(models), ...(schemaFileData?.propertyDefinitions?.keys() ?? [])])];
1647
1647
  for (const modelName of modelNames) {
@@ -1930,8 +1930,8 @@ async function writeModelToDb(modelFileId, data) {
1930
1930
  if (!data.schemaId || !Number.isInteger(data.schemaId) || data.schemaId <= 0) {
1931
1931
  throw new Error(`Invalid schemaId: ${data.schemaId}. Schema record must exist before creating join entry.`);
1932
1932
  }
1933
- const _mod_1 = await import('./tabEvents-BnBzIdEi.js');
1934
- const _ns_1 = _mod_1.ak;
1933
+ const _mod_1 = await import('./arweaveContentTags-iW_HcWJA.js');
1934
+ const _ns_1 = _mod_1.ap;
1935
1935
  const { generateId } = _ns_1;
1936
1936
  const { linked, schema, modelId } = await inDefinitionsTransaction(async (tx) => {
1937
1937
  const [schema] = await tx
@@ -4244,7 +4244,7 @@ const resolveRelatedValue = fromCallback(({ sendBack, input: { context } }) => {
4244
4244
  const { isRelation, propertyValue, propertyName, propertyRecordSchema, populatedFromDb, } = context;
4245
4245
  const _resolveRelatedValue = async () => {
4246
4246
  // Use dynamic import to break circular dependency
4247
- const schemaMod = await import('./index-CghAYA-z.js');
4247
+ const schemaMod = await import('./index-CmNqUKQN.js');
4248
4248
  const { ModelPropertyDataTypes } = schemaMod;
4249
4249
  if (!propertyValue || !isRelation || populatedFromDb) {
4250
4250
  return;
@@ -4831,7 +4831,7 @@ async function resolveStorageRef(kind, row) {
4831
4831
  }
4832
4832
  if (kind === 'html') {
4833
4833
  if (!out.refResolvedValue && out.propertyValue) {
4834
- const { resolveHtmlStorageSeedLocalId } = await import('./readHtmlBodyForStorageSeed-FvwYPn4m.js');
4834
+ const { resolveHtmlStorageSeedLocalId } = await import('./readHtmlBodyForStorageSeed-Cva1DPzE.js');
4835
4835
  const localId = await resolveHtmlStorageSeedLocalId(out.propertyValue);
4836
4836
  if (localId)
4837
4837
  out.refResolvedValue = `${localId}.html`;
@@ -4880,7 +4880,7 @@ async function resolveStorageDisplay(kind, row, options = {}) {
4880
4880
  }
4881
4881
  }
4882
4882
  if (!renderValue && options.fetch && ref.propertyValue) {
4883
- const { readHtmlBodyForStorageSeedPropertyValue } = await import('./readHtmlBodyForStorageSeed-FvwYPn4m.js');
4883
+ const { readHtmlBodyForStorageSeedPropertyValue } = await import('./readHtmlBodyForStorageSeed-Cva1DPzE.js');
4884
4884
  renderValue = await readHtmlBodyForStorageSeedPropertyValue(ref.propertyValue);
4885
4885
  }
4886
4886
  return { ref, filePath, renderValue };
@@ -4892,12 +4892,12 @@ async function resolveStorageDisplay(kind, row, options = {}) {
4892
4892
  : BaseFileManager.pathExists(BaseFileManager.getFilesPath(dir, name)).then((exists) => exists ? BaseFileManager.getFilesPath(dir, name) : undefined);
4893
4893
  // ensureImageLocal also makes the smallest size variant when the original is already there
4894
4894
  if (kind === 'image' && options.fetch) {
4895
- const { ensureImageLocal } = await import('./ensureImageLocal-DNM6c2yD.js');
4895
+ const { ensureImageLocal } = await import('./ensureImageLocal-B6suz6FC.js');
4896
4896
  await ensureImageLocal({ transactionId: name, fileName: name, widths: [ImageSize.EXTRA_SMALL] });
4897
4897
  }
4898
4898
  let filePath = await find();
4899
4899
  if (!filePath && kind === 'file' && options.fetch) {
4900
- const { downloadTransactionIdWithDedupe } = await import('./download-Cvac_VGu.js');
4900
+ const { downloadTransactionIdWithDedupe } = await import('./download-DHWUPLlK.js');
4901
4901
  await downloadTransactionIdWithDedupe(name);
4902
4902
  filePath = await find();
4903
4903
  }
@@ -6069,12 +6069,12 @@ async function loadPropertyDefinition(db, { propertyId, modelName, modelFileId,
6069
6069
  }
6070
6070
  if (!modelName)
6071
6071
  return undefined;
6072
- const { loadModelPropertyRecordSchemas } = await import('./modelPropertyRecordSchemas-se4QMXSi.js');
6072
+ const { loadModelPropertyRecordSchemas } = await import('./modelPropertyRecordSchemas-CEac3FB8.js');
6073
6073
  const definition = (await loadModelPropertyRecordSchemas(modelName, modelFileId, db)).get(propertyName);
6074
6074
  if (definition)
6075
6075
  return definition;
6076
- const _mod_2 = await import('./errors-DKxFSvb3.js');
6077
- const _ns_2 = _mod_2._;
6076
+ const _mod_2 = await import('./publishErrors-DZXDX3B6.js');
6077
+ const _ns_2 = _mod_2.am;
6078
6078
  const { Model } = _ns_2;
6079
6079
  const { modelPropertiesToObject } = await Promise.resolve().then(function () { return model; });
6080
6080
  // Try the name first ("post" -> "Post"); then findByModelType for names with spaces ("new_model" -> "New model")
@@ -6183,7 +6183,7 @@ function whenValidationLoaded() {
6183
6183
  // neutralizes the minified chunk-export read (`.then(n => n._)`) in this form
6184
6184
  validationLoading ?? (validationLoading = (async () => {
6185
6185
  try {
6186
- const { SchemaValidationService } = await import('./SchemaValidationService-CW0s7V7R.js');
6186
+ const { SchemaValidationService } = await import('./SchemaValidationService-Dc-lpFQX.js');
6187
6187
  validationService = new SchemaValidationService();
6188
6188
  }
6189
6189
  finally {
@@ -6424,7 +6424,7 @@ hints = {}) => {
6424
6424
  return definition;
6425
6425
  }
6426
6426
  const { resolveItemModelFileId } = await Promise.resolve().then(function () { return resolveModelRecord$1; });
6427
- const { getModelPropertyDefinitions, resolvePropertyKey } = await import('./property-Broz_CWj.js');
6427
+ const { getModelPropertyDefinitions, resolvePropertyKey } = await import('./property-4jSqHieb.js');
6428
6428
  const modelFileId = (await resolveItemModelFileId(hints)) ?? undefined;
6429
6429
  const name = modelName || ((await modelTypeToModelName(modelType)) ?? '');
6430
6430
  // An ambiguous bare name reads nothing here; the in-memory model below may still know it
@@ -6432,8 +6432,8 @@ hints = {}) => {
6432
6432
  const key = resolvePropertyKey(definitions, propertyName);
6433
6433
  if (key)
6434
6434
  return definitions[key];
6435
- const _mod_3 = await import('./errors-DKxFSvb3.js');
6436
- const _ns_3 = _mod_3._;
6435
+ const _mod_3 = await import('./publishErrors-DZXDX3B6.js');
6436
+ const _ns_3 = _mod_3.am;
6437
6437
  const { Model } = _ns_3;
6438
6438
  const { modelPropertiesToObject } = await Promise.resolve().then(function () { return model; });
6439
6439
  let model$1 = modelName ? Model.peekByName(modelName) : undefined;
@@ -6615,7 +6615,7 @@ class ItemProperty {
6615
6615
  return;
6616
6616
  }
6617
6617
  // Use dynamic import to break circular dependency
6618
- const schemaMod = await import('./index-CghAYA-z.js');
6618
+ const schemaMod = await import('./index-CmNqUKQN.js');
6619
6619
  const { ModelPropertyDataTypes } = schemaMod;
6620
6620
  const { context } = snapshot;
6621
6621
  const { propertyRecordSchema } = context;
@@ -6828,7 +6828,7 @@ class ItemProperty {
6828
6828
  // The change feed reports writes by stored name: watch every name this property's rows have
6829
6829
  const propertyNames = [...property.names];
6830
6830
  if (propertyId != null) {
6831
- const _mod_4 = await import('./index-BjWk0x4-.js');
6831
+ const _mod_4 = await import('./index-2PaIhvOU.js');
6832
6832
  const _ns_4 = _mod_4.s;
6833
6833
  const { metadata } = _ns_4;
6834
6834
  const { eq: eqOp } = await import('drizzle-orm');
@@ -7391,7 +7391,7 @@ class ItemProperty {
7391
7391
  // (`textId` → `text`, `authorIdentityIds` → `authors`)
7392
7392
  const definitionsKey = JSON.stringify([modelName, modelFileId ?? null]);
7393
7393
  if (modelName && !definitionsByModel.has(definitionsKey)) {
7394
- const { getModelPropertyDefinitions } = await import('./property-Broz_CWj.js');
7394
+ const { getModelPropertyDefinitions } = await import('./property-4jSqHieb.js');
7395
7395
  definitionsByModel.set(definitionsKey,
7396
7396
  // No model row: the stored name decides
7397
7397
  getModelPropertyDefinitions(modelName, { modelFileId }).then(Object.fromEntries, () => ({})));
@@ -7565,7 +7565,7 @@ class ItemProperty {
7565
7565
  const { seedLocalId, propertyName } = this._getSnapshotContext();
7566
7566
  if (!seedLocalId || !propertyName)
7567
7567
  return;
7568
- const { appendOutboxOpAndWait, markPropertyConflictsResolved, startItemOutbox, throwItemWriteError } = await import('./index-9udoYObJ.js');
7568
+ const { appendOutboxOpAndWait, markPropertyConflictsResolved, startItemOutbox, throwItemWriteError } = await import('./index-BXTyvnKb.js');
7569
7569
  if (choice === 'remote') {
7570
7570
  startItemOutbox();
7571
7571
  await appendOutboxOpAndWait({
@@ -7629,8 +7629,10 @@ class ItemProperty {
7629
7629
  * Versions stop showing the value too. Revocation is permanent.
7630
7630
  * @throws ClearNotSupportedError for a Boolean or Date property without `retract`: their EAS types
7631
7631
  * have no empty value.
7632
+ * @throws EntityUnloadedError when this instance was unloaded; nothing is written.
7632
7633
  */
7633
7634
  async clear(options = {}) {
7635
+ this._assertLoaded('clear');
7634
7636
  const retract = options.retract === true;
7635
7637
  const context = this._getSnapshotContext();
7636
7638
  const dataType = normalizeDataType(this._dataType ?? context.propertyRecordSchema?.dataType);
@@ -7751,7 +7753,7 @@ class ItemProperty {
7751
7753
  /** Waits for an appended op to settle, then shows its row, or the current value if it failed. */
7752
7754
  async _followWrite(write, appended, plan) {
7753
7755
  try {
7754
- const { getOutboxOps, outboxOpResult, startItemOutbox, waitForOutboxOp } = await import('./index-9udoYObJ.js');
7756
+ const { getOutboxOps, outboxOpResult, startItemOutbox, waitForOutboxOp } = await import('./index-BXTyvnKb.js');
7755
7757
  startItemOutbox();
7756
7758
  const opId = await appended;
7757
7759
  await waitForOutboxOp(opId);
@@ -7810,7 +7812,7 @@ class ItemProperty {
7810
7812
  this._service.send({ type: 'updateContext', ...outcome.applied, isSaving: false });
7811
7813
  return;
7812
7814
  }
7813
- const { throwItemWriteError } = await import('./index-9udoYObJ.js');
7815
+ const { throwItemWriteError } = await import('./index-BXTyvnKb.js');
7814
7816
  let error = outcome.error;
7815
7817
  try {
7816
7818
  throwItemWriteError(outcome.error);
@@ -7945,7 +7947,7 @@ class ItemProperty {
7945
7947
  if (db && seedLocalId) {
7946
7948
  // Through the outbox (ADR 0019): after the property's pending edits, which would
7947
7949
  // otherwise write its rows back
7948
- const { appendOutboxOpAndWait, startItemOutbox, throwItemWriteError } = await import('./index-9udoYObJ.js');
7950
+ const { appendOutboxOpAndWait, startItemOutbox, throwItemWriteError } = await import('./index-BXTyvnKb.js');
7949
7951
  startItemOutbox();
7950
7952
  await appendOutboxOpAndWait({
7951
7953
  seedLocalId,
@@ -7955,7 +7957,7 @@ class ItemProperty {
7955
7957
  }).catch(throwItemWriteError);
7956
7958
  }
7957
7959
  else if (db) {
7958
- const _mod_5 = await import('./index-BjWk0x4-.js');
7960
+ const _mod_5 = await import('./index-2PaIhvOU.js');
7959
7961
  const _ns_5 = _mod_5.s;
7960
7962
  const seedSchemaMod = _ns_5;
7961
7963
  const { metadata } = seedSchemaMod;
@@ -8123,8 +8125,8 @@ const createNewItem = async ({ modelName, modelFileId, ...propertyData }) => {
8123
8125
  }
8124
8126
  const seedType = easName(modelName);
8125
8127
  // Dynamic import to break circular dependency
8126
- const _mod_6 = await import('./errors-DKxFSvb3.js');
8127
- const _ns_6 = _mod_6._;
8128
+ const _mod_6 = await import('./publishErrors-DZXDX3B6.js');
8129
+ const _ns_6 = _mod_6.am;
8128
8130
  const modelMod = _ns_6;
8129
8131
  const { Model } = modelMod;
8130
8132
  const label = `createNewItem ${modelName}`;
@@ -8181,7 +8183,7 @@ const createNewItem = async ({ modelName, modelFileId, ...propertyData }) => {
8181
8183
  }
8182
8184
  rows.push({ propertyName, propertyValue, propertyRecordSchema, schemaUid: schemaUids.get(propertyName) });
8183
8185
  }
8184
- const { appendOutboxOpAndWait, startItemOutbox } = await import('./index-9udoYObJ.js');
8186
+ const { appendOutboxOpAndWait, startItemOutbox } = await import('./index-BXTyvnKb.js');
8185
8187
  startItemOutbox();
8186
8188
  const fields = await timed(`${label} seed fields`, () => resolveNewSeedFields(seedType));
8187
8189
  const applied = await timed(`${label} outbox apply`, () => appendOutboxOpAndWait({
@@ -8200,8 +8202,8 @@ const createNewItem = async ({ modelName, modelFileId, ...propertyData }) => {
8200
8202
  }
8201
8203
  catch (error) {
8202
8204
  // Staged values of a create that never got appended (once appended, the op's discard does it)
8203
- const _mod_7 = await import('./errors-DKxFSvb3.js');
8204
- const _ns_7 = _mod_7.a1;
8205
+ const _mod_7 = await import('./publishErrors-DZXDX3B6.js');
8206
+ const _ns_7 = _mod_7.ap;
8205
8207
  const { deleteFiles } = _ns_7;
8206
8208
  await deleteFiles(stagedPaths);
8207
8209
  throw error;
@@ -8276,15 +8278,15 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
8276
8278
  };
8277
8279
  // The model's property definitions from their rows; a model created in this session whose
8278
8280
  // rows aren't written yet gives its in-memory ones
8279
- const { getModelPropertyDefinitions } = await import('./property-Broz_CWj.js');
8281
+ const { getModelPropertyDefinitions } = await import('./property-4jSqHieb.js');
8280
8282
  let propertySchemas = Object.fromEntries(await getModelPropertyDefinitions(modelName, modelScope).catch((err) => {
8281
8283
  logger(`No property definitions for ${modelName}: ${err}`);
8282
8284
  return [];
8283
8285
  }));
8284
8286
  if (Object.keys(propertySchemas).length === 0) {
8285
8287
  const { modelPropertiesToObject } = await Promise.resolve().then(function () { return model; });
8286
- const _mod_8 = await import('./errors-DKxFSvb3.js');
8287
- const _ns_8 = _mod_8._;
8288
+ const _mod_8 = await import('./publishErrors-DZXDX3B6.js');
8289
+ const _ns_8 = _mod_8.am;
8288
8290
  const { Model } = _ns_8;
8289
8291
  const model$1 = Model.resolve(modelName, modelScope);
8290
8292
  if (model$1?.properties?.length)
@@ -8311,7 +8313,7 @@ const createItemPropertyInstances = async (metadataRows, seedLocalId, seedUid, m
8311
8313
  // Infer propertyRecordSchema from metadata when schema is missing (enables persistence)
8312
8314
  let propSchema = propertySchemas[propertyName];
8313
8315
  if (!propSchema && isRefTypeFromMeta) {
8314
- const schemaMod = await import('./index-CghAYA-z.js');
8316
+ const schemaMod = await import('./index-CmNqUKQN.js');
8315
8317
  const { ModelPropertyDataTypes } = schemaMod;
8316
8318
  propSchema = {
8317
8319
  dataType: refSeedType === 'html' ? ModelPropertyDataTypes.Html
@@ -8694,8 +8696,8 @@ const getModel = () => {
8694
8696
  // the fragile `import(...).then(n => n.X)` chunk-namespace pattern.
8695
8697
  if (!modelImportPromise) {
8696
8698
  modelImportPromise = (async () => {
8697
- const _mod_9 = await import('./errors-DKxFSvb3.js');
8698
- const _ns_9 = _mod_9._;
8699
+ const _mod_9 = await import('./publishErrors-DZXDX3B6.js');
8700
+ const _ns_9 = _mod_9.am;
8699
8701
  const mod = _ns_9;
8700
8702
  ModelClass = mod.Model;
8701
8703
  return mod;
@@ -8895,15 +8897,15 @@ class Item {
8895
8897
  };
8896
8898
  this.getPublishUploads = async (options) => {
8897
8899
  // Use dynamic import to break circular dependency
8898
- const _mod_10 = await import('./getPublishUploads-DFcgc27c.js');
8899
- const _ns_10 = _mod_10.q;
8900
+ const _mod_10 = await import('./publishErrors-DZXDX3B6.js');
8901
+ const _ns_10 = _mod_10.aq;
8900
8902
  const getPublishUploadsMod = _ns_10;
8901
8903
  const { getPublishUploads } = getPublishUploadsMod;
8902
8904
  return await getPublishUploads(this, options);
8903
8905
  };
8904
8906
  this.getPublishPayload = async (uploadedTransactions, options) => {
8905
- const _mod_11 = await import('./getPublishPayload-CLrAcZwr.js');
8906
- const _ns_11 = _mod_11.c;
8907
+ const _mod_11 = await import('./getPublishPayload-Dd3HCYeI.js');
8908
+ const _ns_11 = _mod_11.b;
8907
8909
  const getPublishPayloadMod = _ns_11;
8908
8910
  const { getPublishPayload } = getPublishPayloadMod;
8909
8911
  return await getPublishPayload(this, uploadedTransactions, options);
@@ -9301,8 +9303,8 @@ class Item {
9301
9303
  });
9302
9304
  const modelRecords = modelRecord ? [modelRecord] : [];
9303
9305
  if (!modelRecord) {
9304
- const _mod_12 = await import('./errors-DKxFSvb3.js');
9305
- const _ns_12 = _mod_12.a2;
9306
+ const _mod_12 = await import('./publishErrors-DZXDX3B6.js');
9307
+ const _ns_12 = _mod_12.ar;
9306
9308
  const { UnknownModelError } = _ns_12;
9307
9309
  throw new UnknownModelError(props.modelName, schemaName ?? modelInstance?.schemaName);
9308
9310
  }
@@ -9415,7 +9417,7 @@ class Item {
9415
9417
  /* best-effort cache cleanup */
9416
9418
  }
9417
9419
  try {
9418
- const { appendOutboxOpAndWait, deleteFiles, startItemOutbox } = await import('./index-9udoYObJ.js');
9420
+ const { appendOutboxOpAndWait, deleteFiles, startItemOutbox } = await import('./index-BXTyvnKb.js');
9419
9421
  startItemOutbox();
9420
9422
  const applied = await appendOutboxOpAndWait({
9421
9423
  seedLocalId,
@@ -9438,8 +9440,8 @@ class Item {
9438
9440
  for (const [propertyName, value] of pipelineValues) {
9439
9441
  const property = await this.waitForPropertyInstance(item, propertyName, timeout);
9440
9442
  if (!property) {
9441
- const _mod_13 = await import('./errors-DKxFSvb3.js');
9442
- const _ns_13 = _mod_13.a2;
9443
+ const _mod_13 = await import('./publishErrors-DZXDX3B6.js');
9444
+ const _ns_13 = _mod_13.ar;
9443
9445
  const { ItemCreateError } = _ns_13;
9444
9446
  throw new ItemCreateError(`Item.create: property ${item.modelName}.${propertyName} did not load for item ${item.seedLocalId}; value was not saved`, { code: 'property_not_loaded', modelName: item.modelName, property: propertyName, seedLocalId: item.seedLocalId });
9445
9447
  }
@@ -9450,15 +9452,15 @@ class Item {
9450
9452
  }
9451
9453
  catch (error) {
9452
9454
  if (error instanceof ItemPropertySaveValidationError) {
9453
- const _mod_14 = await import('./errors-DKxFSvb3.js');
9454
- const _ns_14 = _mod_14.a2;
9455
+ const _mod_14 = await import('./publishErrors-DZXDX3B6.js');
9456
+ const _ns_14 = _mod_14.ar;
9455
9457
  const { ItemCreateValidationError } = _ns_14;
9456
9458
  const created = new ItemCreateValidationError(item.modelName, error.validationErrors.map((e) => ({ property: propertyName, code: e.code, message: e.message })));
9457
9459
  created.cause = error;
9458
9460
  throw created;
9459
9461
  }
9460
- const _mod_15 = await import('./errors-DKxFSvb3.js');
9461
- const _ns_15 = _mod_15.a2;
9462
+ const _mod_15 = await import('./publishErrors-DZXDX3B6.js');
9463
+ const _ns_15 = _mod_15.ar;
9462
9464
  const { ItemCreateError } = _ns_15;
9463
9465
  throw new ItemCreateError(`Item.create: failed to save ${item.modelName}.${propertyName} for item ${item.seedLocalId}: ` +
9464
9466
  (error instanceof Error ? error.message : String(error)), { code: 'save_failed', modelName: item.modelName, property: propertyName, seedLocalId: item.seedLocalId, cause: error });
@@ -9635,7 +9637,7 @@ class Item {
9635
9637
  if (!appDb || Item.cache.size === 0) {
9636
9638
  return;
9637
9639
  }
9638
- const _mod_16 = await import('./index-BjWk0x4-.js');
9640
+ const _mod_16 = await import('./index-2PaIhvOU.js');
9639
9641
  const _ns_16 = _mod_16.s;
9640
9642
  const { metadata } = _ns_16;
9641
9643
  const { eq, and } = await import('drizzle-orm');
@@ -9747,11 +9749,11 @@ class Item {
9747
9749
  }
9748
9750
  /** Throws ItemCreateValidationError for unknown keys and values that break their property's rules. */
9749
9751
  static async assertValidCreateValues(props, propertyNames, dataTypeByPropertyName, skipKeys) {
9750
- const _mod_17 = await import('./errors-DKxFSvb3.js');
9751
- const _ns_17 = _mod_17.a2;
9752
+ const _mod_17 = await import('./publishErrors-DZXDX3B6.js');
9753
+ const _ns_17 = _mod_17.ar;
9752
9754
  const { ItemCreateValidationError } = _ns_17;
9753
- const { getModelPropertyDefinitions, resolvePropertyKey } = await import('./property-Broz_CWj.js');
9754
- const { SchemaValidationService } = await import('./SchemaValidationService-CW0s7V7R.js');
9755
+ const { getModelPropertyDefinitions, resolvePropertyKey } = await import('./property-4jSqHieb.js');
9756
+ const { SchemaValidationService } = await import('./SchemaValidationService-Dc-lpFQX.js');
9755
9757
  const validationService = new SchemaValidationService();
9756
9758
  const modelName = props.modelName;
9757
9759
  const known = new Set(propertyNames);
@@ -10105,7 +10107,7 @@ class Item {
10105
10107
  itemActor.send(event);
10106
10108
  };
10107
10109
  try {
10108
- const _mod_18 = await import('./index-BjWk0x4-.js');
10110
+ const _mod_18 = await import('./index-2PaIhvOU.js');
10109
10111
  const _ns_18 = _mod_18.s;
10110
10112
  const seedSchemaMod = _ns_18;
10111
10113
  const { seeds, metadata } = seedSchemaMod;
@@ -10418,7 +10420,7 @@ class Item {
10418
10420
  return;
10419
10421
  }
10420
10422
  // Through the outbox (ADR 0019): after the item's pending edits, not before them
10421
- const { appendOutboxOpAndWait, startItemOutbox, throwItemWriteError } = await import('./index-9udoYObJ.js');
10423
+ const { appendOutboxOpAndWait, startItemOutbox, throwItemWriteError } = await import('./index-BXTyvnKb.js');
10422
10424
  startItemOutbox();
10423
10425
  await appendOutboxOpAndWait({
10424
10426
  seedLocalId: context.seedLocalId,
@@ -10445,5 +10447,5 @@ var Item$1 = /*#__PURE__*/Object.freeze({
10445
10447
  Item: Item
10446
10448
  });
10447
10449
 
10448
- export { holdChild as $, AmbiguousModelError as A, metadataPropertyGroupKeys as B, ClearNotSupportedError as C, compareMetadataRowsLatestFirst as D, readMetadataPropertiesById as E, isPublishedMetadataRow as F, getLatestPublishedVersionRow as G, findSeedRow as H, Item as I, isVersionRevoked as J, getPropertyDefinitions as K, readModelMetadataProperties as L, metadataPropertyNameForms as M, currentPropertyRow as N, OUTBOX_PRUNE_AFTER_MS as O, getLatestVersionRow as P, resolveModelRecord as Q, resolveModelRecordByNameOrType as R, parseListPropertyValueFromStorage as S, writeInBatches as T, getItemStorageSubdir as U, getAllAddressesFromDb as V, whenDbReady as W, applyContextUpdate as X, isInternalUpdate as Y, evictionLog as Z, addSchemaToDb as _, appendOutboxOpAndWait as a, getMetadataLatest as a$, isEntityTornDown as a0, sameEntity as a1, DEFAULT_READY_TIMEOUT_MS as a2, createReactiveProxy as a3, runEntityLoad as a4, waitForEntityReady as a5, evictEntities as a6, EntityUnloadedError as a7, entityStatus as a8, inDefinitionsTransaction as a9, metadataRowsOfProperty as aA, METADATA_LATEST_FIRST_ORDER_SQL as aB, getEasSchemaUidForModel as aC, isStorageSeedRef as aD, isActorStopped as aE, differsFromOriginals as aF, definitionOnlyFields as aG, persistDefinitionFields as aH, onEntityTeardown as aI, getPropertyDefinition as aJ, propertyDefinitionFromRow as aK, addCachedPropertyRefresher as aL, getStorageTransactionIdForSeedUid as aM, latestVersionOrder as aN, otherVersionRowsWithUid as aO, mergeVersionRowInto as aP, findMetadataPropertyByName as aQ, storedValueKind as aR, resolveStorageDisplay as aS, resolvePublisherFromSeedRow as aT, ClientManagerState as aU, MachineIds as aV, PUBLISH_NOT_CONFIGURED_MESSAGE as aW, createNewItem as aX, getAddressesForItemsFilter as aY, getArweaveUrlForTransaction as aZ, getGetPublisherForNewSeeds as a_, releaseEntity as aa, destroyEntity as ab, isClientReady as ac, upsertSchemaRow as ad, broadcastSchemasInvalidate as ae, EntityCache as af, normalizePublisher as ag, chunkValues as ah, rowsPerInsert as ai, loadNameMatchLevels as aj, getGetAdditionalSyncAddresses as ak, findSeedRowsByUid as al, normalizeHexAddress as am, selectInBatches as an, nameMatchLevels as ao, modelPropertiesToObject as ap, listRelationEasPropertyName as aq, easPropertyNameForPublish as ar, metadataStorageName as as, resolveMetadataPropertyId as at, getItemStoragePropertiesForModel as au, resolveItemModelFileId as av, storageSeedTransactionId as aw, storageUploadPath as ax, getItemStorageLocalFileName as ay, matchMetadataProperty as az, waitForPendingOutboxOps as b, getPublishExecutor as b0, getRevokeExecutor as b1, getUploadExecutor as b2, getVersionData as b3, isClientReadySnapshot as b4, isLocalUnsealedDraft as b5, isSeedRowOwned as b6, localUnsealedDraftSql as b7, normalizeAddressConfig as b8, normalizeAddressList as b9, requireStagedFile as bA, findSetConflict as bB, recordPropertyEdit as bC, startOutbox as bD, createSeed as bE, storageValueRowOf as bF, ClientManagerEvents as bG, getWatchedAddressesFromDb as bH, getOwnedAddressesFromDb as bI, setEntityUnloadGraceMs as bJ, stopOutbox as bK, evictAllEntities as bL, registerClientActor as bM, findSeedRow$1 as bN, resolveModelRecord$1 as bO, propertyDefinition as bP, definitions as bQ, db as bR, currentPropertyRow$1 as bS, propertySchemaUid as bT, findFile as bU, resolve as bV, conflicts as bW, Item$1 as bX, ownedPublisherSql as ba, ownedSeedsSql as bb, pickLatestMetadataRowPerProperty as bc, placeholderUidSql as bd, propertyMachine as be, publisherInAddressListSql as bf, publisherIsInOwnedSet as bg, setAdditionalSyncAddresses as bh, setGetPublisherForNewSeeds as bi, setPublishExecutor as bj, setRevokeExecutor as bk, setUploadExecutor as bl, writeModelToDb as bm, writePropertyToDb as bn, currentNameMatchLevels as bo, renameModelInDb as bp, insertModelStubs as bq, warnOnInvalidNameMatch as br, refreshCachedProperties as bs, resolveMetadataProperty as bt, lookupPropertySchemaUid as bu, deleteStagedFile as bv, storageFileName as bw, STORAGE_SUBDIR as bx, resolveNewSeedFields as by, stageStorageContent as bz, OUTBOX_PRUNE_FAILED_AFTER_MS as c, OutboxOpDeferredError as d, OutboxOpFailedError as e, OutboxOpRejectedError as f, getOutboxOps as g, appendOutboxOp as h, drainOutbox as i, getPendingSetValue as j, outboxOpValue as k, ItemProperty as l, markPropertyConflictsResolved as m, ItemPropertySaveValidationError as n, outboxOpResult as o, pruneOutbox as p, OwnershipError as q, registerOutboxApplier as r, assertItemOwned as s, getCorrectId as t, isItemOwned as u, isPublishedSeedRef as v, waitForOutboxOp as w, propertyKeyFromStoredName as x, findFileInDir as y, currentPropertyRows as z };
10449
- //# sourceMappingURL=Item-Ld1iPicQ.js.map
10450
+ export { entityStatus as $, AmbiguousModelError as A, metadataPropertyGroupKeys as B, ClearNotSupportedError as C, compareMetadataRowsLatestFirst as D, EntityUnloadedError as E, readMetadataPropertiesById as F, isPublishedMetadataRow as G, getLatestPublishedVersionRow as H, Item as I, writeInBatches as J, getItemStorageSubdir as K, getAllAddressesFromDb as L, whenDbReady as M, applyContextUpdate as N, OUTBOX_PRUNE_AFTER_MS as O, isInternalUpdate as P, evictionLog as Q, addSchemaToDb as R, StagedValueMissingError as S, holdChild as T, isEntityTornDown as U, sameEntity as V, DEFAULT_READY_TIMEOUT_MS as W, createReactiveProxy as X, runEntityLoad as Y, waitForEntityReady as Z, evictEntities as _, appendOutboxOpAndWait as a, normalizeAddressConfig as a$, inDefinitionsTransaction as a0, releaseEntity as a1, destroyEntity as a2, isClientReady as a3, upsertSchemaRow as a4, broadcastSchemasInvalidate as a5, EntityCache as a6, normalizePublisher as a7, chunkValues as a8, rowsPerInsert as a9, addCachedPropertyRefresher as aA, getStorageTransactionIdForSeedUid as aB, latestVersionOrder as aC, otherVersionRowsWithUid as aD, mergeVersionRowInto as aE, isVersionRevoked as aF, findMetadataPropertyByName as aG, readModelMetadataProperties as aH, parseListPropertyValueFromStorage as aI, findSeedRow as aJ, resolvePublisherFromSeedRow as aK, ClientManagerState as aL, MachineIds as aM, PUBLISH_NOT_CONFIGURED_MESSAGE as aN, createNewItem as aO, getAddressesForItemsFilter as aP, getArweaveUrlForTransaction as aQ, getGetPublisherForNewSeeds as aR, getMetadataLatest as aS, getPublishExecutor as aT, getRevokeExecutor as aU, getUploadExecutor as aV, getVersionData as aW, isClientReadySnapshot as aX, isLocalUnsealedDraft as aY, isSeedRowOwned as aZ, localUnsealedDraftSql as a_, loadNameMatchLevels as aa, getGetAdditionalSyncAddresses as ab, findSeedRowsByUid as ac, normalizeHexAddress as ad, selectInBatches as ae, nameMatchLevels as af, modelPropertiesToObject as ag, listRelationEasPropertyName as ah, easPropertyNameForPublish as ai, metadataStorageName as aj, resolveMetadataPropertyId as ak, getItemStoragePropertiesForModel as al, resolveItemModelFileId as am, matchMetadataProperty as an, metadataRowsOfProperty as ao, METADATA_LATEST_FIRST_ORDER_SQL as ap, getEasSchemaUidForModel as aq, isStorageSeedRef as ar, isActorStopped as as, differsFromOriginals as at, resolveModelRecord as au, definitionOnlyFields as av, persistDefinitionFields as aw, onEntityTeardown as ax, getPropertyDefinition as ay, propertyDefinitionFromRow as az, waitForPendingOutboxOps as b, normalizeAddressList as b0, ownedPublisherSql as b1, ownedSeedsSql as b2, pickLatestMetadataRowPerProperty as b3, placeholderUidSql as b4, propertyMachine as b5, publisherInAddressListSql as b6, publisherIsInOwnedSet as b7, setAdditionalSyncAddresses as b8, setGetPublisherForNewSeeds as b9, getWatchedAddressesFromDb as bA, getOwnedAddressesFromDb as bB, setEntityUnloadGraceMs as bC, stopOutbox as bD, evictAllEntities as bE, registerClientActor as bF, getPropertyDefinitions as bG, metadataPropertyNameForms as bH, currentPropertyRow as bI, resolveModelRecordByNameOrType as bJ, storageSeedTransactionId as bK, storageUploadPath as bL, storedValueKind as bM, resolveStorageDisplay as bN, findSeedRow$1 as bO, resolveModelRecord$1 as bP, propertyDefinition as bQ, definitions as bR, db as bS, currentPropertyRow$1 as bT, propertySchemaUid as bU, findFile as bV, resolve as bW, conflicts as bX, Item$1 as bY, setPublishExecutor as ba, setRevokeExecutor as bb, setUploadExecutor as bc, writeModelToDb as bd, writePropertyToDb as be, currentNameMatchLevels as bf, renameModelInDb as bg, insertModelStubs as bh, warnOnInvalidNameMatch as bi, refreshCachedProperties as bj, resolveMetadataProperty as bk, lookupPropertySchemaUid as bl, getItemStorageLocalFileName as bm, deleteStagedFile as bn, storageFileName as bo, STORAGE_SUBDIR as bp, resolveNewSeedFields as bq, stageStorageContent as br, requireStagedFile as bs, findSetConflict as bt, recordPropertyEdit as bu, startOutbox as bv, createSeed as bw, storageValueRowOf as bx, getLatestVersionRow as by, ClientManagerEvents as bz, OUTBOX_PRUNE_FAILED_AFTER_MS as c, OutboxOpDeferredError as d, OutboxOpFailedError as e, OutboxOpRejectedError as f, getOutboxOps as g, appendOutboxOp as h, drainOutbox as i, getPendingSetValue as j, outboxOpValue as k, ItemProperty as l, markPropertyConflictsResolved as m, ItemPropertySaveValidationError as n, outboxOpResult as o, pruneOutbox as p, OwnershipError as q, registerOutboxApplier as r, assertItemOwned as s, getCorrectId as t, isItemOwned as u, isPublishedSeedRef as v, waitForOutboxOp as w, propertyKeyFromStoredName as x, findFileInDir as y, currentPropertyRows as z };
10451
+ //# sourceMappingURL=Item-BU9wIT7l.js.map