@seedprotocol/sdk 0.3.31 → 0.4.0
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/README.md +15 -2
- package/dist/Item/Item.js +954 -0
- package/dist/Item/Item.js.map +1 -0
- package/dist/Item/queries.js +66 -0
- package/dist/Item/queries.js.map +1 -0
- package/dist/Item/service/actors/fetchDataFromEas.js +94 -0
- package/dist/Item/service/actors/fetchDataFromEas.js.map +1 -0
- package/dist/Item/service/actors/hydrateExistingItem.js +124 -0
- package/dist/Item/service/actors/hydrateExistingItem.js.map +1 -0
- package/dist/Item/service/actors/hydrateNewItem.js.map +1 -0
- package/dist/Item/service/actors/initialize.js +50 -0
- package/dist/Item/service/actors/initialize.js.map +1 -0
- package/dist/Item/service/actors/loadOrCreateItem.js +210 -0
- package/dist/Item/service/actors/loadOrCreateItem.js.map +1 -0
- package/dist/Item/service/actors/reload.js.map +1 -0
- package/dist/Item/service/actors/waitForDb.js.map +1 -0
- package/dist/Item/service/itemMachineSingle.js +211 -0
- package/dist/Item/service/itemMachineSingle.js.map +1 -0
- package/dist/ItemProperty/ItemProperty.js +613 -0
- package/dist/ItemProperty/ItemProperty.js.map +1 -0
- package/dist/ItemProperty/service/actors/hydrateFromDb.js +207 -0
- package/dist/ItemProperty/service/actors/hydrateFromDb.js.map +1 -0
- package/dist/ItemProperty/service/actors/initialize.js +74 -0
- package/dist/ItemProperty/service/actors/initialize.js.map +1 -0
- package/dist/ItemProperty/service/actors/loadOrCreateProperty.js +125 -0
- package/dist/ItemProperty/service/actors/loadOrCreateProperty.js.map +1 -0
- package/dist/ItemProperty/service/actors/resolveRelatedValue.js +321 -0
- package/dist/ItemProperty/service/actors/resolveRelatedValue.js.map +1 -0
- package/dist/ItemProperty/service/actors/resolveRemoteStorage.js.map +1 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/analyzeInput.js +111 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/analyzeInput.js.map +1 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/saveImage.js.map +1 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/saveItemStorage.js +121 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/saveItemStorage.js.map +1 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/saveRelation.js +85 -0
- package/dist/ItemProperty/service/actors/saveValueToDb/saveRelation.js.map +1 -0
- package/dist/ItemProperty/service/actors/waitForDb.js.map +1 -0
- package/dist/ItemProperty/service/propertyMachine.js +233 -0
- package/dist/ItemProperty/service/propertyMachine.js.map +1 -0
- package/dist/Model/Model.js +1831 -0
- package/dist/Model/Model.js.map +1 -0
- package/dist/Model/index.js +8 -0
- package/dist/Model/index.js.map +1 -0
- package/dist/Model/service/actors/createModelProperties.js +102 -0
- package/dist/Model/service/actors/createModelProperties.js.map +1 -0
- package/dist/Model/service/actors/loadOrCreateModel.js +397 -0
- package/dist/Model/service/actors/loadOrCreateModel.js.map +1 -0
- package/dist/Model/service/actors/validateModel.js +123 -0
- package/dist/Model/service/actors/validateModel.js.map +1 -0
- package/dist/Model/service/modelMachine.js +385 -0
- package/dist/Model/service/modelMachine.js.map +1 -0
- package/dist/ModelProperty/ModelProperty.js +841 -0
- package/dist/ModelProperty/ModelProperty.js.map +1 -0
- package/dist/ModelProperty/service/actors/compareAndMarkDraft.js +119 -0
- package/dist/ModelProperty/service/actors/compareAndMarkDraft.js.map +1 -0
- package/dist/ModelProperty/service/actors/saveToSchema.js +108 -0
- package/dist/ModelProperty/service/actors/saveToSchema.js.map +1 -0
- package/dist/ModelProperty/service/actors/validateProperty.js +129 -0
- package/dist/ModelProperty/service/actors/validateProperty.js.map +1 -0
- package/dist/ModelProperty/service/modelPropertyMachine.js +275 -0
- package/dist/ModelProperty/service/modelPropertyMachine.js.map +1 -0
- package/dist/Schema/Schema.js +1732 -0
- package/dist/Schema/Schema.js.map +1 -0
- package/dist/Schema/errors.js +14 -0
- package/dist/Schema/errors.js.map +1 -0
- package/dist/Schema/index.js +7 -0
- package/dist/Schema/index.js.map +1 -0
- package/dist/Schema/service/actors/checkExistingSchema.js +454 -0
- package/dist/Schema/service/actors/checkExistingSchema.js.map +1 -0
- package/dist/Schema/service/actors/createModelInstances.js +71 -0
- package/dist/Schema/service/actors/createModelInstances.js.map +1 -0
- package/dist/Schema/service/actors/createPropertyInstances.js +86 -0
- package/dist/Schema/service/actors/createPropertyInstances.js.map +1 -0
- package/dist/Schema/service/actors/loadOrCreateSchema.js +1336 -0
- package/dist/Schema/service/actors/loadOrCreateSchema.js.map +1 -0
- package/dist/Schema/service/actors/validateSchema.js +65 -0
- package/dist/Schema/service/actors/validateSchema.js.map +1 -0
- package/dist/Schema/service/actors/verifyModelInstancesInCache.js +88 -0
- package/dist/Schema/service/actors/verifyModelInstancesInCache.js.map +1 -0
- package/dist/Schema/service/actors/verifyModelsInDb.js +107 -0
- package/dist/Schema/service/actors/verifyModelsInDb.js.map +1 -0
- package/dist/Schema/service/actors/verifyPropertiesInDb.js +131 -0
- package/dist/Schema/service/actors/verifyPropertiesInDb.js.map +1 -0
- package/dist/Schema/service/actors/verifyPropertyInstancesInCache.js +88 -0
- package/dist/Schema/service/actors/verifyPropertyInstancesInCache.js.map +1 -0
- package/dist/Schema/service/actors/verifySchemaInDb.js +85 -0
- package/dist/Schema/service/actors/verifySchemaInDb.js.map +1 -0
- package/dist/Schema/service/actors/writeModelsToDb.js +185 -0
- package/dist/Schema/service/actors/writeModelsToDb.js.map +1 -0
- package/dist/Schema/service/actors/writePropertiesToDb.js +69 -0
- package/dist/Schema/service/actors/writePropertiesToDb.js.map +1 -0
- package/dist/Schema/service/actors/writeSchemaToDb.js +137 -0
- package/dist/Schema/service/actors/writeSchemaToDb.js.map +1 -0
- package/dist/Schema/service/addModelsMachine.js +545 -0
- package/dist/Schema/service/addModelsMachine.js.map +1 -0
- package/dist/Schema/service/schemaMachine.js +667 -0
- package/dist/Schema/service/schemaMachine.js.map +1 -0
- package/dist/Schema/service/validation/SchemaValidationService.js +565 -0
- package/dist/Schema/service/validation/SchemaValidationService.js.map +1 -0
- package/dist/Schema/validation.js +15 -0
- package/dist/Schema/validation.js.map +1 -0
- package/dist/browser/db/Db.js +484 -0
- package/dist/browser/db/Db.js.map +1 -0
- package/dist/browser/db/drizzleFiles.js +1022 -0
- package/dist/browser/db/drizzleFiles.js.map +1 -0
- package/dist/browser/helpers/ArweaveClient.js +13 -0
- package/dist/browser/helpers/ArweaveClient.js.map +1 -0
- package/dist/browser/helpers/EasClient.js +16 -0
- package/dist/browser/helpers/EasClient.js.map +1 -0
- package/dist/browser/helpers/FileManager.js +415 -0
- package/dist/browser/helpers/FileManager.js.map +1 -0
- package/dist/browser/helpers/PathResolver.js +64 -0
- package/dist/browser/helpers/PathResolver.js.map +1 -0
- package/dist/browser/helpers/QueryClient.js +33 -0
- package/dist/browser/helpers/QueryClient.js.map +1 -0
- package/dist/browser/react/client.js +16 -0
- package/dist/browser/react/client.js.map +1 -0
- package/dist/browser/react/db.js +7 -0
- package/dist/browser/react/db.js.map +1 -0
- package/dist/browser/react/item.js +192 -0
- package/dist/browser/react/item.js.map +1 -0
- package/dist/browser/react/itemProperty.js +545 -0
- package/dist/browser/react/itemProperty.js.map +1 -0
- package/dist/browser/react/liveQuery.js +95 -0
- package/dist/browser/react/liveQuery.js.map +1 -0
- package/dist/browser/react/model.js +276 -0
- package/dist/browser/react/model.js.map +1 -0
- package/dist/browser/react/modelProperty.js +412 -0
- package/dist/browser/react/modelProperty.js.map +1 -0
- package/dist/browser/react/schema.js +387 -0
- package/dist/browser/react/schema.js.map +1 -0
- package/dist/browser/react/services.js +47 -0
- package/dist/browser/react/services.js.map +1 -0
- package/dist/browser/react/trash.js.map +1 -0
- package/dist/browser/workers/FileDownloader.js.map +1 -0
- package/dist/browser/workers/ImageResizer.js.map +1 -0
- package/dist/browser/workers/filesDownload.js.map +1 -0
- package/dist/browser/workers/imageResize.js.map +1 -0
- package/dist/client/ClientManager.js +177 -0
- package/dist/client/ClientManager.js.map +1 -0
- package/dist/client/actors/addModelsToDb.js +150 -0
- package/dist/client/actors/addModelsToDb.js.map +1 -0
- package/dist/client/actors/addModelsToStore.js +28 -0
- package/dist/client/actors/addModelsToStore.js.map +1 -0
- package/dist/client/actors/dbInit.js +38 -0
- package/dist/client/actors/dbInit.js.map +1 -0
- package/dist/client/actors/fileSystemInit.js +43 -0
- package/dist/client/actors/fileSystemInit.js.map +1 -0
- package/dist/client/actors/platformClassesInit.js +175 -0
- package/dist/client/actors/platformClassesInit.js.map +1 -0
- package/dist/client/actors/processSchemaFiles.js +169 -0
- package/dist/client/actors/processSchemaFiles.js.map +1 -0
- package/dist/client/actors/saveAppState.js +80 -0
- package/dist/client/actors/saveAppState.js.map +1 -0
- package/dist/client/actors/saveConfig.js +110 -0
- package/dist/client/actors/saveConfig.js.map +1 -0
- package/dist/client/clientManagerMachine.js +191 -0
- package/dist/client/clientManagerMachine.js.map +1 -0
- package/dist/client/constants.js +80 -0
- package/dist/client/constants.js.map +1 -0
- package/dist/db/Db/BaseDb.js +55 -0
- package/dist/db/Db/BaseDb.js.map +1 -0
- package/dist/db/drizzle/drizzle/0000_married_malice.sql +121 -0
- package/dist/db/drizzle/drizzle/0001_sweet_bruce_banner.sql +2 -0
- package/dist/db/drizzle/drizzle/0002_bitter_proudstar.sql +3 -0
- package/dist/db/drizzle/drizzle/0003_cultured_senator_kelly.sql +3 -0
- package/dist/db/drizzle/drizzle/meta/0000_snapshot.json +792 -0
- package/dist/db/drizzle/drizzle/meta/0001_snapshot.json +806 -0
- package/dist/db/drizzle/drizzle/meta/0002_snapshot.json +829 -0
- package/dist/db/drizzle/drizzle/meta/0003_snapshot.json +850 -0
- package/dist/db/drizzle/drizzle/meta/_journal.json +34 -0
- package/dist/db/read/getExistingItem.js +33 -0
- package/dist/db/read/getExistingItem.js.map +1 -0
- package/dist/db/read/getItem.js +26 -0
- package/dist/db/read/getItem.js.map +1 -0
- package/dist/db/read/getItemData.js +88 -0
- package/dist/db/read/getItemData.js.map +1 -0
- package/dist/db/read/getItemProperties.js +53 -0
- package/dist/db/read/getItemProperties.js.map +1 -0
- package/dist/db/read/getItemProperty.js +34 -0
- package/dist/db/read/getItemProperty.js.map +1 -0
- package/dist/db/read/getItems.js +53 -0
- package/dist/db/read/getItems.js.map +1 -0
- package/dist/db/read/getMetadata.js +36 -0
- package/dist/db/read/getMetadata.js.map +1 -0
- package/dist/db/read/getModelSchemas.js +63 -0
- package/dist/db/read/getModelSchemas.js.map +1 -0
- package/dist/db/read/getPropertyData.js +42 -0
- package/dist/db/read/getPropertyData.js.map +1 -0
- package/dist/db/read/getPublishPayload.js +294 -0
- package/dist/db/read/getPublishPayload.js.map +1 -0
- package/dist/db/read/getPublishUploads.js +166 -0
- package/dist/db/read/getPublishUploads.js.map +1 -0
- package/dist/db/read/getRelationValueData.js +34 -0
- package/dist/db/read/getRelationValueData.js.map +1 -0
- package/dist/db/read/getSchemaUidForModel.js +28 -0
- package/dist/db/read/getSchemaUidForModel.js.map +1 -0
- package/dist/db/read/getSeedData.js +32 -0
- package/dist/db/read/getSeedData.js.map +1 -0
- package/dist/db/read/getStorageTransactionIdForSeedUid.js +34 -0
- package/dist/db/read/getStorageTransactionIdForSeedUid.js.map +1 -0
- package/dist/db/read/getVersionData.js +37 -0
- package/dist/db/read/getVersionData.js.map +1 -0
- package/dist/db/read/subqueries/metadataLatest.js +39 -0
- package/dist/db/read/subqueries/metadataLatest.js.map +1 -0
- package/dist/db/read/subqueries/versionData.js +31 -0
- package/dist/db/read/subqueries/versionData.js.map +1 -0
- package/dist/db/write/createMetadata.js +94 -0
- package/dist/db/write/createMetadata.js.map +1 -0
- package/dist/db/write/createNewItem.js +43 -0
- package/dist/db/write/createNewItem.js.map +1 -0
- package/dist/db/write/createSeed.js +32 -0
- package/dist/db/write/createSeed.js.map +1 -0
- package/dist/db/write/createSeeds.js +29 -0
- package/dist/db/write/createSeeds.js.map +1 -0
- package/dist/db/write/createVersion.js +29 -0
- package/dist/db/write/createVersion.js.map +1 -0
- package/dist/db/write/deleteItem.js +25 -0
- package/dist/db/write/deleteItem.js.map +1 -0
- package/dist/db/write/saveAppState.js +30 -0
- package/dist/db/write/saveAppState.js.map +1 -0
- package/dist/db/write/saveMetadata.js +26 -0
- package/dist/db/write/saveMetadata.js.map +1 -0
- package/dist/db/write/updateItemPropertyValue.js +165 -0
- package/dist/db/write/updateItemPropertyValue.js.map +1 -0
- package/dist/db/write/updateMetadata.js +38 -0
- package/dist/db/write/updateMetadata.js.map +1 -0
- package/dist/eas.js +176 -0
- package/dist/eas.js.map +1 -0
- package/dist/eventBus.js.map +1 -0
- package/dist/events/files/download.js +191 -0
- package/dist/events/files/download.js.map +1 -0
- package/dist/events/files/index.js +23 -0
- package/dist/events/files/index.js.map +1 -0
- package/dist/events/index.js +28 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/item/index.js.map +1 -0
- package/dist/events/item/publish.js +50 -0
- package/dist/events/item/publish.js.map +1 -0
- package/dist/events/item/syncDbWithEas.js +453 -0
- package/dist/events/item/syncDbWithEas.js.map +1 -0
- package/dist/events/services/allItems.js +10 -0
- package/dist/events/services/allItems.js.map +1 -0
- package/dist/events/services/index.js.map +1 -0
- package/dist/feed.js +534 -0
- package/dist/feed.js.map +1 -0
- package/dist/graphql/gql/gql.js +27 -0
- package/dist/graphql/gql/gql.js.map +1 -0
- package/dist/graphql/gql/graphql.js +129 -0
- package/dist/graphql/gql/graphql.js.map +1 -0
- package/dist/helpers/ArweaveClient/BaseArweaveClient.js.map +1 -0
- package/dist/helpers/ArweaveClient/index.js +61 -0
- package/dist/helpers/ArweaveClient/index.js.map +1 -0
- package/dist/helpers/ArweaveClient/queries.js.map +1 -0
- package/dist/helpers/EasClient/BaseEasClient.js +20 -0
- package/dist/helpers/EasClient/BaseEasClient.js.map +1 -0
- package/dist/helpers/FileManager/BaseFileManager.js +119 -0
- package/dist/helpers/FileManager/BaseFileManager.js.map +1 -0
- package/dist/helpers/PathResolver/BasePathResolver.js +20 -0
- package/dist/helpers/PathResolver/BasePathResolver.js.map +1 -0
- package/dist/helpers/QueryClient/BaseQueryClient.js.map +1 -0
- package/dist/helpers/constants.js +107 -0
- package/dist/helpers/constants.js.map +1 -0
- package/dist/helpers/crypto.js.map +1 -0
- package/dist/helpers/db.js +1335 -0
- package/dist/helpers/db.js.map +1 -0
- package/dist/helpers/environment.js +14 -0
- package/dist/helpers/environment.js.map +1 -0
- package/dist/helpers/file/queries.js +15 -0
- package/dist/helpers/file/queries.js.map +1 -0
- package/dist/helpers/getSchemaForItemProperty.js +65 -0
- package/dist/helpers/getSchemaForItemProperty.js.map +1 -0
- package/dist/helpers/getSegmentedItemProperties.js +71 -0
- package/dist/helpers/getSegmentedItemProperties.js.map +1 -0
- package/dist/helpers/index.js +101 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/model.js +24 -0
- package/dist/helpers/model.js.map +1 -0
- package/dist/helpers/property/index.js +110 -0
- package/dist/helpers/property/index.js.map +1 -0
- package/dist/helpers/property.js +286 -0
- package/dist/helpers/property.js.map +1 -0
- package/dist/helpers/reactiveProxy.js +87 -0
- package/dist/helpers/reactiveProxy.js.map +1 -0
- package/dist/helpers/schema.js +473 -0
- package/dist/helpers/schema.js.map +1 -0
- package/dist/helpers/updateMachineContext.js.map +1 -0
- package/dist/helpers/updateSchema.js +721 -0
- package/dist/helpers/updateSchema.js.map +1 -0
- package/dist/imports/json.js +1129 -0
- package/dist/imports/json.js.map +1 -0
- package/dist/imports/markdown.js +141 -0
- package/dist/imports/markdown.js.map +1 -0
- package/dist/main.cjs +81 -0
- package/dist/main.cjs.map +1 -0
- package/dist/main.js +34 -29
- package/dist/main.js.map +1 -1
- package/dist/node/codegen/drizzle.js +136 -0
- package/dist/node/codegen/drizzle.js.map +1 -0
- package/dist/node/codegen/templates/model.njk +4 -0
- package/dist/node/db/Db.js +332 -0
- package/dist/node/db/Db.js.map +1 -0
- package/dist/node/helpers/ArweaveClient.js +13 -0
- package/dist/node/helpers/ArweaveClient.js.map +1 -0
- package/dist/node/helpers/EasClient.js +16 -0
- package/dist/node/helpers/EasClient.js.map +1 -0
- package/dist/node/helpers/FileManager.js +151 -0
- package/dist/node/helpers/FileManager.js.map +1 -0
- package/dist/node/helpers/PathResolver.js +182 -0
- package/dist/node/helpers/PathResolver.js.map +1 -0
- package/dist/node/helpers/QueryClient.js.map +1 -0
- package/dist/node/helpers/index.js +62 -0
- package/dist/node/helpers/index.js.map +1 -0
- package/dist/node/helpers/scripts.js +121 -0
- package/dist/node/helpers/scripts.js.map +1 -0
- package/dist/node/webpack/index.js.map +1 -0
- package/dist/node.js +40 -0
- package/dist/node.js.map +1 -0
- package/dist/node_modules/.bun/events@3.3.0/node_modules/events/events.d.ts +31 -0
- package/dist/node_modules/.bun/events@3.3.0/node_modules/events/events.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.d.mts +90 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.d.mts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/index.d.ts +28 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/index.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/common.d.ts +7 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/common.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/dumper.d.ts +2 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/dumper.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/exception.d.ts +12 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/exception.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/loader.d.ts +3 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/loader.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/core.d.ts +3 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/core.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/default.d.ts +3 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/default.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/failsafe.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/failsafe.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/json.d.ts +3 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/json.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema.d.ts +7 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/schema.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/snippet.d.ts +3 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/snippet.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/binary.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/binary.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/bool.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/bool.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/float.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/float.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/int.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/int.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/map.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/map.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/merge.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/merge.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/null.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/null.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/omap.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/omap.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/pairs.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/pairs.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/seq.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/seq.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/set.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/set.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/str.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/str.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/timestamp.d.ts +4 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type/timestamp.d.ts.map +1 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type.d.ts +18 -0
- package/dist/node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/lib/type.d.ts.map +1 -0
- package/dist/node_modules/.bun/process@0.11.10/node_modules/process/index.d.ts +3 -0
- package/dist/node_modules/.bun/process@0.11.10/node_modules/process/index.d.ts.map +1 -0
- package/dist/node_modules/.bun/punycode@1.4.1/node_modules/punycode/punycode.d.ts +1 -0
- package/dist/node_modules/.bun/punycode@1.4.1/node_modules/punycode/punycode.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/add-abort-signal.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/add-abort-signal.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/buffer_list.d.ts +19 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/buffer_list.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/compose.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/compose.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/destroy.d.ts +6 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/destroy.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/duplex.d.ts +12 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/duplex.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/duplexify.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/duplexify.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.d.ts +7 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/from.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/from.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/legacy.d.ts +7 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/legacy.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/operators.d.ts +31 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/operators.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/passthrough.d.ts +7 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/passthrough.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/pipeline.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/pipeline.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/readable.d.ts +55 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/readable.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/state.d.ts +4 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/state.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/transform.d.ts +12 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/transform.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/utils.d.ts +33 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/utils.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/writable.d.ts +59 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/streams/writable.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/validators.d.ts +199 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/internal/validators.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/errors.d.ts +8 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/errors.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/index.d.ts +2 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/index.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/primordials.d.ts +51 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/primordials.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/util/inspect.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/util/inspect.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/util.d.ts +22 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/ours/util.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/stream/promises.d.ts +4 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/stream/promises.d.ts.map +1 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/stream.d.ts +3 -0
- package/dist/node_modules/.bun/readable-stream@4.7.0/node_modules/readable-stream/lib/stream.d.ts.map +1 -0
- package/dist/node_modules/.bun/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.d.ts +33 -0
- package/dist/node_modules/.bun/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.d.ts.map +1 -0
- package/dist/node_modules/.bun/url@0.11.4/node_modules/url/url.d.ts +26 -0
- package/dist/node_modules/.bun/url@0.11.4/node_modules/url/url.d.ts.map +1 -0
- package/dist/scripts/build-with-tests.d.ts +3 -0
- package/dist/scripts/build-with-tests.d.ts.map +1 -0
- package/dist/scripts/sync-versions.d.ts +7 -0
- package/dist/scripts/sync-versions.d.ts.map +1 -0
- package/dist/scripts/track-drizzle-changes.d.ts +13 -0
- package/dist/scripts/track-drizzle-changes.d.ts.map +1 -0
- package/dist/scripts/vite.config.d.ts +1 -1
- package/dist/seedSchema/AppStateSchema.js.map +1 -0
- package/dist/seedSchema/ConfigSchema.js.map +1 -0
- package/dist/seedSchema/MetadataSchema.js.map +1 -0
- package/dist/seedSchema/ModelSchema.js +40 -0
- package/dist/seedSchema/ModelSchema.js.map +1 -0
- package/dist/seedSchema/ModelSchema.ts +19 -6
- package/dist/seedSchema/ModelSchemaSchema.js +12 -0
- package/dist/seedSchema/ModelSchemaSchema.js.map +1 -0
- package/dist/seedSchema/ModelSchemaSchema.ts +12 -0
- package/dist/seedSchema/ModelUidSchema.js +18 -0
- package/dist/seedSchema/ModelUidSchema.js.map +1 -0
- package/dist/seedSchema/PropertyUidSchema.js +18 -0
- package/dist/seedSchema/PropertyUidSchema.js.map +1 -0
- package/dist/seedSchema/SEEDPROTOCOL_Seed_Protocol_v1.json +83 -0
- package/dist/seedSchema/SEEDPROTOCOL_Seed_Protocol_v1.json.js +94 -0
- package/dist/seedSchema/SEEDPROTOCOL_Seed_Protocol_v1.json.js.map +1 -0
- package/dist/seedSchema/SchemaSchema.js +20 -0
- package/dist/seedSchema/SchemaSchema.js.map +1 -0
- package/dist/seedSchema/SchemaSchema.ts +25 -0
- package/dist/seedSchema/SeedSchema.js.map +1 -0
- package/dist/seedSchema/VersionSchema.js.map +1 -0
- package/dist/seedSchema/index.js +11 -0
- package/dist/seedSchema/index.js.map +1 -0
- package/dist/seedSchema/index.ts +2 -0
- package/dist/services/events.js +16 -0
- package/dist/services/events.js.map +1 -0
- package/dist/services/publish/actors/createPublishAttempt.js.map +1 -0
- package/dist/services/publish/actors/preparePublishRequestData.js +76 -0
- package/dist/services/publish/actors/preparePublishRequestData.js.map +1 -0
- package/dist/services/publish/actors/upload.js +61 -0
- package/dist/services/publish/actors/upload.js.map +1 -0
- package/dist/services/publish/actors/validateItemData.js.map +1 -0
- package/dist/services/publish/publishMachine.js +71 -0
- package/dist/services/publish/publishMachine.js.map +1 -0
- package/dist/services/write/actors/validateEntity.js +145 -0
- package/dist/services/write/actors/validateEntity.js.map +1 -0
- package/dist/services/write/actors/writeToDatabase.js +91 -0
- package/dist/services/write/actors/writeToDatabase.js.map +1 -0
- package/dist/services/write/writeProcessMachine.js +233 -0
- package/dist/services/write/writeProcessMachine.js.map +1 -0
- package/dist/src/Item/Item.d.ts +94 -0
- package/dist/src/Item/Item.d.ts.map +1 -0
- package/dist/src/Item/queries.d.ts +2 -2
- package/dist/src/Item/queries.d.ts.map +1 -1
- package/dist/src/Item/service/actors/fetchDataFromEas.d.ts.map +1 -1
- package/dist/src/Item/service/actors/hydrateExistingItem.d.ts.map +1 -1
- package/dist/src/Item/service/actors/initialize.d.ts.map +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts +5 -0
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +1 -0
- package/dist/src/Item/service/actors/saveDataToDb.d.ts.map +1 -1
- package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +67 -0
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -0
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/initialize.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts +5 -0
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -0
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +44 -93
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/Model/Model.d.ts +199 -0
- package/dist/src/Model/Model.d.ts.map +1 -0
- package/dist/src/Model/index.d.ts +26 -0
- package/dist/src/Model/index.d.ts.map +1 -0
- package/dist/src/Model/service/actors/createModelProperties.d.ts +9 -0
- package/dist/src/Model/service/actors/createModelProperties.d.ts.map +1 -0
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts +5 -0
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts.map +1 -0
- package/dist/src/Model/service/actors/validateModel.d.ts +5 -0
- package/dist/src/Model/service/actors/validateModel.d.ts.map +1 -0
- package/dist/src/Model/service/modelMachine.d.ts +206 -0
- package/dist/src/Model/service/modelMachine.d.ts.map +1 -0
- package/dist/src/ModelProperty/ModelProperty.d.ts +112 -0
- package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -0
- package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts +5 -0
- package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts.map +1 -0
- package/dist/src/ModelProperty/service/actors/saveToSchema.d.ts +11 -0
- package/dist/src/ModelProperty/service/actors/saveToSchema.d.ts.map +1 -0
- package/dist/src/ModelProperty/service/actors/validateProperty.d.ts +5 -0
- package/dist/src/ModelProperty/service/actors/validateProperty.d.ts.map +1 -0
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +183 -0
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts.map +1 -0
- package/dist/src/Schema/Schema.d.ts +143 -0
- package/dist/src/Schema/Schema.d.ts.map +1 -0
- package/dist/src/Schema/errors.d.ts +20 -0
- package/dist/src/Schema/errors.d.ts.map +1 -0
- package/dist/src/Schema/index.d.ts +6 -0
- package/dist/src/Schema/index.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts +5 -0
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/createModelInstances.d.ts +11 -0
- package/dist/src/Schema/service/actors/createModelInstances.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/createPropertyInstances.d.ts +12 -0
- package/dist/src/Schema/service/actors/createPropertyInstances.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts +5 -0
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/validateSchema.d.ts +5 -0
- package/dist/src/Schema/service/actors/validateSchema.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/verifyModelInstancesInCache.d.ts +6 -0
- package/dist/src/Schema/service/actors/verifyModelInstancesInCache.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/verifyModelsInDb.d.ts +7 -0
- package/dist/src/Schema/service/actors/verifyModelsInDb.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/verifyPropertiesInDb.d.ts +8 -0
- package/dist/src/Schema/service/actors/verifyPropertiesInDb.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/verifyPropertyInstancesInCache.d.ts +6 -0
- package/dist/src/Schema/service/actors/verifyPropertyInstancesInCache.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/verifySchemaInDb.d.ts +7 -0
- package/dist/src/Schema/service/actors/verifySchemaInDb.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts +9 -0
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/writePropertiesToDb.d.ts +10 -0
- package/dist/src/Schema/service/actors/writePropertiesToDb.d.ts.map +1 -0
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts +11 -0
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts.map +1 -0
- package/dist/src/Schema/service/addModelsMachine.d.ts +111 -0
- package/dist/src/Schema/service/addModelsMachine.d.ts.map +1 -0
- package/dist/src/Schema/service/schemaMachine.d.ts +494 -0
- package/dist/src/Schema/service/schemaMachine.d.ts.map +1 -0
- package/dist/src/Schema/service/validation/SchemaValidationService.d.ts +76 -0
- package/dist/src/Schema/service/validation/SchemaValidationService.d.ts.map +1 -0
- package/dist/src/Schema/validation.d.ts +40 -0
- package/dist/src/Schema/validation.d.ts.map +1 -0
- package/dist/src/browser/db/Db.d.ts +34 -2
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/db/drizzleFiles.d.ts +7 -0
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -0
- package/dist/src/browser/helpers/EasClient.d.ts +2 -0
- package/dist/src/browser/helpers/EasClient.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts +15 -2
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/browser/helpers/PathResolver.d.ts +40 -0
- package/dist/src/browser/helpers/PathResolver.d.ts.map +1 -0
- package/dist/src/browser/helpers/QueryClient.d.ts +2 -2
- package/dist/src/browser/helpers/QueryClient.d.ts.map +1 -1
- package/dist/src/browser/index.d.ts +1 -0
- package/dist/src/browser/index.d.ts.map +1 -1
- package/dist/src/browser/react/SeedImage.d.ts +2 -2
- package/dist/src/browser/react/SeedImage.d.ts.map +1 -1
- package/dist/src/browser/react/client.d.ts +2 -0
- package/dist/src/browser/react/client.d.ts.map +1 -0
- package/dist/src/browser/react/db.d.ts.map +1 -1
- package/dist/src/browser/react/index.d.ts +5 -2
- package/dist/src/browser/react/index.d.ts.map +1 -1
- package/dist/src/browser/react/item.d.ts +6 -6
- package/dist/src/browser/react/item.d.ts.map +1 -1
- package/dist/src/browser/react/itemProperty.d.ts +57 -0
- package/dist/src/browser/react/itemProperty.d.ts.map +1 -0
- package/dist/src/browser/react/liveQuery.d.ts +29 -0
- package/dist/src/browser/react/liveQuery.d.ts.map +1 -0
- package/dist/src/browser/react/model.d.ts +32 -5
- package/dist/src/browser/react/model.d.ts.map +1 -1
- package/dist/src/browser/react/modelProperty.d.ts +59 -0
- package/dist/src/browser/react/modelProperty.d.ts.map +1 -0
- package/dist/src/browser/react/schema.d.ts +37 -0
- package/dist/src/browser/react/schema.d.ts.map +1 -0
- package/dist/src/browser/react/services.d.ts +3 -2
- package/dist/src/browser/react/services.d.ts.map +1 -1
- package/dist/src/browser/seed.d.ts +0 -1
- package/dist/src/browser/seed.d.ts.map +1 -1
- package/dist/src/browser/workers/FileDownloader.d.ts.map +1 -1
- package/dist/src/browser/workers/content-hash.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +179 -175
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/addModelsToDb.d.ts +4 -0
- package/dist/src/client/actors/addModelsToDb.d.ts.map +1 -0
- package/dist/src/client/actors/addModelsToStore.d.ts +4 -0
- package/dist/src/client/actors/addModelsToStore.d.ts.map +1 -0
- package/dist/src/client/actors/dbInit.d.ts +4 -0
- package/dist/src/client/actors/dbInit.d.ts.map +1 -0
- package/dist/src/client/actors/fileSystemInit.d.ts +4 -0
- package/dist/src/client/actors/fileSystemInit.d.ts.map +1 -0
- package/dist/src/client/actors/platformClassesInit.d.ts +9 -0
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -0
- package/dist/src/client/actors/processSchemaFiles.d.ts +4 -0
- package/dist/src/client/actors/processSchemaFiles.d.ts.map +1 -0
- package/dist/src/client/actors/saveAppState.d.ts +6 -3
- package/dist/src/client/actors/saveAppState.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts +4 -0
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -0
- package/dist/src/client/clientManagerMachine.d.ts +57 -89
- package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
- package/dist/src/client/constants.d.ts +79 -0
- package/dist/src/client/constants.d.ts.map +1 -0
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/db/Db/BaseDb.d.ts +30 -0
- package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
- package/dist/src/db/configs/dev.schema.config.d.ts +3 -0
- package/dist/src/db/configs/dev.schema.config.d.ts.map +1 -0
- package/dist/src/db/read/getExistingItem.d.ts.map +1 -1
- package/dist/src/db/read/getModelSchemas.d.ts +8 -3
- package/dist/src/db/read/getModelSchemas.d.ts.map +1 -1
- package/dist/src/db/read/getPropertyData.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts +2 -2
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
- package/dist/src/db/read/getRelationValueData.d.ts.map +1 -1
- package/dist/src/db/read/getSchemaUidForModel.d.ts +1 -1
- package/dist/src/db/read/getSchemaUidForModel.d.ts.map +1 -1
- package/dist/src/db/read/getStorageTransactionIdForSeedUid.d.ts.map +1 -1
- package/dist/src/db/read/subqueries/metadataLatest.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts +3 -1
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/createNewItem.d.ts.map +1 -1
- package/dist/src/db/write/createSeed.d.ts.map +1 -1
- package/dist/src/db/write/recoverDeletedItem.d.ts.map +1 -1
- package/dist/src/db/write/saveAppState.d.ts.map +1 -1
- package/dist/src/db/write/saveMetadata.d.ts.map +1 -1
- package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
- package/dist/src/eas.d.ts +26 -0
- package/dist/src/eas.d.ts.map +1 -0
- package/dist/src/eslint-rules/align-imports.d.ts +12 -0
- package/dist/src/eslint-rules/align-imports.d.ts.map +1 -0
- package/dist/src/events/files/download.d.ts.map +1 -1
- package/dist/src/events/files/index.d.ts.map +1 -1
- package/dist/src/events/item/create.d.ts.map +1 -1
- package/dist/src/events/item/publish.d.ts.map +1 -1
- package/dist/src/events/item/request.d.ts.map +1 -1
- package/dist/src/events/item/requestAll.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/events/services/allItems.d.ts.map +1 -1
- package/dist/src/feed.d.ts +2 -0
- package/dist/src/feed.d.ts.map +1 -0
- package/dist/src/graphql/gql/gql.d.ts +29 -58
- package/dist/src/graphql/gql/gql.d.ts.map +1 -1
- package/dist/src/graphql/gql/graphql.d.ts +115 -83
- package/dist/src/graphql/gql/graphql.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/index.d.ts +1 -0
- package/dist/src/helpers/ArweaveClient/index.d.ts.map +1 -1
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts +3 -0
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts +7 -1
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -1
- package/dist/src/helpers/PathResolver/BasePathResolver.d.ts +22 -0
- package/dist/src/helpers/PathResolver/BasePathResolver.d.ts.map +1 -0
- package/dist/src/helpers/constants.d.ts +14 -0
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/crypto.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +109 -1
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/environment.d.ts +16 -0
- package/dist/src/helpers/environment.d.ts.map +1 -1
- package/dist/src/helpers/file/download/actors.d.ts.map +1 -0
- package/dist/src/helpers/file/download/index.d.ts.map +1 -0
- package/dist/src/helpers/file/fetchAll/actors.d.ts.map +1 -0
- package/dist/src/helpers/file/fetchAll/index.d.ts.map +1 -0
- package/dist/src/helpers/file/queries.d.ts.map +1 -0
- package/dist/src/helpers/files.d.ts.map +1 -1
- package/dist/src/helpers/getSchemaForItemProperty.d.ts +7 -3
- package/dist/src/helpers/getSchemaForItemProperty.d.ts.map +1 -1
- package/dist/src/helpers/getSegmentedItemProperties.d.ts +4 -4
- package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
- package/dist/src/helpers/image/queries.d.ts.map +1 -0
- package/dist/src/helpers/index.d.ts +7 -7
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/model.d.ts +9 -0
- package/dist/src/helpers/model.d.ts.map +1 -0
- package/dist/src/helpers/property/index.d.ts +298 -0
- package/dist/src/helpers/property/index.d.ts.map +1 -0
- package/dist/src/helpers/property.d.ts +39 -0
- package/dist/src/helpers/property.d.ts.map +1 -0
- package/dist/src/helpers/reactiveProxy.d.ts +44 -0
- package/dist/src/helpers/reactiveProxy.d.ts.map +1 -0
- package/dist/src/helpers/schema.d.ts +131 -0
- package/dist/src/helpers/schema.d.ts.map +1 -0
- package/dist/src/helpers/updateSchema.d.ts +109 -0
- package/dist/src/helpers/updateSchema.d.ts.map +1 -0
- package/dist/src/imports/index.d.ts +3 -0
- package/dist/src/imports/index.d.ts.map +1 -0
- package/dist/src/imports/json.d.ts +81 -0
- package/dist/src/imports/json.d.ts.map +1 -0
- package/dist/src/imports/markdown.d.ts +38 -0
- package/dist/src/imports/markdown.d.ts.map +1 -0
- package/dist/src/index.d.ts +22 -14
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +5 -2
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +5 -5
- package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/src/node/codegen/drizzle.d.ts +3 -3
- package/dist/src/node/codegen/drizzle.d.ts.map +1 -1
- package/dist/src/node/constants.d.ts +0 -1
- package/dist/src/node/constants.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts +36 -2
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/node/db/index.d.ts +4 -4
- package/dist/src/node/db/index.d.ts.map +1 -1
- package/dist/src/node/helpers/EasClient.d.ts.map +1 -1
- package/dist/src/node/helpers/FileManager.d.ts +10 -1
- package/dist/src/node/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/node/helpers/PathResolver.d.ts +43 -0
- package/dist/src/node/helpers/PathResolver.d.ts.map +1 -0
- package/dist/src/node/helpers/index.d.ts.map +1 -1
- package/dist/src/node/helpers/scripts.d.ts +16 -0
- package/dist/src/node/helpers/scripts.d.ts.map +1 -0
- package/dist/src/node/index.d.ts +25 -0
- package/dist/src/node/index.d.ts.map +1 -0
- package/dist/src/node/webpack/fs-proxy.d.ts +4 -0
- package/dist/src/node/webpack/fs-proxy.d.ts.map +1 -0
- package/dist/src/node/webpack/index.d.ts.map +1 -1
- package/dist/src/seedSchema/ModelSchema.d.ts +72 -38
- package/dist/src/seedSchema/ModelSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/ModelSchemaSchema.d.ts +61 -0
- package/dist/src/seedSchema/ModelSchemaSchema.d.ts.map +1 -0
- package/dist/src/seedSchema/SchemaSchema.d.ts +169 -0
- package/dist/src/seedSchema/SchemaSchema.d.ts.map +1 -0
- package/dist/src/seedSchema/index.d.ts +2 -0
- package/dist/src/seedSchema/index.d.ts.map +1 -1
- package/dist/src/services/events.d.ts.map +1 -1
- package/dist/src/services/publish/actors/preparePublishRequestData.d.ts.map +1 -1
- package/dist/src/services/publish/actors/upload.d.ts.map +1 -1
- package/dist/src/services/publish/publishMachine.d.ts +24 -185
- package/dist/src/services/publish/publishMachine.d.ts.map +1 -1
- package/dist/src/services/write/actors/validateEntity.d.ts +12 -0
- package/dist/src/services/write/actors/validateEntity.d.ts.map +1 -0
- package/dist/src/services/write/actors/writeToDatabase.d.ts +9 -0
- package/dist/src/services/write/actors/writeToDatabase.d.ts.map +1 -0
- package/dist/src/services/write/writeProcessMachine.d.ts +84 -0
- package/dist/src/services/write/writeProcessMachine.d.ts.map +1 -0
- package/dist/src/types/import.d.ts +72 -0
- package/dist/src/types/import.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +9 -3
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/item.d.ts +7 -26
- package/dist/src/types/item.d.ts.map +1 -1
- package/dist/src/types/machines.d.ts +16 -27
- package/dist/src/types/machines.d.ts.map +1 -1
- package/dist/src/types/model.d.ts +12 -15
- package/dist/src/types/model.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +1 -1
- package/dist/src/vite/index.d.ts +47 -0
- package/dist/src/vite/index.d.ts.map +1 -0
- package/dist/stores/eas.js +23 -0
- package/dist/stores/eas.js.map +1 -0
- package/dist/vite/index.js +460 -0
- package/dist/vite/index.js.map +1 -0
- package/package.json +106 -74
- package/dist/addModel.js +0 -93
- package/dist/addModel.js.map +0 -1
- package/dist/bin.js +0 -306
- package/dist/bin.js.map +0 -1
- package/dist/db/configs/browser.app.db.config.ts +0 -28
- package/dist/db/configs/node.app.db.config.js +0 -21
- package/dist/db/configs/node.app.db.config.js.map +0 -1
- package/dist/db/configs/node.app.db.config.ts +0 -28
- package/dist/db/configs/seed.schema.config.ts +0 -25
- package/dist/protos/seed.proto +0 -97
- package/dist/rpcServer.js +0 -358
- package/dist/rpcServer.js.map +0 -1
- package/dist/scripts/addModel.d.ts +0 -3
- package/dist/scripts/addModel.d.ts.map +0 -1
- package/dist/scripts/bin.d.ts +0 -8
- package/dist/scripts/bin.d.ts.map +0 -1
- package/dist/seedData.json +0 -23
- package/dist/src/Item/BaseItem.d.ts +0 -54
- package/dist/src/Item/BaseItem.d.ts.map +0 -1
- package/dist/src/Item/BaseItem.js +0 -309
- package/dist/src/Item/BaseItem.js.map +0 -1
- package/dist/src/Item/queries.js +0 -94
- package/dist/src/Item/queries.js.map +0 -1
- package/dist/src/Item/service/actors/fetchDataFromEas.js +0 -74
- package/dist/src/Item/service/actors/fetchDataFromEas.js.map +0 -1
- package/dist/src/Item/service/actors/hydrateExistingItem.js +0 -119
- package/dist/src/Item/service/actors/hydrateExistingItem.js.map +0 -1
- package/dist/src/Item/service/actors/hydrateNewItem.js.map +0 -1
- package/dist/src/Item/service/actors/initialize.js +0 -39
- package/dist/src/Item/service/actors/initialize.js.map +0 -1
- package/dist/src/Item/service/actors/reload.js.map +0 -1
- package/dist/src/Item/service/actors/waitForDb.js.map +0 -1
- package/dist/src/Item/service/itemMachineSingle.js +0 -154
- package/dist/src/Item/service/itemMachineSingle.js.map +0 -1
- package/dist/src/ItemProperty/BaseItemProperty.d.ts +0 -109
- package/dist/src/ItemProperty/BaseItemProperty.d.ts.map +0 -1
- package/dist/src/ItemProperty/BaseItemProperty.js +0 -350
- package/dist/src/ItemProperty/BaseItemProperty.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.js +0 -208
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/initialize.js +0 -65
- package/dist/src/ItemProperty/service/actors/initialize.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.js +0 -317
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/resolveRemoteStorage.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.js +0 -100
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.js +0 -119
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.js +0 -81
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/waitForDb.js.map +0 -1
- package/dist/src/ItemProperty/service/propertyMachine.js +0 -198
- package/dist/src/ItemProperty/service/propertyMachine.js.map +0 -1
- package/dist/src/browser/Item/Item.d.ts +0 -7
- package/dist/src/browser/Item/Item.d.ts.map +0 -1
- package/dist/src/browser/Item/Item.js +0 -10
- package/dist/src/browser/Item/Item.js.map +0 -1
- package/dist/src/browser/ItemProperty/ItemProperty.d.ts +0 -8
- package/dist/src/browser/ItemProperty/ItemProperty.d.ts.map +0 -1
- package/dist/src/browser/ItemProperty/ItemProperty.js +0 -10
- package/dist/src/browser/ItemProperty/ItemProperty.js.map +0 -1
- package/dist/src/browser/db/Db.js +0 -243
- package/dist/src/browser/db/Db.js.map +0 -1
- package/dist/src/browser/helpers/ArweaveClient.js +0 -13
- package/dist/src/browser/helpers/ArweaveClient.js.map +0 -1
- package/dist/src/browser/helpers/FileManager.js +0 -323
- package/dist/src/browser/helpers/FileManager.js.map +0 -1
- package/dist/src/browser/helpers/QueryClient.js +0 -19
- package/dist/src/browser/helpers/QueryClient.js.map +0 -1
- package/dist/src/browser/helpers/eas.d.ts +0 -20
- package/dist/src/browser/helpers/eas.d.ts.map +0 -1
- package/dist/src/browser/helpers/eas.js +0 -89
- package/dist/src/browser/helpers/eas.js.map +0 -1
- package/dist/src/browser/react/SeedImage.js +0 -105
- package/dist/src/browser/react/SeedImage.js.map +0 -1
- package/dist/src/browser/react/db.js +0 -6
- package/dist/src/browser/react/db.js.map +0 -1
- package/dist/src/browser/react/item.js +0 -216
- package/dist/src/browser/react/item.js.map +0 -1
- package/dist/src/browser/react/model.js +0 -20
- package/dist/src/browser/react/model.js.map +0 -1
- package/dist/src/browser/react/property.d.ts +0 -20
- package/dist/src/browser/react/property.d.ts.map +0 -1
- package/dist/src/browser/react/property.js +0 -107
- package/dist/src/browser/react/property.js.map +0 -1
- package/dist/src/browser/react/services.js +0 -306
- package/dist/src/browser/react/services.js.map +0 -1
- package/dist/src/browser/react/trash.js.map +0 -1
- package/dist/src/browser/workers/FileDownloader.js.map +0 -1
- package/dist/src/browser/workers/ImageResizer.js.map +0 -1
- package/dist/src/browser/workers/filesDownload.js.map +0 -1
- package/dist/src/browser/workers/imageResize.js.map +0 -1
- package/dist/src/client/ClientManager.js +0 -90
- package/dist/src/client/ClientManager.js.map +0 -1
- package/dist/src/client/actions/setAddresses.js +0 -19
- package/dist/src/client/actions/setAddresses.js.map +0 -1
- package/dist/src/client/actors/initialize.d.ts +0 -4
- package/dist/src/client/actors/initialize.d.ts.map +0 -1
- package/dist/src/client/actors/initialize.js +0 -107
- package/dist/src/client/actors/initialize.js.map +0 -1
- package/dist/src/client/actors/saveAppState.js +0 -46
- package/dist/src/client/actors/saveAppState.js.map +0 -1
- package/dist/src/client/clientManagerMachine.js +0 -63
- package/dist/src/client/clientManagerMachine.js.map +0 -1
- package/dist/src/db/Db/BaseDb.js +0 -25
- package/dist/src/db/Db/BaseDb.js.map +0 -1
- package/dist/src/db/configs/browser.app.db.config.d.ts +0 -3
- package/dist/src/db/configs/browser.app.db.config.d.ts.map +0 -1
- package/dist/src/db/configs/node.app.db.config.d.ts +0 -3
- package/dist/src/db/configs/node.app.db.config.d.ts.map +0 -1
- package/dist/src/db/configs/seed.schema.config.d.ts +0 -19
- package/dist/src/db/configs/seed.schema.config.d.ts.map +0 -1
- package/dist/src/db/configs/seed.schema.config.js +0 -52
- package/dist/src/db/configs/seed.schema.config.js.map +0 -1
- package/dist/src/db/read/getExistingItem.js +0 -31
- package/dist/src/db/read/getExistingItem.js.map +0 -1
- package/dist/src/db/read/getItem.js +0 -26
- package/dist/src/db/read/getItem.js.map +0 -1
- package/dist/src/db/read/getItemData.js +0 -86
- package/dist/src/db/read/getItemData.js.map +0 -1
- package/dist/src/db/read/getItemProperties.js +0 -51
- package/dist/src/db/read/getItemProperties.js.map +0 -1
- package/dist/src/db/read/getItemProperty.js +0 -32
- package/dist/src/db/read/getItemProperty.js.map +0 -1
- package/dist/src/db/read/getItems.js +0 -51
- package/dist/src/db/read/getItems.js.map +0 -1
- package/dist/src/db/read/getMetadata.js +0 -34
- package/dist/src/db/read/getMetadata.js.map +0 -1
- package/dist/src/db/read/getModelSchemas.js +0 -51
- package/dist/src/db/read/getModelSchemas.js.map +0 -1
- package/dist/src/db/read/getModels.js +0 -18
- package/dist/src/db/read/getModels.js.map +0 -1
- package/dist/src/db/read/getPropertyData.js +0 -40
- package/dist/src/db/read/getPropertyData.js.map +0 -1
- package/dist/src/db/read/getPublishPayload.js +0 -265
- package/dist/src/db/read/getPublishPayload.js.map +0 -1
- package/dist/src/db/read/getPublishUploads.js +0 -166
- package/dist/src/db/read/getPublishUploads.js.map +0 -1
- package/dist/src/db/read/getRelationValueData.js +0 -32
- package/dist/src/db/read/getRelationValueData.js.map +0 -1
- package/dist/src/db/read/getSchemaUidForModel.js +0 -28
- package/dist/src/db/read/getSchemaUidForModel.js.map +0 -1
- package/dist/src/db/read/getSeedData.js +0 -30
- package/dist/src/db/read/getSeedData.js.map +0 -1
- package/dist/src/db/read/getStorageTransactionIdForSeedUid.js +0 -32
- package/dist/src/db/read/getStorageTransactionIdForSeedUid.js.map +0 -1
- package/dist/src/db/read/getVersionData.js +0 -35
- package/dist/src/db/read/getVersionData.js.map +0 -1
- package/dist/src/db/read/subqueries/metadataLatest.js +0 -37
- package/dist/src/db/read/subqueries/metadataLatest.js.map +0 -1
- package/dist/src/db/read/subqueries/versionData.js +0 -29
- package/dist/src/db/read/subqueries/versionData.js.map +0 -1
- package/dist/src/db/write/createMetadata.js +0 -65
- package/dist/src/db/write/createMetadata.js.map +0 -1
- package/dist/src/db/write/createNewItem.js +0 -38
- package/dist/src/db/write/createNewItem.js.map +0 -1
- package/dist/src/db/write/createSeed.js +0 -31
- package/dist/src/db/write/createSeed.js.map +0 -1
- package/dist/src/db/write/createSeeds.js +0 -27
- package/dist/src/db/write/createSeeds.js.map +0 -1
- package/dist/src/db/write/createVersion.js +0 -27
- package/dist/src/db/write/createVersion.js.map +0 -1
- package/dist/src/db/write/deleteItem.js +0 -23
- package/dist/src/db/write/deleteItem.js.map +0 -1
- package/dist/src/db/write/saveAppState.js +0 -28
- package/dist/src/db/write/saveAppState.js.map +0 -1
- package/dist/src/db/write/saveMetadata.js +0 -24
- package/dist/src/db/write/saveMetadata.js.map +0 -1
- package/dist/src/db/write/updateItemPropertyValue.js +0 -163
- package/dist/src/db/write/updateItemPropertyValue.js.map +0 -1
- package/dist/src/db/write/updateMetadata.js +0 -27
- package/dist/src/db/write/updateMetadata.js.map +0 -1
- package/dist/src/eventBus.js.map +0 -1
- package/dist/src/events/files/download.js +0 -162
- package/dist/src/events/files/download.js.map +0 -1
- package/dist/src/events/files/index.js +0 -60
- package/dist/src/events/files/index.js.map +0 -1
- package/dist/src/events/index.js +0 -28
- package/dist/src/events/index.js.map +0 -1
- package/dist/src/events/item/index.js.map +0 -1
- package/dist/src/events/item/publish.js +0 -19
- package/dist/src/events/item/publish.js.map +0 -1
- package/dist/src/events/item/syncDbWithEas.js +0 -411
- package/dist/src/events/item/syncDbWithEas.js.map +0 -1
- package/dist/src/events/services/allItems.js +0 -19
- package/dist/src/events/services/allItems.js.map +0 -1
- package/dist/src/events/services/index.js.map +0 -1
- package/dist/src/graphql/gql/gql.js +0 -38
- package/dist/src/graphql/gql/gql.js.map +0 -1
- package/dist/src/graphql/gql/graphql.js +0 -106
- package/dist/src/graphql/gql/graphql.js.map +0 -1
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.js.map +0 -1
- package/dist/src/helpers/ArweaveClient/index.js +0 -45
- package/dist/src/helpers/ArweaveClient/index.js.map +0 -1
- package/dist/src/helpers/ArweaveClient/queries.js.map +0 -1
- package/dist/src/helpers/EasClient/BaseEasClient.js +0 -14
- package/dist/src/helpers/EasClient/BaseEasClient.js.map +0 -1
- package/dist/src/helpers/FileManager/BaseFileManager.js +0 -80
- package/dist/src/helpers/FileManager/BaseFileManager.js.map +0 -1
- package/dist/src/helpers/QueryClient/BaseQueryClient.js.map +0 -1
- package/dist/src/helpers/constants.js +0 -85
- package/dist/src/helpers/constants.js.map +0 -1
- package/dist/src/helpers/crypto.js.map +0 -1
- package/dist/src/helpers/db.js +0 -45
- package/dist/src/helpers/db.js.map +0 -1
- package/dist/src/helpers/environment.js +0 -29
- package/dist/src/helpers/environment.js.map +0 -1
- package/dist/src/helpers/getSchemaForItemProperty.js +0 -51
- package/dist/src/helpers/getSchemaForItemProperty.js.map +0 -1
- package/dist/src/helpers/getSegmentedItemProperties.js +0 -54
- package/dist/src/helpers/getSegmentedItemProperties.js.map +0 -1
- package/dist/src/helpers/index.js +0 -113
- package/dist/src/helpers/index.js.map +0 -1
- package/dist/src/helpers/scripts.d.ts +0 -2
- package/dist/src/helpers/scripts.d.ts.map +0 -1
- package/dist/src/helpers/scripts.js +0 -14
- package/dist/src/helpers/scripts.js.map +0 -1
- package/dist/src/helpers/updateMachineContext.js.map +0 -1
- package/dist/src/node/Item/Item.d.ts +0 -7
- package/dist/src/node/Item/Item.d.ts.map +0 -1
- package/dist/src/node/Item/Item.js +0 -11
- package/dist/src/node/Item/Item.js.map +0 -1
- package/dist/src/node/ItemProperty/ItemProperty.d.ts +0 -7
- package/dist/src/node/ItemProperty/ItemProperty.d.ts.map +0 -1
- package/dist/src/node/ItemProperty/ItemProperty.js +0 -10
- package/dist/src/node/ItemProperty/ItemProperty.js.map +0 -1
- package/dist/src/node/PathResolver.d.ts +0 -45
- package/dist/src/node/PathResolver.d.ts.map +0 -1
- package/dist/src/node/PathResolver.js +0 -170
- package/dist/src/node/PathResolver.js.map +0 -1
- package/dist/src/node/codegen/drizzle.js +0 -108
- package/dist/src/node/codegen/drizzle.js.map +0 -1
- package/dist/src/node/constants.js +0 -6
- package/dist/src/node/constants.js.map +0 -1
- package/dist/src/node/db/Db.js +0 -65
- package/dist/src/node/db/Db.js.map +0 -1
- package/dist/src/node/helpers/ArweaveClient.js +0 -13
- package/dist/src/node/helpers/ArweaveClient.js.map +0 -1
- package/dist/src/node/helpers/EasClient.js +0 -13
- package/dist/src/node/helpers/EasClient.js.map +0 -1
- package/dist/src/node/helpers/FileManager.js +0 -53
- package/dist/src/node/helpers/FileManager.js.map +0 -1
- package/dist/src/node/helpers/QueryClient.js.map +0 -1
- package/dist/src/node/helpers/index.js +0 -38
- package/dist/src/node/helpers/index.js.map +0 -1
- package/dist/src/node/webpack/index.js.map +0 -1
- package/dist/src/schema/file/download/actors.d.ts.map +0 -1
- package/dist/src/schema/file/download/index.d.ts.map +0 -1
- package/dist/src/schema/file/fetchAll/actors.d.ts.map +0 -1
- package/dist/src/schema/file/fetchAll/index.d.ts.map +0 -1
- package/dist/src/schema/file/queries.d.ts.map +0 -1
- package/dist/src/schema/file/queries.js +0 -48
- package/dist/src/schema/file/queries.js.map +0 -1
- package/dist/src/schema/image/model.d.ts +0 -8
- package/dist/src/schema/image/model.d.ts.map +0 -1
- package/dist/src/schema/image/model.js +0 -29
- package/dist/src/schema/image/model.js.map +0 -1
- package/dist/src/schema/image/queries.d.ts.map +0 -1
- package/dist/src/schema/index.d.ts +0 -4
- package/dist/src/schema/index.d.ts.map +0 -1
- package/dist/src/schema/model/index.d.ts +0 -63
- package/dist/src/schema/model/index.d.ts.map +0 -1
- package/dist/src/schema/model/index.js +0 -44
- package/dist/src/schema/model/index.js.map +0 -1
- package/dist/src/schema/property/index.d.ts +0 -151
- package/dist/src/schema/property/index.d.ts.map +0 -1
- package/dist/src/schema/property/index.js +0 -88
- package/dist/src/schema/property/index.js.map +0 -1
- package/dist/src/seedSchema/AppStateSchema.js.map +0 -1
- package/dist/src/seedSchema/ConfigSchema.js.map +0 -1
- package/dist/src/seedSchema/MetadataSchema.js.map +0 -1
- package/dist/src/seedSchema/ModelSchema.js +0 -33
- package/dist/src/seedSchema/ModelSchema.js.map +0 -1
- package/dist/src/seedSchema/ModelUidSchema.js +0 -18
- package/dist/src/seedSchema/ModelUidSchema.js.map +0 -1
- package/dist/src/seedSchema/PropertyUidSchema.js +0 -18
- package/dist/src/seedSchema/PropertyUidSchema.js.map +0 -1
- package/dist/src/seedSchema/SeedSchema.js.map +0 -1
- package/dist/src/seedSchema/VersionSchema.js.map +0 -1
- package/dist/src/services/allItems/actors/fetchDbData.d.ts +0 -4
- package/dist/src/services/allItems/actors/fetchDbData.d.ts.map +0 -1
- package/dist/src/services/allItems/actors/fetchDbData.js +0 -13
- package/dist/src/services/allItems/actors/fetchDbData.js.map +0 -1
- package/dist/src/services/allItems/actors/fetchRelatedItems.d.ts +0 -4
- package/dist/src/services/allItems/actors/fetchRelatedItems.d.ts.map +0 -1
- package/dist/src/services/allItems/actors/fetchRelatedItems.js +0 -139
- package/dist/src/services/allItems/actors/fetchRelatedItems.js.map +0 -1
- package/dist/src/services/allItems/actors/fetchSeeds.d.ts +0 -4
- package/dist/src/services/allItems/actors/fetchSeeds.d.ts.map +0 -1
- package/dist/src/services/allItems/actors/fetchSeeds.js +0 -31
- package/dist/src/services/allItems/actors/fetchSeeds.js.map +0 -1
- package/dist/src/services/allItems/actors/fetchVersions.d.ts +0 -4
- package/dist/src/services/allItems/actors/fetchVersions.d.ts.map +0 -1
- package/dist/src/services/allItems/actors/fetchVersions.js +0 -35
- package/dist/src/services/allItems/actors/fetchVersions.js.map +0 -1
- package/dist/src/services/allItems/actors/initialize.d.ts +0 -4
- package/dist/src/services/allItems/actors/initialize.d.ts.map +0 -1
- package/dist/src/services/allItems/actors/initialize.js +0 -146
- package/dist/src/services/allItems/actors/initialize.js.map +0 -1
- package/dist/src/services/allItems/actors/processItems.d.ts +0 -4
- package/dist/src/services/allItems/actors/processItems.d.ts.map +0 -1
- package/dist/src/services/allItems/actors/processItems.js +0 -55
- package/dist/src/services/allItems/actors/processItems.js.map +0 -1
- package/dist/src/services/allItems/itemMachineAll.d.ts +0 -67
- package/dist/src/services/allItems/itemMachineAll.d.ts.map +0 -1
- package/dist/src/services/allItems/itemMachineAll.js +0 -153
- package/dist/src/services/allItems/itemMachineAll.js.map +0 -1
- package/dist/src/services/db/actors/checkStatus.d.ts +0 -4
- package/dist/src/services/db/actors/checkStatus.d.ts.map +0 -1
- package/dist/src/services/db/actors/checkStatus.js +0 -41
- package/dist/src/services/db/actors/checkStatus.js.map +0 -1
- package/dist/src/services/db/actors/connectToDb.d.ts +0 -4
- package/dist/src/services/db/actors/connectToDb.d.ts.map +0 -1
- package/dist/src/services/db/actors/connectToDb.js +0 -31
- package/dist/src/services/db/actors/connectToDb.js.map +0 -1
- package/dist/src/services/db/actors/migrate.d.ts +0 -4
- package/dist/src/services/db/actors/migrate.d.ts.map +0 -1
- package/dist/src/services/db/actors/migrate.js +0 -40
- package/dist/src/services/db/actors/migrate.js.map +0 -1
- package/dist/src/services/db/actors/validate.d.ts +0 -4
- package/dist/src/services/db/actors/validate.d.ts.map +0 -1
- package/dist/src/services/db/actors/validate.js +0 -40
- package/dist/src/services/db/actors/validate.js.map +0 -1
- package/dist/src/services/db/actors/waitForFiles.d.ts +0 -4
- package/dist/src/services/db/actors/waitForFiles.d.ts.map +0 -1
- package/dist/src/services/db/actors/waitForFiles.js +0 -32
- package/dist/src/services/db/actors/waitForFiles.js.map +0 -1
- package/dist/src/services/db/connectionManager.d.ts +0 -18
- package/dist/src/services/db/connectionManager.d.ts.map +0 -1
- package/dist/src/services/db/dbMachine.d.ts +0 -58
- package/dist/src/services/db/dbMachine.d.ts.map +0 -1
- package/dist/src/services/db/dbMachine.js +0 -156
- package/dist/src/services/db/dbMachine.js.map +0 -1
- package/dist/src/services/db/index.d.ts +0 -2
- package/dist/src/services/db/index.d.ts.map +0 -1
- package/dist/src/services/events.js +0 -15
- package/dist/src/services/events.js.map +0 -1
- package/dist/src/services/global/actors/addModelsToDb.d.ts +0 -4
- package/dist/src/services/global/actors/addModelsToDb.d.ts.map +0 -1
- package/dist/src/services/global/actors/addModelsToDb.js +0 -117
- package/dist/src/services/global/actors/addModelsToDb.js.map +0 -1
- package/dist/src/services/global/actors/getSchemaForModel.d.ts +0 -4
- package/dist/src/services/global/actors/getSchemaForModel.d.ts.map +0 -1
- package/dist/src/services/global/actors/getSchemaForModel.js +0 -26
- package/dist/src/services/global/actors/getSchemaForModel.js.map +0 -1
- package/dist/src/services/global/actors/initialize.d.ts +0 -4
- package/dist/src/services/global/actors/initialize.d.ts.map +0 -1
- package/dist/src/services/global/actors/initialize.js +0 -88
- package/dist/src/services/global/actors/initialize.js.map +0 -1
- package/dist/src/services/global/actors/savePublishService.d.ts +0 -4
- package/dist/src/services/global/actors/savePublishService.d.ts.map +0 -1
- package/dist/src/services/global/actors/savePublishService.js +0 -22
- package/dist/src/services/global/actors/savePublishService.js.map +0 -1
- package/dist/src/services/global/globalMachine.d.ts +0 -662
- package/dist/src/services/global/globalMachine.d.ts.map +0 -1
- package/dist/src/services/global/globalMachine.js +0 -246
- package/dist/src/services/global/globalMachine.js.map +0 -1
- package/dist/src/services/internal/actors/configureFs.d.ts +0 -4
- package/dist/src/services/internal/actors/configureFs.d.ts.map +0 -1
- package/dist/src/services/internal/actors/configureFs.js +0 -70
- package/dist/src/services/internal/actors/configureFs.js.map +0 -1
- package/dist/src/services/internal/actors/loadAppDb.d.ts +0 -4
- package/dist/src/services/internal/actors/loadAppDb.d.ts.map +0 -1
- package/dist/src/services/internal/actors/loadAppDb.js +0 -22
- package/dist/src/services/internal/actors/loadAppDb.js.map +0 -1
- package/dist/src/services/internal/actors/prepareDb.d.ts +0 -5
- package/dist/src/services/internal/actors/prepareDb.d.ts.map +0 -1
- package/dist/src/services/internal/actors/saveConfig.d.ts +0 -4
- package/dist/src/services/internal/actors/saveConfig.d.ts.map +0 -1
- package/dist/src/services/internal/actors/saveConfig.js +0 -76
- package/dist/src/services/internal/actors/saveConfig.js.map +0 -1
- package/dist/src/services/internal/actors/validateInput.d.ts +0 -4
- package/dist/src/services/internal/actors/validateInput.d.ts.map +0 -1
- package/dist/src/services/internal/actors/validateInput.js +0 -34
- package/dist/src/services/internal/actors/validateInput.js.map +0 -1
- package/dist/src/services/internal/actors/waitForFiles.d.ts +0 -4
- package/dist/src/services/internal/actors/waitForFiles.d.ts.map +0 -1
- package/dist/src/services/internal/actors/waitForFiles.js +0 -33
- package/dist/src/services/internal/actors/waitForFiles.js.map +0 -1
- package/dist/src/services/internal/constants.d.ts +0 -75
- package/dist/src/services/internal/constants.d.ts.map +0 -1
- package/dist/src/services/internal/constants.js +0 -85
- package/dist/src/services/internal/constants.js.map +0 -1
- package/dist/src/services/internal/helpers.d.ts +0 -10
- package/dist/src/services/internal/helpers.d.ts.map +0 -1
- package/dist/src/services/internal/helpers.js +0 -171
- package/dist/src/services/internal/helpers.js.map +0 -1
- package/dist/src/services/internal/internalMachine.d.ts +0 -57
- package/dist/src/services/internal/internalMachine.d.ts.map +0 -1
- package/dist/src/services/internal/internalMachine.js +0 -188
- package/dist/src/services/internal/internalMachine.js.map +0 -1
- package/dist/src/services/internal/queries.d.ts +0 -4
- package/dist/src/services/internal/queries.d.ts.map +0 -1
- package/dist/src/services/internal/types.d.ts +0 -12
- package/dist/src/services/internal/types.d.ts.map +0 -1
- package/dist/src/services/publish/actors/createPublishAttempt.js.map +0 -1
- package/dist/src/services/publish/actors/preparePublishRequestData.js +0 -72
- package/dist/src/services/publish/actors/preparePublishRequestData.js.map +0 -1
- package/dist/src/services/publish/actors/upload.js +0 -55
- package/dist/src/services/publish/actors/upload.js.map +0 -1
- package/dist/src/services/publish/actors/validateItemData.js.map +0 -1
- package/dist/src/services/publish/publishMachine.js +0 -71
- package/dist/src/services/publish/publishMachine.js.map +0 -1
- package/dist/src/stores/eas.js +0 -45
- package/dist/src/stores/eas.js.map +0 -1
- package/dist/src/stores/modelClass.d.ts +0 -6
- package/dist/src/stores/modelClass.d.ts.map +0 -1
- package/dist/src/stores/modelClass.js +0 -16
- package/dist/src/stores/modelClass.js.map +0 -1
- /package/dist/{src/Item → Item}/service/actors/hydrateNewItem.js +0 -0
- /package/dist/{src/Item → Item}/service/actors/reload.js +0 -0
- /package/dist/{src/Item → Item}/service/actors/waitForDb.js +0 -0
- /package/dist/{src/ItemProperty → ItemProperty}/service/actors/resolveRemoteStorage.js +0 -0
- /package/dist/{src/ItemProperty → ItemProperty}/service/actors/saveValueToDb/saveImage.js +0 -0
- /package/dist/{src/ItemProperty → ItemProperty}/service/actors/waitForDb.js +0 -0
- /package/dist/{src/browser → browser}/react/trash.js +0 -0
- /package/dist/{src/browser → browser}/workers/FileDownloader.js +0 -0
- /package/dist/{src/browser → browser}/workers/ImageResizer.js +0 -0
- /package/dist/{src/browser → browser}/workers/filesDownload.js +0 -0
- /package/dist/{src/browser → browser}/workers/imageResize.js +0 -0
- /package/dist/{src/eventBus.js → eventBus.js} +0 -0
- /package/dist/{src/events → events}/item/index.js +0 -0
- /package/dist/{src/events → events}/services/index.js +0 -0
- /package/dist/{src/helpers → helpers}/ArweaveClient/BaseArweaveClient.js +0 -0
- /package/dist/{src/helpers → helpers}/ArweaveClient/queries.js +0 -0
- /package/dist/{src/helpers → helpers}/QueryClient/BaseQueryClient.js +0 -0
- /package/dist/{src/helpers → helpers}/crypto.js +0 -0
- /package/dist/{src/helpers → helpers}/updateMachineContext.js +0 -0
- /package/dist/{src/node → node}/helpers/QueryClient.js +0 -0
- /package/dist/{src/node → node}/webpack/index.js +0 -0
- /package/dist/{src/seedSchema → seedSchema}/AppStateSchema.js +0 -0
- /package/dist/{src/seedSchema → seedSchema}/ConfigSchema.js +0 -0
- /package/dist/{src/seedSchema → seedSchema}/MetadataSchema.js +0 -0
- /package/dist/{src/seedSchema → seedSchema}/SeedSchema.js +0 -0
- /package/dist/{src/seedSchema → seedSchema}/VersionSchema.js +0 -0
- /package/dist/{src/services → services}/publish/actors/createPublishAttempt.js +0 -0
- /package/dist/{src/services → services}/publish/actors/validateItemData.js +0 -0
- /package/dist/src/{schema → helpers}/file/download/actors.d.ts +0 -0
- /package/dist/src/{schema → helpers}/file/download/index.d.ts +0 -0
- /package/dist/src/{schema → helpers}/file/fetchAll/actors.d.ts +0 -0
- /package/dist/src/{schema → helpers}/file/fetchAll/index.d.ts +0 -0
- /package/dist/src/{schema → helpers}/file/queries.d.ts +0 -0
- /package/dist/src/{schema → helpers}/image/queries.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sources":["../../../../../src/node/Item/Item.ts"],"sourcesContent":["import { IItem } from '@/interfaces';\nimport { BaseItem } from '@/Item/BaseItem';\nimport { ModelSchema, ModelValues, NewItemProps } from '@/types';\n\nexport class Item<T extends ModelValues<ModelSchema>> extends BaseItem<T> implements IItem<T> {\n constructor(initialValues: NewItemProps<T>) {\n super(initialValues);\n }\n\n}\n\nBaseItem.setPlatformClass(Item)"],"names":[],"mappings":";;AAIM,MAAO,IAAyC,SAAQ,QAAW,CAAA;AACvE,IAAA,WAAA,CAAY,aAA8B,EAAA;QACxC,KAAK,CAAC,aAAa,CAAC;IACtB;AAED;AAED,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IItemProperty } from '@/interfaces';
|
|
2
|
-
import { BaseItemProperty } from '@/ItemProperty/BaseItemProperty';
|
|
3
|
-
import { CreatePropertyInstanceProps } from '@/types';
|
|
4
|
-
export declare class ItemProperty<PropertyType> extends BaseItemProperty<PropertyType> implements IItemProperty<PropertyType> {
|
|
5
|
-
constructor(initialValues: Partial<CreatePropertyInstanceProps>);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=ItemProperty.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemProperty.d.ts","sourceRoot":"","sources":["../../../../src/node/ItemProperty/ItemProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,2BAA2B,EAA6B,MAAM,SAAS,CAAA;AAEhF,qBAAa,YAAY,CAAC,YAAY,CAAE,SAAQ,gBAAgB,CAAC,YAAY,CAAE,YAAW,aAAa,CAAC,YAAY,CAAC;gBACvG,aAAa,EAAE,OAAO,CAAC,2BAA2B,CAAC;CAGhE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemProperty.js","sources":["../../../../../src/node/ItemProperty/ItemProperty.ts"],"sourcesContent":["import { IItemProperty } from '@/interfaces'\nimport { BaseItemProperty } from '@/ItemProperty/BaseItemProperty'\nimport { CreatePropertyInstanceProps, ModelSchema, ModelValues, } from '@/types'\n\nexport class ItemProperty<PropertyType> extends BaseItemProperty<PropertyType> implements IItemProperty<PropertyType> {\n constructor(initialValues: Partial<CreatePropertyInstanceProps>) {\n super(initialValues)\n }\n}"],"names":[],"mappings":";;AAIM,MAAO,YAA2B,SAAQ,gBAA8B,CAAA;AAC5E,IAAA,WAAA,CAAY,aAAmD,EAAA;QAC7D,KAAK,CAAC,aAAa,CAAC;IACtB;AACD;;;;"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare class PathResolver {
|
|
2
|
-
private static instance;
|
|
3
|
-
private constructor();
|
|
4
|
-
static getInstance(): PathResolver;
|
|
5
|
-
/**
|
|
6
|
-
* Detects the current environment based on filesystem structure and package.json
|
|
7
|
-
*/
|
|
8
|
-
private detectEnvironment;
|
|
9
|
-
private isInSdkRepo;
|
|
10
|
-
private isUsingLinkedSdk;
|
|
11
|
-
/**
|
|
12
|
-
* Gets the root directory containing node_modules
|
|
13
|
-
*/
|
|
14
|
-
getRootWithNodeModules(): string;
|
|
15
|
-
/**
|
|
16
|
-
* Gets the SDK root directory
|
|
17
|
-
*/
|
|
18
|
-
getSdkRootDir(): string;
|
|
19
|
-
getNodeModulesDir(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Gets the .seed directory path
|
|
22
|
-
*/
|
|
23
|
-
getDotSeedDir(schemaFileDir?: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* Finds the Seed Protocol config file in the given directory
|
|
26
|
-
* @param searchDir - Directory to search for the config file
|
|
27
|
-
* @returns The path to the found config file, or null if not found
|
|
28
|
-
*/
|
|
29
|
-
findConfigFile(searchDir?: string): string | null;
|
|
30
|
-
/**
|
|
31
|
-
* Gets paths for app-specific directories
|
|
32
|
-
*/
|
|
33
|
-
getAppPaths(schemaFileDir?: string | undefined): {
|
|
34
|
-
sdkRootDir: string;
|
|
35
|
-
dotSeedDir: string;
|
|
36
|
-
nodeModulesDir: string;
|
|
37
|
-
appSchemaDir: string;
|
|
38
|
-
appDbDir: string;
|
|
39
|
-
appMetaDir: string;
|
|
40
|
-
drizzleDbConfigPath: string;
|
|
41
|
-
drizzleKitPath: string;
|
|
42
|
-
templatePath: string;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=PathResolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PathResolver.d.ts","sourceRoot":"","sources":["../../../src/node/PathResolver.ts"],"names":[],"mappings":"AAKA,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAc;IACrC,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,YAAY;IAOlC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,gBAAgB;IAcxB;;OAEG;IACH,sBAAsB,IAAI,MAAM;IAYhC;;OAEG;IACH,aAAa,IAAI,MAAM;IAoCvB,iBAAiB,IAAI,MAAM;IAa3B;;OAEG;IACH,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM;IAO7C;;;;OAIG;IACH,cAAc,CAAC,SAAS,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI;IAIhE;;OAEG;IACH,WAAW,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS;;;;;;;;;;;CAsC/C"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import { NODE_APP_DB_CONFIG } from './constants.js';
|
|
4
|
-
import { findSeedConfigFile } from '../helpers/index.js';
|
|
5
|
-
|
|
6
|
-
class PathResolver {
|
|
7
|
-
constructor() { }
|
|
8
|
-
static getInstance() {
|
|
9
|
-
if (!PathResolver.instance) {
|
|
10
|
-
PathResolver.instance = new PathResolver();
|
|
11
|
-
}
|
|
12
|
-
return PathResolver.instance;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Detects the current environment based on filesystem structure and package.json
|
|
16
|
-
*/
|
|
17
|
-
detectEnvironment() {
|
|
18
|
-
// Check if we're in the SDK repo itself
|
|
19
|
-
if (process.env.NODE_ENV !== 'test' && this.isInSdkRepo()) {
|
|
20
|
-
return 'sdk-dev';
|
|
21
|
-
}
|
|
22
|
-
// Check if we're running tests
|
|
23
|
-
if (process.env.NODE_ENV === 'test') {
|
|
24
|
-
return 'test';
|
|
25
|
-
}
|
|
26
|
-
// Check if we're using a linked version of the SDK
|
|
27
|
-
if (this.isUsingLinkedSdk()) {
|
|
28
|
-
return 'linked-sdk';
|
|
29
|
-
}
|
|
30
|
-
// Default to production environment
|
|
31
|
-
return 'production';
|
|
32
|
-
}
|
|
33
|
-
isInSdkRepo() {
|
|
34
|
-
try {
|
|
35
|
-
// Check if we're in the SDK repo by looking for specific SDK files/directories
|
|
36
|
-
const currentDir = process.cwd();
|
|
37
|
-
return fs.existsSync(path.join(currentDir, 'src', 'node')) &&
|
|
38
|
-
fs.existsSync(path.join(currentDir, 'package.json')) &&
|
|
39
|
-
JSON.parse(fs.readFileSync(path.join(currentDir, 'package.json'), 'utf8')).name === '@seedprotocol/sdk';
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
isUsingLinkedSdk() {
|
|
46
|
-
try {
|
|
47
|
-
const pkgPath = path.join(process.cwd(), 'package.json');
|
|
48
|
-
if (!fs.existsSync(pkgPath))
|
|
49
|
-
return false;
|
|
50
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
51
|
-
const sdkDep = pkg.dependencies?.['@seedprotocol/sdk'];
|
|
52
|
-
return sdkDep && (sdkDep.startsWith('link:') || sdkDep.startsWith('portal:'));
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Gets the root directory containing node_modules
|
|
60
|
-
*/
|
|
61
|
-
getRootWithNodeModules() {
|
|
62
|
-
const processCwd = process.cwd();
|
|
63
|
-
const calledFromMocks = processCwd.includes('__mocks__');
|
|
64
|
-
if (calledFromMocks) {
|
|
65
|
-
return path.join(processCwd, '..', '..', '..', '..');
|
|
66
|
-
}
|
|
67
|
-
return processCwd;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Gets the SDK root directory
|
|
71
|
-
*/
|
|
72
|
-
getSdkRootDir() {
|
|
73
|
-
const env = this.detectEnvironment();
|
|
74
|
-
const rootWithNodeModules = this.getRootWithNodeModules();
|
|
75
|
-
const processCwd = process.cwd();
|
|
76
|
-
// For test environment, always return the SDK root directory
|
|
77
|
-
if (env === 'test') {
|
|
78
|
-
return rootWithNodeModules;
|
|
79
|
-
}
|
|
80
|
-
if (env === 'linked-sdk') {
|
|
81
|
-
// For linked packages, find the package directory
|
|
82
|
-
const pkgJson = JSON.parse(fs.readFileSync(path.join(processCwd, 'package.json'), 'utf8'));
|
|
83
|
-
const sdkPath = pkgJson.dependencies?.['@seedprotocol/sdk'] || pkgJson.devDependencies?.['@seedprotocol/sdk'];
|
|
84
|
-
console.log(sdkPath);
|
|
85
|
-
if (sdkPath === 'link:@seedprotocol/sdk') {
|
|
86
|
-
return path.join(processCwd, 'node_modules', '@seedprotocol', 'sdk', 'src');
|
|
87
|
-
}
|
|
88
|
-
return path.resolve(processCwd, sdkPath.replace(/^(link:|portal:)/, ''));
|
|
89
|
-
}
|
|
90
|
-
console.log('getSdkRootDir', rootWithNodeModules, env);
|
|
91
|
-
switch (env) {
|
|
92
|
-
case 'sdk-dev':
|
|
93
|
-
// This should be {localDir}/seed-protocol-sdk (the SDK root directory)
|
|
94
|
-
return rootWithNodeModules;
|
|
95
|
-
case 'test':
|
|
96
|
-
// This should be {localDir}/seed-protocol-sdk (the SDK root directory)
|
|
97
|
-
return rootWithNodeModules;
|
|
98
|
-
default:
|
|
99
|
-
// This should be {projectDir}/node_modules/@seedprotocol/sdk/dist
|
|
100
|
-
return path.join(rootWithNodeModules, 'node_modules', '@seedprotocol', 'sdk', 'dist');
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
getNodeModulesDir() {
|
|
104
|
-
const env = this.detectEnvironment();
|
|
105
|
-
const rootWithNodeModules = this.getRootWithNodeModules();
|
|
106
|
-
let nodeModulesDir = path.join(rootWithNodeModules, 'node_modules');
|
|
107
|
-
if (env !== 'linked-sdk' && env !== 'sdk-dev' && nodeModulesDir.includes('__tests__')) {
|
|
108
|
-
nodeModulesDir = path.join(process.cwd(), '..', '..', '..', '..', 'node_modules');
|
|
109
|
-
}
|
|
110
|
-
return nodeModulesDir;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Gets the .seed directory path
|
|
114
|
-
*/
|
|
115
|
-
getDotSeedDir(schemaFileDir) {
|
|
116
|
-
if (!schemaFileDir && process.env.SEED_SDK_TEST_PROJECT_TYPE && !process.cwd().includes('__mocks__')) {
|
|
117
|
-
return path.join(process.cwd(), '__tests__', '__mocks__', process.env.SEED_SDK_TEST_PROJECT_TYPE, 'project', '.seed');
|
|
118
|
-
}
|
|
119
|
-
return path.join(schemaFileDir || process.cwd(), '.seed');
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Finds the Seed Protocol config file in the given directory
|
|
123
|
-
* @param searchDir - Directory to search for the config file
|
|
124
|
-
* @returns The path to the found config file, or null if not found
|
|
125
|
-
*/
|
|
126
|
-
findConfigFile(searchDir = process.cwd()) {
|
|
127
|
-
return findSeedConfigFile(searchDir);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Gets paths for app-specific directories
|
|
131
|
-
*/
|
|
132
|
-
getAppPaths(schemaFileDir) {
|
|
133
|
-
const env = this.detectEnvironment();
|
|
134
|
-
const dotSeedDir = this.getDotSeedDir(schemaFileDir);
|
|
135
|
-
const nodeModulesDir = this.getNodeModulesDir();
|
|
136
|
-
let drizzleKitPath = path.join(nodeModulesDir, 'drizzle-kit', 'bin.cjs');
|
|
137
|
-
if (env === 'linked-sdk') {
|
|
138
|
-
const sdkRootDir = this.getSdkRootDir();
|
|
139
|
-
console.log(`sdkRootDir: ${sdkRootDir}`);
|
|
140
|
-
const sdkPackageDir = path.dirname(sdkRootDir);
|
|
141
|
-
console.log(`sdkPackageDir: ${sdkPackageDir}`);
|
|
142
|
-
const sdkNodeModulesDir = path.join(sdkPackageDir, 'node_modules');
|
|
143
|
-
drizzleKitPath = path.join(sdkNodeModulesDir, 'drizzle-kit', 'bin.cjs');
|
|
144
|
-
}
|
|
145
|
-
// Determine the correct template path based on environment
|
|
146
|
-
let templatePath;
|
|
147
|
-
if (env === 'production') {
|
|
148
|
-
// In production, templates are at dist/node/codegen/templates
|
|
149
|
-
templatePath = path.join(this.getSdkRootDir(), 'node', 'codegen', 'templates');
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
// In development/test, templates are at src/node/codegen/templates
|
|
153
|
-
templatePath = path.join(this.getSdkRootDir(), 'src', 'node', 'codegen', 'templates');
|
|
154
|
-
}
|
|
155
|
-
return {
|
|
156
|
-
sdkRootDir: this.getSdkRootDir(),
|
|
157
|
-
dotSeedDir,
|
|
158
|
-
nodeModulesDir,
|
|
159
|
-
appSchemaDir: path.join(dotSeedDir, 'schema'),
|
|
160
|
-
appDbDir: path.join(dotSeedDir, 'db'),
|
|
161
|
-
appMetaDir: path.join(dotSeedDir, 'db', 'meta'),
|
|
162
|
-
drizzleDbConfigPath: path.join(this.getSdkRootDir(), 'src', NODE_APP_DB_CONFIG),
|
|
163
|
-
drizzleKitPath,
|
|
164
|
-
templatePath
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export { PathResolver };
|
|
170
|
-
//# sourceMappingURL=PathResolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PathResolver.js","sources":["../../../../src/node/PathResolver.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs'\nimport { NODE_APP_DB_CONFIG } from './constants'\nimport { findSeedConfigFile } from '@/helpers'\n\nexport class PathResolver {\n private static instance: PathResolver\n private constructor() {}\n\n static getInstance(): PathResolver {\n if (!PathResolver.instance) {\n PathResolver.instance = new PathResolver()\n }\n return PathResolver.instance\n }\n\n /**\n * Detects the current environment based on filesystem structure and package.json\n */\n private detectEnvironment(): 'sdk-dev' | 'linked-sdk' | 'test' | 'production' {\n // Check if we're in the SDK repo itself\n if (process.env.NODE_ENV !== 'test' && this.isInSdkRepo()) {\n return 'sdk-dev'\n }\n\n // Check if we're running tests\n if (process.env.NODE_ENV === 'test') {\n return 'test'\n }\n\n // Check if we're using a linked version of the SDK\n if (this.isUsingLinkedSdk()) {\n return 'linked-sdk'\n }\n\n // Default to production environment\n return 'production'\n }\n\n private isInSdkRepo(): boolean {\n try {\n // Check if we're in the SDK repo by looking for specific SDK files/directories\n const currentDir = process.cwd()\n return fs.existsSync(path.join(currentDir, 'src', 'node')) &&\n fs.existsSync(path.join(currentDir, 'package.json')) &&\n JSON.parse(fs.readFileSync(path.join(currentDir, 'package.json'), 'utf8')).name === '@seedprotocol/sdk'\n } catch {\n return false\n }\n }\n\n private isUsingLinkedSdk(): boolean {\n try {\n const pkgPath = path.join(process.cwd(), 'package.json')\n if (!fs.existsSync(pkgPath)) return false\n \n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'))\n const sdkDep = pkg.dependencies?.['@seedprotocol/sdk']\n \n return sdkDep && (sdkDep.startsWith('link:') || sdkDep.startsWith('portal:'))\n } catch {\n return false\n }\n }\n\n /**\n * Gets the root directory containing node_modules\n */\n getRootWithNodeModules(): string {\n const processCwd = process.cwd()\n\n const calledFromMocks = processCwd.includes('__mocks__')\n\n if (calledFromMocks) {\n return path.join(processCwd, '..', '..', '..', '..',)\n }\n\n return processCwd\n }\n\n /**\n * Gets the SDK root directory\n */\n getSdkRootDir(): string {\n const env = this.detectEnvironment()\n const rootWithNodeModules = this.getRootWithNodeModules()\n const processCwd = process.cwd()\n\n // For test environment, always return the SDK root directory\n if (env === 'test') {\n return rootWithNodeModules\n }\n\n if (env === 'linked-sdk') {\n // For linked packages, find the package directory\n const pkgJson = JSON.parse(fs.readFileSync(path.join(processCwd, 'package.json'), 'utf8'))\n const sdkPath = pkgJson.dependencies?.['@seedprotocol/sdk'] || pkgJson.devDependencies?.['@seedprotocol/sdk']\n console.log(sdkPath)\n if (sdkPath === 'link:@seedprotocol/sdk') {\n return path.join(processCwd, 'node_modules', '@seedprotocol', 'sdk', 'src')\n }\n return path.resolve(processCwd, sdkPath.replace(/^(link:|portal:)/, ''))\n }\n\n console.log('getSdkRootDir', rootWithNodeModules, env)\n\n switch (env) {\n case 'sdk-dev':\n // This should be {localDir}/seed-protocol-sdk (the SDK root directory)\n return rootWithNodeModules\n case 'test':\n // This should be {localDir}/seed-protocol-sdk (the SDK root directory)\n return rootWithNodeModules\n default:\n // This should be {projectDir}/node_modules/@seedprotocol/sdk/dist\n return path.join(rootWithNodeModules, 'node_modules', '@seedprotocol', 'sdk', 'dist')\n }\n }\n\n getNodeModulesDir(): string {\n const env = this.detectEnvironment()\n const rootWithNodeModules = this.getRootWithNodeModules()\n\n let nodeModulesDir = path.join(rootWithNodeModules, 'node_modules')\n\n if (env !== 'linked-sdk' && env !== 'sdk-dev' && nodeModulesDir.includes('__tests__')) {\n nodeModulesDir = path.join(process.cwd(), '..', '..', '..', '..', 'node_modules',)\n }\n\n return nodeModulesDir\n }\n\n /**\n * Gets the .seed directory path\n */\n getDotSeedDir(schemaFileDir?: string): string {\n if (!schemaFileDir && process.env.SEED_SDK_TEST_PROJECT_TYPE && !process.cwd().includes('__mocks__')) {\n return path.join(process.cwd(), '__tests__', '__mocks__', process.env.SEED_SDK_TEST_PROJECT_TYPE, 'project', '.seed')\n }\n return path.join(schemaFileDir || process.cwd(), '.seed')\n }\n\n /**\n * Finds the Seed Protocol config file in the given directory\n * @param searchDir - Directory to search for the config file\n * @returns The path to the found config file, or null if not found\n */\n findConfigFile(searchDir: string = process.cwd()): string | null {\n return findSeedConfigFile(searchDir)\n }\n\n /**\n * Gets paths for app-specific directories\n */\n getAppPaths(schemaFileDir?: string | undefined) {\n const env = this.detectEnvironment()\n const dotSeedDir = this.getDotSeedDir(schemaFileDir)\n const nodeModulesDir = this.getNodeModulesDir()\n\n let drizzleKitPath = path.join(nodeModulesDir, 'drizzle-kit', 'bin.cjs')\n\n if (env === 'linked-sdk') {\n const sdkRootDir = this.getSdkRootDir()\n console.log(`sdkRootDir: ${sdkRootDir}`)\n const sdkPackageDir = path.dirname(sdkRootDir)\n console.log(`sdkPackageDir: ${sdkPackageDir}`)\n const sdkNodeModulesDir = path.join(sdkPackageDir, 'node_modules')\n drizzleKitPath = path.join(sdkNodeModulesDir, 'drizzle-kit', 'bin.cjs')\n }\n\n // Determine the correct template path based on environment\n let templatePath: string\n if (env === 'production') {\n // In production, templates are at dist/node/codegen/templates\n templatePath = path.join(this.getSdkRootDir(), 'node', 'codegen', 'templates')\n } else {\n // In development/test, templates are at src/node/codegen/templates\n templatePath = path.join(this.getSdkRootDir(), 'src', 'node', 'codegen', 'templates')\n }\n\n return {\n sdkRootDir: this.getSdkRootDir(),\n dotSeedDir,\n nodeModulesDir,\n appSchemaDir: path.join(dotSeedDir, 'schema'),\n appDbDir: path.join(dotSeedDir, 'db'),\n appMetaDir: path.join(dotSeedDir, 'db', 'meta'),\n drizzleDbConfigPath: path.join(this.getSdkRootDir(), 'src', NODE_APP_DB_CONFIG),\n drizzleKitPath,\n templatePath\n }\n }\n} \n"],"names":[],"mappings":"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"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import pluralize from 'pluralize';
|
|
3
|
-
import { camelCase, snakeCase } from 'lodash-es';
|
|
4
|
-
import * as nunjucks from 'nunjucks';
|
|
5
|
-
import { SCHEMA_NJK } from '../../helpers/constants.js';
|
|
6
|
-
import { getTsImport } from '../helpers/index.js';
|
|
7
|
-
import fs from 'fs';
|
|
8
|
-
import { PathResolver } from '../PathResolver.js';
|
|
9
|
-
import debug from 'debug';
|
|
10
|
-
|
|
11
|
-
const logger = debug('seedSdk:codegen:drizzle');
|
|
12
|
-
const TemplateLoader = {
|
|
13
|
-
getSource: (name) => {
|
|
14
|
-
const pathResolver = PathResolver.getInstance();
|
|
15
|
-
const { templatePath } = pathResolver.getAppPaths();
|
|
16
|
-
let templateFilePath = templatePath;
|
|
17
|
-
if (name.includes(templatePath)) {
|
|
18
|
-
templateFilePath = name;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
templateFilePath = path.join(templatePath, path.basename(name));
|
|
22
|
-
}
|
|
23
|
-
const src = fs.readFileSync(templateFilePath, 'utf-8');
|
|
24
|
-
return {
|
|
25
|
-
path: name,
|
|
26
|
-
src,
|
|
27
|
-
noCache: false,
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
// Configure Nunjucks
|
|
32
|
-
const env = new nunjucks.Environment(TemplateLoader);
|
|
33
|
-
env.addFilter('camelCase', camelCase);
|
|
34
|
-
env.addFilter('snakeCase', snakeCase);
|
|
35
|
-
env.addFilter('pluralize', pluralize);
|
|
36
|
-
const refNamesToExcludeFromRelations = [
|
|
37
|
-
'Text',
|
|
38
|
-
'Number',
|
|
39
|
-
'Boolean',
|
|
40
|
-
'Date',
|
|
41
|
-
];
|
|
42
|
-
const generateDrizzleSchemaCode = (modelName, modelClass) => {
|
|
43
|
-
const listProperties = Object.entries(modelClass.schema).filter(([key, propertyDef]) => propertyDef?.dataType === 'List' && !refNamesToExcludeFromRelations.includes(propertyDef?.ref));
|
|
44
|
-
const pathResolver = PathResolver.getInstance();
|
|
45
|
-
const { templatePath } = pathResolver.getAppPaths();
|
|
46
|
-
const filePath = path.join(templatePath, SCHEMA_NJK);
|
|
47
|
-
const schemaCode = env.render(filePath, {
|
|
48
|
-
modelName,
|
|
49
|
-
modelClass,
|
|
50
|
-
listProperties,
|
|
51
|
-
});
|
|
52
|
-
return schemaCode;
|
|
53
|
-
};
|
|
54
|
-
const createDrizzleSchemaFilesFromConfig = async (configFilePath, outputDirPath) => {
|
|
55
|
-
const pathResolver = PathResolver.getInstance();
|
|
56
|
-
const { dotSeedDir, appSchemaDir } = pathResolver.getAppPaths();
|
|
57
|
-
console.log('createDrizzleSchemaFilesFromConfig', configFilePath, outputDirPath);
|
|
58
|
-
// Use provided config file path or find the config file in the project root
|
|
59
|
-
const schemaFilePath = configFilePath || pathResolver.findConfigFile() || path.join(dotSeedDir, 'seed.config.ts');
|
|
60
|
-
console.log('schemaFilePath', schemaFilePath);
|
|
61
|
-
const { models, } = await getTsImport(schemaFilePath);
|
|
62
|
-
const writeToDir = appSchemaDir;
|
|
63
|
-
for (const [modelName, modelClass] of Object.entries(models)) {
|
|
64
|
-
const code = generateDrizzleSchemaCode(modelName, modelClass);
|
|
65
|
-
if (!fs.existsSync(writeToDir)) {
|
|
66
|
-
fs.mkdirSync(writeToDir);
|
|
67
|
-
}
|
|
68
|
-
const filePath = path.join(writeToDir, `${modelName}Schema.ts`);
|
|
69
|
-
await fs.promises.writeFile(filePath, code).catch((e) => console.error(e));
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
// Helper to determine TypeScript type based on property type
|
|
73
|
-
const seedTypeToJsType = (propertyType) => {
|
|
74
|
-
switch (propertyType) {
|
|
75
|
-
case 'Text':
|
|
76
|
-
return 'string';
|
|
77
|
-
case 'Number':
|
|
78
|
-
return 'number';
|
|
79
|
-
case 'Boolean':
|
|
80
|
-
return 'boolean';
|
|
81
|
-
case 'Date':
|
|
82
|
-
return 'string';
|
|
83
|
-
case 'List':
|
|
84
|
-
return 'string[]';
|
|
85
|
-
case 'Relation':
|
|
86
|
-
return 'string';
|
|
87
|
-
case 'Image':
|
|
88
|
-
return 'string';
|
|
89
|
-
case 'File':
|
|
90
|
-
return 'string';
|
|
91
|
-
default:
|
|
92
|
-
return 'any';
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
const generateModelCode = (values) => {
|
|
96
|
-
const { modelName, properties } = values;
|
|
97
|
-
const pathResolver = PathResolver.getInstance();
|
|
98
|
-
const { templatePath } = pathResolver.getAppPaths();
|
|
99
|
-
if (modelName === 'Text' || modelName === 'TestModel') {
|
|
100
|
-
logger(`Model name is ${modelName}.`);
|
|
101
|
-
}
|
|
102
|
-
const njkEnv = new nunjucks.Environment(new nunjucks.FileSystemLoader(templatePath));
|
|
103
|
-
njkEnv.addFilter('seedTypeToJsType', seedTypeToJsType);
|
|
104
|
-
return njkEnv.render('model.njk', { modelName, properties });
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export { createDrizzleSchemaFilesFromConfig, generateDrizzleSchemaCode, generateModelCode };
|
|
108
|
-
//# sourceMappingURL=drizzle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.js","sources":["../../../../../src/node/codegen/drizzle.ts"],"sourcesContent":["import path from 'path'\nimport pluralize from 'pluralize'\nimport { camelCase, snakeCase } from 'lodash-es'\nimport * as nunjucks from 'nunjucks'\nimport { ILoader } from 'nunjucks'\nimport { ModelClassType } from '@/types'\nimport { SCHEMA_NJK } from '@/helpers/constants'\nimport { getTsImport } from '@/node/helpers'\nimport fs from 'fs'\nimport {PathResolver} from '@/node/PathResolver'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:codegen:drizzle')\n\n\nconst TemplateLoader: ILoader = {\n getSource: (name: string) => {\n const pathResolver = PathResolver.getInstance()\n const { templatePath } = pathResolver.getAppPaths()\n let templateFilePath = templatePath\n if (name.includes(templatePath)) {\n templateFilePath = name\n } else {\n templateFilePath = path.join(templatePath, path.basename(name))\n }\n const src = fs.readFileSync(templateFilePath, 'utf-8')\n\n return {\n path: name,\n src,\n noCache: false,\n }\n },\n}\n\n// Configure Nunjucks\nconst env = new nunjucks.Environment(TemplateLoader)\n\nenv.addFilter('camelCase', camelCase)\nenv.addFilter('snakeCase', snakeCase)\nenv.addFilter('pluralize', pluralize)\n\nconst refNamesToExcludeFromRelations = [\n 'Text',\n 'Number',\n 'Boolean',\n 'Date',\n]\n\nexport const generateDrizzleSchemaCode = (\n modelName: string,\n modelClass: ModelClassType,\n): string => {\n const listProperties = Object.entries(modelClass.schema).filter(\n ([key, propertyDef]) => propertyDef?.dataType === 'List' && !refNamesToExcludeFromRelations.includes(propertyDef?.ref!),\n )\n\n const pathResolver = PathResolver.getInstance()\n const { templatePath } = pathResolver.getAppPaths()\n const filePath = path.join(templatePath, SCHEMA_NJK)\n\n const schemaCode = env.render(filePath, {\n modelName,\n modelClass,\n listProperties,\n })\n\n return schemaCode\n}\n\nexport const createDrizzleSchemaFilesFromConfig = async (\n configFilePath: string | undefined,\n outputDirPath: string | undefined,\n) => {\n const pathResolver = PathResolver.getInstance()\n const { dotSeedDir, appSchemaDir } = pathResolver.getAppPaths()\n console.log('createDrizzleSchemaFilesFromConfig', configFilePath, outputDirPath)\n\n // Use provided config file path or find the config file in the project root\n const schemaFilePath = configFilePath || pathResolver.findConfigFile() || path.join(dotSeedDir, 'seed.config.ts')\n console.log('schemaFilePath', schemaFilePath)\n\n const { models, } = await getTsImport<{\n models: Record<string, ModelClassType>\n }>(schemaFilePath)\n\n const writeToDir = outputDirPath || appSchemaDir\n\n for (const [modelName, modelClass] of Object.entries(models)) {\n const code = generateDrizzleSchemaCode(modelName, modelClass)\n\n if (!fs.existsSync(writeToDir)) {\n fs.mkdirSync(writeToDir)\n }\n\n const filePath = path.join(writeToDir, `${modelName}Schema.ts`)\n\n await fs.promises.writeFile(filePath, code).catch((e) => console.error(e))\n }\n}\n\n // Helper to determine TypeScript type based on property type\n const seedTypeToJsType = (propertyType: string): string => {\n switch (propertyType) {\n case 'Text':\n return 'string';\n case 'Number':\n return 'number';\n case 'Boolean':\n return 'boolean';\n case 'Date':\n return 'string';\n case 'List':\n return 'string[]';\n case 'Relation':\n return 'string';\n case 'Image':\n return 'string';\n case 'File':\n return 'string';\n default:\n return 'any';\n }\n};\n\n\nexport const generateModelCode = (values: Record<string, any>): string => {\n const { modelName, properties } = values;\n const pathResolver = PathResolver.getInstance()\n const { templatePath } = pathResolver.getAppPaths()\n\n if (modelName === 'Text' || modelName === 'TestModel') {\n logger(`Model name is ${modelName}.`)\n }\n\n const njkEnv = new nunjucks.Environment(new nunjucks.FileSystemLoader(templatePath))\n njkEnv.addFilter('seedTypeToJsType', seedTypeToJsType)\n return njkEnv.render('model.njk', { modelName, properties })\n};\n"],"names":[],"mappings":";;;;;;;;;;AAYA,MAAM,MAAM,GAAG,KAAK,CAAC,yBAAyB,CAAC;AAG/C,MAAM,cAAc,GAAY;AAC9B,IAAA,SAAS,EAAE,CAAC,IAAY,KAAI;AAC1B,QAAA,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE;QAC/C,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE;QACnD,IAAI,gBAAgB,GAAG,YAAY;AACnC,QAAA,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;YAC/B,gBAAgB,GAAG,IAAI;QACzB;aAAO;AACL,YAAA,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjE;QACA,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC;QAEtD,OAAO;AACL,YAAA,IAAI,EAAE,IAAI;YACV,GAAG;AACH,YAAA,OAAO,EAAE,KAAK;SACf;IACH,CAAC;CACF;AAED;AACA,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC;AAEpD,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC;AACrC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC;AACrC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC;AAErC,MAAM,8BAA8B,GAAG;IACrC,MAAM;IACN,QAAQ;IACR,SAAS;IACT,MAAM;CACP;MAEY,yBAAyB,GAAG,CACvC,SAAiB,EACjB,UAA0B,KAChB;AACV,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAC7D,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,KAAK,WAAW,EAAE,QAAQ,KAAK,MAAM,IAAI,CAAC,8BAA8B,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAI,CAAC,CACxH;AAED,IAAA,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE;IAC/C,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE;IACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;AAEpD,IAAA,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE;QACtC,SAAS;QACT,UAAU;QACV,cAAc;AACf,KAAA,CAAC;AAEF,IAAA,OAAO,UAAU;AACnB;AAEO,MAAM,kCAAkC,GAAG,OAChD,cAAkC,EAClC,aAAiC,KAC/B;AACF,IAAA,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE;IAC/C,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE;IAC/D,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,cAAc,EAAE,aAAa,CAAC;;AAGhF,IAAA,MAAM,cAAc,GAAG,cAAc,IAAI,YAAY,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC;AACjH,IAAA,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC;IAE7C,MAAM,EAAE,MAAM,GAAG,GAAG,MAAM,WAAW,CAElC,cAAc,CAAC;AAElB,IAAA,MAAM,UAAU,GAAoB,YAAY;AAEhD,IAAA,KAAK,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAC5D,MAAM,IAAI,GAAG,yBAAyB,CAAC,SAAS,EAAE,UAAU,CAAC;QAE7D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;AAC9B,YAAA,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC;QAC1B;AAEA,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAA,EAAG,SAAS,CAAA,SAAA,CAAW,CAAC;QAE/D,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5E;AACF;AAEC;AACA,MAAM,gBAAgB,GAAG,CAAC,YAAoB,KAAY;IACzD,QAAQ,YAAY;AAClB,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,QAAQ;AACjB,QAAA,KAAK,QAAQ;AACX,YAAA,OAAO,QAAQ;AACjB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,SAAS;AAClB,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,QAAQ;AACjB,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,UAAU;AACnB,QAAA,KAAK,UAAU;AACb,YAAA,OAAO,QAAQ;AACjB,QAAA,KAAK,OAAO;AACV,YAAA,OAAO,QAAQ;AACjB,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,QAAQ;AACjB,QAAA;AACE,YAAA,OAAO,KAAK;;AAElB,CAAC;AAGM,MAAM,iBAAiB,GAAG,CAAC,MAA2B,KAAY;AACvE,IAAA,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM;AACxC,IAAA,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE;IAC/C,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE;IAEnD,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,WAAW,EAAE;AACrD,QAAA,MAAM,CAAC,CAAA,cAAA,EAAiB,SAAS,CAAA,CAAA,CAAG,CAAC;IACvC;AAEA,IAAA,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACpF,IAAA,MAAM,CAAC,SAAS,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;AACtD,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AAC9D;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/node/constants.ts"],"sourcesContent":["import 'dotenv/config'\n\nexport const NODE_APP_DB_CONFIG = 'db/configs/node.app.db.config.ts'\n\n\n\n"],"names":[],"mappings":";;AAEO,MAAM,kBAAkB,GAAG;;;;"}
|
package/dist/src/node/db/Db.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { BaseDb } from '../../db/Db/BaseDb.js';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import debug from 'debug';
|
|
4
|
-
import '../../seedSchema/SeedSchema.js';
|
|
5
|
-
import '../../seedSchema/VersionSchema.js';
|
|
6
|
-
import '../../seedSchema/MetadataSchema.js';
|
|
7
|
-
import { appState } from '../../seedSchema/AppStateSchema.js';
|
|
8
|
-
import '../../seedSchema/ModelSchema.js';
|
|
9
|
-
import '../../seedSchema/ModelUidSchema.js';
|
|
10
|
-
import '../../seedSchema/PropertyUidSchema.js';
|
|
11
|
-
import '../../seedSchema/ConfigSchema.js';
|
|
12
|
-
|
|
13
|
-
const logger = debug('seedSdk:node:db:Db');
|
|
14
|
-
const getConfig = async (dotSeedDir) => {
|
|
15
|
-
const { defineConfig } = await import('drizzle-kit');
|
|
16
|
-
let schemaDir = path.join(process.cwd(), 'schema');
|
|
17
|
-
const nodeDbConfig = defineConfig({
|
|
18
|
-
schema: schemaDir,
|
|
19
|
-
dialect: 'sqlite',
|
|
20
|
-
out: `${dotSeedDir}/db`,
|
|
21
|
-
dbCredentials: {
|
|
22
|
-
url: `${dotSeedDir}/db/app_db.sqlite3`,
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return nodeDbConfig;
|
|
26
|
-
};
|
|
27
|
-
class Db extends BaseDb {
|
|
28
|
-
constructor() {
|
|
29
|
-
super();
|
|
30
|
-
}
|
|
31
|
-
static getAppDb() {
|
|
32
|
-
return this.db;
|
|
33
|
-
}
|
|
34
|
-
static isAppDbReady() {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
static async prepareDb(filesDir) {
|
|
38
|
-
const nodeDbConfig = await getConfig(filesDir);
|
|
39
|
-
const { drizzle } = await import('drizzle-orm/better-sqlite3');
|
|
40
|
-
this.db = drizzle({
|
|
41
|
-
...nodeDbConfig,
|
|
42
|
-
logger: true,
|
|
43
|
-
});
|
|
44
|
-
if (!this.db) {
|
|
45
|
-
throw new Error('Db not found');
|
|
46
|
-
}
|
|
47
|
-
return this.db;
|
|
48
|
-
}
|
|
49
|
-
static async connectToDb(pathToDir, dbName) {
|
|
50
|
-
return {
|
|
51
|
-
id: this.db ? this.db.constructor.name : ''
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
static async migrate(pathToDbDir, dbName, dbId) {
|
|
55
|
-
const { migrate } = await import('drizzle-orm/better-sqlite3/migrator');
|
|
56
|
-
migrate(this.db, { migrationsFolder: pathToDbDir });
|
|
57
|
-
const queryResult = await this.db.select().from(appState);
|
|
58
|
-
logger('queryResult', queryResult);
|
|
59
|
-
return this.db;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
BaseDb.setPlatformClass(Db);
|
|
63
|
-
|
|
64
|
-
export { Db };
|
|
65
|
-
//# sourceMappingURL=Db.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Db.js","sources":["../../../../../src/node/db/Db.ts"],"sourcesContent":["import { BaseDb } from \"@/db/Db/BaseDb\";\nimport { IDb } from \"@/interfaces\";\nimport path from \"path\";\nimport { DrizzleConfig, } from \"drizzle-orm\";\nimport debug from 'debug'\nimport { appState } from '@/seedSchema'\n\nconst logger = debug('seedSdk:node:db:Db')\n\nconst getConfig = async (dotSeedDir: string) => {\n\n const { defineConfig } = await import('drizzle-kit')\n\n let schemaDir = path.join(process.cwd(), 'schema')\n\n const nodeDbConfig = defineConfig({\n schema: schemaDir,\n dialect: 'sqlite',\n out: `${dotSeedDir}/db`,\n dbCredentials: {\n url: `${dotSeedDir}/db/app_db.sqlite3`,\n }\n }) as DrizzleConfig & { dbCredentials: { url: string } }\n\n return nodeDbConfig\n}\n\nclass Db extends BaseDb implements IDb {\n static db: any\n\n constructor() {\n super()\n }\n\n static getAppDb() {\n return this.db\n }\n\n static isAppDbReady() {\n return true\n }\n\n static async prepareDb(filesDir: string) {\n const nodeDbConfig = await getConfig(filesDir)\n\n const {drizzle} = await import('drizzle-orm/better-sqlite3')\n\n this.db = drizzle({\n ...nodeDbConfig,\n logger: true,\n })\n\n if (!this.db) {\n throw new Error('Db not found')\n }\n\n return this.db\n }\n\n static async connectToDb(pathToDir: string, dbName: string) {\n\n return {\n id: this.db ? this.db.constructor.name : ''\n }\n }\n\n static async migrate(pathToDbDir: string, dbName: string, dbId: string) {\n const {migrate} = await import('drizzle-orm/better-sqlite3/migrator')\n migrate(this.db, { migrationsFolder: pathToDbDir })\n const queryResult = await this.db.select().from(appState)\n logger('queryResult', queryResult)\n\n return this.db\n }\n}\n\nBaseDb.setPlatformClass(Db)\n\nexport { Db }\n"],"names":[],"mappings":";;;;;;;;;;;;AAOA,MAAM,MAAM,GAAG,KAAK,CAAC,oBAAoB,CAAC;AAE1C,MAAM,SAAS,GAAG,OAAO,UAAkB,KAAI;IAE7C,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,OAAO,aAAa,CAAC;AAEpD,IAAA,IAAI,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC;IAElD,MAAM,YAAY,GAAG,YAAY,CAAC;AAChC,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,OAAO,EAAE,QAAQ;QACjB,GAAG,EAAE,CAAA,EAAG,UAAU,CAAA,GAAA,CAAK;AACvB,QAAA,aAAa,EAAE;YACb,GAAG,EAAE,CAAA,EAAG,UAAU,CAAA,kBAAA,CAAoB;AACvC;AACF,KAAA,CAAuD;AAExD,IAAA,OAAO,YAAY;AACrB,CAAC;AAED,MAAM,EAAG,SAAQ,MAAM,CAAA;AAGrB,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;IACT;AAEA,IAAA,OAAO,QAAQ,GAAA;QACb,OAAO,IAAI,CAAC,EAAE;IAChB;AAEA,IAAA,OAAO,YAAY,GAAA;AACjB,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,aAAa,SAAS,CAAC,QAAgB,EAAA;AACrC,QAAA,MAAM,YAAY,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC;QAE9C,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,OAAO,4BAA4B,CAAC;AAE5D,QAAA,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC;AAChB,YAAA,GAAG,YAAY;AACf,YAAA,MAAM,EAAE,IAAI;AACb,SAAA,CAAC;AAEF,QAAA,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;AACZ,YAAA,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC;QACjC;QAEA,OAAO,IAAI,CAAC,EAAE;IAChB;AAEA,IAAA,aAAa,WAAW,CAAC,SAAiB,EAAE,MAAc,EAAA;QAExD,OAAO;AACL,YAAA,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,GAAG;SAC1C;IACH;IAEA,aAAa,OAAO,CAAC,WAAmB,EAAE,MAAc,EAAE,IAAY,EAAA;QACpE,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,OAAO,qCAAqC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC;AACnD,QAAA,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;AACzD,QAAA,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC;QAElC,OAAO,IAAI,CAAC,EAAE;IAChB;AACD;AAED,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseArweaveClient } from '../../helpers/ArweaveClient/BaseArweaveClient.js';
|
|
2
|
-
import { ARWEAVE_ENDPOINT } from '../../services/internal/constants.js';
|
|
3
|
-
import { GraphQLClient } from 'graphql-request';
|
|
4
|
-
|
|
5
|
-
class ArweaveClient extends BaseArweaveClient {
|
|
6
|
-
static getArweaveClient() {
|
|
7
|
-
return new GraphQLClient(ARWEAVE_ENDPOINT);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
BaseArweaveClient.setPlatformClass(ArweaveClient);
|
|
11
|
-
|
|
12
|
-
export { ArweaveClient };
|
|
13
|
-
//# sourceMappingURL=ArweaveClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArweaveClient.js","sources":["../../../../../src/node/helpers/ArweaveClient.ts"],"sourcesContent":["import { BaseArweaveClient } from '@/helpers/ArweaveClient/BaseArweaveClient';\nimport { ARWEAVE_ENDPOINT } from '@/services/internal/constants';\nimport { GraphQLClient } from 'graphql-request';\n\nclass ArweaveClient extends BaseArweaveClient {\n static getArweaveClient(): GraphQLClient {\n return new GraphQLClient(ARWEAVE_ENDPOINT);\n }\n}\n\nBaseArweaveClient.setPlatformClass(ArweaveClient);\n\nexport { ArweaveClient }; "],"names":[],"mappings":";;;;AAIA,MAAM,aAAc,SAAQ,iBAAiB,CAAA;AAC3C,IAAA,OAAO,gBAAgB,GAAA;AACrB,QAAA,OAAO,IAAI,aAAa,CAAC,gBAAgB,CAAC;IAC5C;AACD;AAED,iBAAiB,CAAC,gBAAgB,CAAC,aAAa,CAAC;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseEasClient } from '../../helpers/EasClient/BaseEasClient.js';
|
|
2
|
-
import { EAS_ENDPOINT } from '../../services/internal/constants.js';
|
|
3
|
-
import { GraphQLClient } from 'graphql-request';
|
|
4
|
-
|
|
5
|
-
class EasClient extends BaseEasClient {
|
|
6
|
-
static getEasClient() {
|
|
7
|
-
return new GraphQLClient(EAS_ENDPOINT);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
BaseEasClient.setPlatformClass(EasClient);
|
|
11
|
-
|
|
12
|
-
export { EasClient };
|
|
13
|
-
//# sourceMappingURL=EasClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EasClient.js","sources":["../../../../../src/node/helpers/EasClient.ts"],"sourcesContent":["import { BaseEasClient } from \"@/helpers/EasClient/BaseEasClient\"\nimport { EAS_ENDPOINT } from \"@/services/internal/constants\"\nimport { GraphQLClient } from \"graphql-request\"\n\nclass EasClient extends BaseEasClient {\n static getEasClient() {\n return new GraphQLClient(EAS_ENDPOINT)\n }\n}\n\nBaseEasClient.setPlatformClass(EasClient)\n\nexport { EasClient }"],"names":[],"mappings":";;;;AAIA,MAAM,SAAU,SAAQ,aAAa,CAAA;AACnC,IAAA,OAAO,YAAY,GAAA;AACjB,QAAA,OAAO,IAAI,aAAa,CAAC,YAAY,CAAC;IACxC;AACD;AAED,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC;;;;"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as fsAsync from 'fs/promises';
|
|
2
|
-
import { BaseFileManager } from '../../helpers/FileManager/BaseFileManager.js';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
class FileManager extends BaseFileManager {
|
|
6
|
-
static async getContentUrlFromPath(path) {
|
|
7
|
-
return new Promise((resolve, reject) => {
|
|
8
|
-
reject(new Error('Not implemented'));
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
static async initializeFileSystem() {
|
|
12
|
-
return; // No need to initialize file system in node
|
|
13
|
-
}
|
|
14
|
-
static async downloadAllFiles() {
|
|
15
|
-
return new Promise((resolve, reject) => {
|
|
16
|
-
reject(new Error('Not implemented'));
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
static async resizeImage() {
|
|
20
|
-
return new Promise((resolve, reject) => {
|
|
21
|
-
reject(new Error('Not implemented'));
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
static async resizeAllImages() {
|
|
25
|
-
return new Promise((resolve, reject) => {
|
|
26
|
-
reject(new Error('Not implemented'));
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static async pathExists(filePath) {
|
|
30
|
-
return await fsAsync.access(filePath).then(() => true).catch(() => false);
|
|
31
|
-
}
|
|
32
|
-
static async createDirIfNotExists(filePath) {
|
|
33
|
-
await fsAsync.mkdir(filePath, { recursive: true });
|
|
34
|
-
}
|
|
35
|
-
static async readFileAsBuffer(filePath) {
|
|
36
|
-
return await fsAsync.readFile(filePath);
|
|
37
|
-
}
|
|
38
|
-
static async readFile(filePath) {
|
|
39
|
-
return new File([await fsAsync.readFile(filePath)], filePath);
|
|
40
|
-
}
|
|
41
|
-
static getParentDirPath(filePath) {
|
|
42
|
-
return path.dirname(filePath);
|
|
43
|
-
}
|
|
44
|
-
static getFilenameFromPath(filePath) {
|
|
45
|
-
return path.basename(filePath);
|
|
46
|
-
}
|
|
47
|
-
static getPathModule() {
|
|
48
|
-
return path;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { FileManager };
|
|
53
|
-
//# sourceMappingURL=FileManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileManager.js","sources":["../../../../../src/node/helpers/FileManager.ts"],"sourcesContent":["import * as fsAsync from 'fs/promises'\nimport { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'\nimport path from 'path'\n\nclass FileManager extends BaseFileManager {\n\n static async getContentUrlFromPath( path: string ): Promise<string | undefined> {\n return new Promise(( resolve, reject ) => {\n reject(new Error('Not implemented'))\n })\n }\n\n static async initializeFileSystem(): Promise<void> {\n return // No need to initialize file system in node\n }\n\n static async downloadAllFiles(): Promise<void> {\n return new Promise(( resolve, reject ) => {\n reject(new Error('Not implemented'))\n })\n }\n\n static async resizeImage(): Promise<void> {\n return new Promise(( resolve, reject ) => {\n reject(new Error('Not implemented'))\n })\n }\n\n static async resizeAllImages(): Promise<void> {\n return new Promise(( resolve, reject ) => {\n reject(new Error('Not implemented'))\n })\n }\n\n static async pathExists(filePath: string): Promise<boolean> {\n return await fsAsync.access(filePath).then(() => true).catch(() => false)\n }\n\n static async createDirIfNotExists(filePath: string): Promise<void> {\n await fsAsync.mkdir(filePath, { recursive: true })\n }\n\n static async readFileAsBuffer( filePath: string ): Promise<Buffer> {\n return await fsAsync.readFile(filePath)\n }\n\n static async readFile(filePath: string): Promise<File> {\n return new File([await fsAsync.readFile(filePath)], filePath)\n }\n\n static getParentDirPath(filePath: string): string {\n return path.dirname(filePath)\n }\n\n static getFilenameFromPath(filePath: string): string {\n return path.basename(filePath)\n }\n\n static getPathModule(): any {\n return path\n }\n}\n\nexport { FileManager }\n\n"],"names":[],"mappings":";;;;AAIA,MAAM,WAAY,SAAQ,eAAe,CAAA;AAEvC,IAAA,aAAa,qBAAqB,CAAE,IAAY,EAAA;QAC9C,OAAO,IAAI,OAAO,CAAC,CAAE,OAAO,EAAE,MAAM,KAAK;AACvC,YAAA,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACtC,QAAA,CAAC,CAAC;IACJ;IAEA,aAAa,oBAAoB,GAAA;AAC/B,QAAA,OAAM;IACR;IAEA,aAAa,gBAAgB,GAAA;QAC3B,OAAO,IAAI,OAAO,CAAC,CAAE,OAAO,EAAE,MAAM,KAAK;AACvC,YAAA,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACtC,QAAA,CAAC,CAAC;IACJ;IAEA,aAAa,WAAW,GAAA;QACtB,OAAO,IAAI,OAAO,CAAC,CAAE,OAAO,EAAE,MAAM,KAAK;AACvC,YAAA,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACtC,QAAA,CAAC,CAAC;IACJ;IAEA,aAAa,eAAe,GAAA;QAC1B,OAAO,IAAI,OAAO,CAAC,CAAE,OAAO,EAAE,MAAM,KAAK;AACvC,YAAA,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACtC,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,aAAa,UAAU,CAAC,QAAgB,EAAA;QACtC,OAAO,MAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3E;AAEA,IAAA,aAAa,oBAAoB,CAAC,QAAgB,EAAA;AAChD,QAAA,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IACpD;AAEA,IAAA,aAAa,gBAAgB,CAAE,QAAgB,EAAA;AAC7C,QAAA,OAAO,MAAM,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACzC;AAEA,IAAA,aAAa,QAAQ,CAAC,QAAgB,EAAA;AACpC,QAAA,OAAO,IAAI,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC;IAC/D;IAEA,OAAO,gBAAgB,CAAC,QAAgB,EAAA;AACtC,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC/B;IAEA,OAAO,mBAAmB,CAAC,QAAgB,EAAA;AACzC,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAChC;AAEA,IAAA,OAAO,aAAa,GAAA;AAClB,QAAA,OAAO,IAAI;IACb;AACD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClient.js","sources":["../../../../../src/node/helpers/QueryClient.ts"],"sourcesContent":["import { BaseQueryClient } from \"@/helpers/QueryClient/BaseQueryClient\"\nimport { IQueryClient } from '@/interfaces/IQueryClient'\n\n\n\nclass QueryClient extends BaseQueryClient {\n static getQueryClient = (): IQueryClient=> {\n return {\n fetchQuery: async <T>({\n queryKey,\n queryFn,\n }): Promise<T> => {\n return await queryFn()\n },\n getQueryData: () => {\n return new Promise((resolve, reject) => {\n reject(new Error('Not implemented'))\n })\n },\n }\n }\n}\n\nBaseQueryClient.setPlatformClass(QueryClient)\n\nexport { QueryClient }\n"],"names":[],"mappings":";;AAKA,MAAM,WAAY,SAAQ,eAAe,CAAA;;AAChC,WAAA,CAAA,cAAc,GAAG,MAAkB;IACxC,OAAO;QACL,UAAU,EAAE,OAAU,EACpB,QAAQ,EACR,OAAO,GACP,KAAgB;YAChB,OAAO,MAAM,OAAO,EAAE;QACxB,CAAC;QACD,YAAY,EAAE,MAAK;YACjB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,gBAAA,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACtC,YAAA,CAAC,CAAC;QACJ,CAAC;KACF;AACH,CAAC;AAGH,eAAe,CAAC,gBAAgB,CAAC,WAAW,CAAC;;;;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import * as tsImport from 'ts-import';
|
|
3
|
-
import { LoadMode } from 'ts-import';
|
|
4
|
-
import 'path';
|
|
5
|
-
import 'glob';
|
|
6
|
-
import 'rimraf';
|
|
7
|
-
import debug from 'debug';
|
|
8
|
-
|
|
9
|
-
const logger = debug('seedSdk:helpers');
|
|
10
|
-
const getTsImport = async (filePath) => {
|
|
11
|
-
// Check if the config file exists
|
|
12
|
-
if (!fs.existsSync(filePath)) {
|
|
13
|
-
logger(`Typescript file not found at ${filePath}`);
|
|
14
|
-
throw new Error(`Typescript file not found at ${filePath}`);
|
|
15
|
-
}
|
|
16
|
-
let result;
|
|
17
|
-
try {
|
|
18
|
-
result = await tsImport.load(filePath, {
|
|
19
|
-
mode: LoadMode.Compile,
|
|
20
|
-
compileOptions: {
|
|
21
|
-
compilerOptions: {
|
|
22
|
-
experimentalDecorators: true,
|
|
23
|
-
emitDecoratorMetadata: true,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}).catch((e) => {
|
|
27
|
-
logger('Error loading ts file:', e);
|
|
28
|
-
throw e;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
console.error(e);
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { getTsImport };
|
|
38
|
-
//# sourceMappingURL=index.js.map
|