@seedprotocol/sdk 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/addModel.js +89 -0
  2. package/dist/addModel.js.map +1 -0
  3. package/dist/bin.js +71 -29
  4. package/dist/bin.js.map +1 -1
  5. package/dist/db/configs/browser.app.db.config.ts +1 -0
  6. package/dist/db/configs/node.app.db.config.ts +1 -0
  7. package/dist/main.js +1 -1
  8. package/dist/main.js.map +1 -1
  9. package/dist/node/codegen/templates/model.njk +14 -0
  10. package/dist/scripts/addModel.d.ts +3 -0
  11. package/dist/scripts/addModel.d.ts.map +1 -0
  12. package/dist/scripts/bin.d.ts.map +1 -1
  13. package/dist/src/db/configs/browser.app.db.config.d.ts.map +1 -1
  14. package/dist/src/db/configs/node.app.db.config.d.ts.map +1 -1
  15. package/dist/src/helpers/constants.d.ts +1 -0
  16. package/dist/src/helpers/constants.d.ts.map +1 -1
  17. package/dist/src/helpers/constants.js +2 -1
  18. package/dist/src/helpers/constants.js.map +1 -1
  19. package/dist/src/index.d.ts +1 -1
  20. package/dist/src/index.d.ts.map +1 -1
  21. package/dist/src/node/codegen/drizzle.d.ts +4 -1
  22. package/dist/src/node/codegen/drizzle.d.ts.map +1 -1
  23. package/dist/src/node/codegen/drizzle.js +37 -9
  24. package/dist/src/node/codegen/drizzle.js.map +1 -1
  25. package/dist/src/node/constants.d.ts.map +1 -1
  26. package/dist/src/node/constants.js +12 -4
  27. package/dist/src/node/constants.js.map +1 -1
  28. package/dist/src/node/helpers/index.d.ts.map +1 -1
  29. package/dist/src/node/helpers/index.js +19 -8
  30. package/dist/src/node/helpers/index.js.map +1 -1
  31. package/dist/src/node/webpack/index.d.ts.map +1 -1
  32. package/dist/src/node/webpack/index.js +7 -0
  33. package/dist/src/node/webpack/index.js.map +1 -1
  34. package/dist/src/schema/index.d.ts.map +1 -1
  35. package/dist/src/schema/model/index.d.ts +8 -8
  36. package/dist/src/schema/property/index.d.ts +58 -32
  37. package/dist/src/schema/property/index.d.ts.map +1 -1
  38. package/dist/src/schema/property/index.js +13 -6
  39. package/dist/src/schema/property/index.js.map +1 -1
  40. package/package.json +3 -2
@@ -1,20 +1,28 @@
1
1
  import path from 'path';
2
2
  import 'dotenv/config';
3
+ import process from 'node:process';
3
4
 
4
5
  const NODE_APP_DB_CONFIG = 'node.app.db.config.ts';
6
+ console.log('process.env.IS_SEED_DEV', process.env.IS_SEED_DEV);
5
7
  const currentDir = path.dirname(new URL(import.meta.url).pathname);
8
+ console.log('currentDir', currentDir);
6
9
  const parentToCheck = path.join(currentDir, '..');
7
- let rootWithNodeModules = path.join(currentDir, '..', '..', '..', '..');
8
- if (process.env.IS_SEED_DEV) {
10
+ console.log('parentToCheck', parentToCheck);
11
+ let rootWithNodeModules = path.join(currentDir, '..', '..');
12
+ if (process.env.IS_PORTAL) {
13
+ rootWithNodeModules = process.cwd();
14
+ }
15
+ if (process.env.IS_SEED_DEV || process.env.NODE_ENV === 'test') {
9
16
  rootWithNodeModules = path.join(parentToCheck, '..');
10
17
  }
18
+ console.log('rootWithNodeModules', rootWithNodeModules);
11
19
  let sdkRootDir = path.join(rootWithNodeModules, 'node_modules', '@seedprotocol', 'sdk', 'dist');
12
20
  if (process.env.IS_SEED_DEV) {
13
21
  sdkRootDir = path.join(rootWithNodeModules, 'src');
14
22
  }
15
23
  let dotSeedDir = path.join(rootWithNodeModules, '.seed');
16
- if (process.env.IS_SEED_DEV) {
17
- dotSeedDir = path.join(process.cwd(), '__tests__', '__mocks__', 'project', '.seed');
24
+ if (process.env.IS_SEED_DEV || process.env.NODE_ENV === 'test') {
25
+ dotSeedDir = path.join(process.cwd(), '__tests__', '__mocks__', 'node', 'project', '.seed');
18
26
  }
19
27
  const drizzleKitPath = path.join(rootWithNodeModules, 'node_modules', 'drizzle-kit', 'bin.cjs');
20
28
  // App file paths. These are the single source of truth for the SDK user's data model
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/node/constants.ts"],"sourcesContent":["import path from 'path'\nimport 'dotenv/config'\n\nexport const NODE_APP_DB_CONFIG = 'node.app.db.config.ts'\n\nconst currentDir = path.dirname(new URL(import.meta.url).pathname)\n\nconst parentToCheck = path.join(currentDir, '..')\n\nlet rootWithNodeModules = path.join(currentDir, '..', '..', '..', '..')\n\nif (process.env.IS_SEED_DEV) {\n rootWithNodeModules = path.join(parentToCheck, '..')\n}\n\nlet sdkRootDir = path.join(\n rootWithNodeModules,\n 'node_modules',\n '@seedprotocol',\n 'sdk',\n 'dist',\n)\n\nif (process.env.IS_SEED_DEV) {\n sdkRootDir = path.join(rootWithNodeModules, 'src')\n}\n\nlet dotSeedDir = path.join(rootWithNodeModules, '.seed')\n\nif (process.env.IS_SEED_DEV) {\n dotSeedDir = path.join(\n process.cwd(),\n '__tests__',\n '__mocks__',\n 'project',\n '.seed',\n )\n}\n\nexport const drizzleKitPath = path.join(\n rootWithNodeModules,\n 'node_modules',\n 'drizzle-kit',\n 'bin.cjs',\n)\n\n// App file paths. These are the single source of truth for the SDK user's data model\nexport const appSchemaDir = path.join(dotSeedDir, 'schema')\nexport const appDbDir = path.join(dotSeedDir, 'db')\nexport const appMetaDir = path.join(appDbDir, 'meta')\nexport const appGeneratedSchemaDir = path.join(dotSeedDir, 'schema')\n\nexport const drizzleDbConfigPath = path.join(\n sdkRootDir,\n 'node',\n 'db',\n NODE_APP_DB_CONFIG,\n)\n\nexport const templatePath = path.join(\n sdkRootDir,\n 'node',\n 'codegen',\n 'templates',\n)\n\nexport { rootWithNodeModules, sdkRootDir, dotSeedDir }\n"],"names":[],"mappings":";;;AAGO,MAAM,kBAAkB,GAAG;AAElC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;AAElE,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC;AAEjD,IAAI,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;AAEtE,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;IAC3B,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC;AACtD;AAEA,IAAI,UAAU,GAAG,IAAI,CAAC,IAAI,CACxB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,KAAK,EACL,MAAM;AAGR,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;IAC3B,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC;AACpD;AAEI,IAAA,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO;AAEvD,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;AAC3B,IAAA,UAAU,GAAG,IAAI,CAAC,IAAI,CACpB,OAAO,CAAC,GAAG,EAAE,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,OAAO,CACR;AACH;AAEa,MAAA,cAAc,GAAG,IAAI,CAAC,IAAI,CACrC,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,SAAS;AAGX;AACO,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ;AACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI;AAC3C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM;AAC7C,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ;AAEtD,MAAA,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAC1C,UAAU,EACV,MAAM,EACN,IAAI,EACJ,kBAAkB;AAGP,MAAA,YAAY,GAAG,IAAI,CAAC,IAAI,CACnC,UAAU,EACV,MAAM,EACN,SAAS,EACT,WAAW;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/node/constants.ts"],"sourcesContent":["import path from 'path'\nimport 'dotenv/config'\nimport process from 'node:process'\n\nexport const NODE_APP_DB_CONFIG = 'node.app.db.config.ts'\n\nconsole.log('process.env.IS_SEED_DEV', process.env.IS_SEED_DEV)\n\nconst currentDir = path.dirname(new URL(import.meta.url).pathname)\n\nconsole.log('currentDir', currentDir)\n\nconst parentToCheck = path.join(currentDir, '..',)\n\nconsole.log('parentToCheck', parentToCheck)\n\nlet rootWithNodeModules = path.join(currentDir, '..', '..',)\n\nif (process.env.IS_PORTAL) {\n rootWithNodeModules = process.cwd()\n}\n\nif (process.env.IS_SEED_DEV || process.env.NODE_ENV === 'test') {\n rootWithNodeModules = path.join(parentToCheck, '..',)\n}\n\nconsole.log('rootWithNodeModules', rootWithNodeModules)\n\nlet sdkRootDir = path.join(\n rootWithNodeModules,\n 'node_modules',\n '@seedprotocol',\n 'sdk',\n 'dist',\n)\n\nif (process.env.IS_SEED_DEV) {\n sdkRootDir = path.join(rootWithNodeModules, 'src')\n}\n\nlet dotSeedDir = path.join(rootWithNodeModules, '.seed')\n\nif (process.env.IS_SEED_DEV || process.env.NODE_ENV === 'test') {\n dotSeedDir = path.join(\n process.cwd(),\n '__tests__',\n '__mocks__',\n 'node',\n 'project',\n '.seed',\n )\n}\n\nexport const drizzleKitPath = path.join(\n rootWithNodeModules,\n 'node_modules',\n 'drizzle-kit',\n 'bin.cjs',\n)\n\n// App file paths. These are the single source of truth for the SDK user's data model\nexport const appSchemaDir = path.join(dotSeedDir, 'schema')\nexport const appDbDir = path.join(dotSeedDir, 'db')\nexport const appMetaDir = path.join(appDbDir, 'meta')\nexport const appGeneratedSchemaDir = path.join(dotSeedDir, 'schema')\n\nexport const drizzleDbConfigPath = path.join(\n sdkRootDir,\n 'node',\n 'db',\n NODE_APP_DB_CONFIG,\n)\n\nexport const templatePath = path.join(\n sdkRootDir,\n 'node',\n 'codegen',\n 'templates',\n)\n\nexport { rootWithNodeModules, sdkRootDir, dotSeedDir }\n"],"names":[],"mappings":";;;;AAIO,MAAM,kBAAkB,GAAG;AAElC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;AAElE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;AAErC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAE;AAElD,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC;AAE3C,IAAI,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI;AAE1D,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE;AACzB,IAAA,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;AACrC;AAEA,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE;IAC9D,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAE;AACvD;AAEA,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;AAEvD,IAAI,UAAU,GAAG,IAAI,CAAC,IAAI,CACxB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,KAAK,EACL,MAAM;AAGR,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;IAC3B,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC;AACpD;AAEI,IAAA,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO;AAEvD,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE;IAC9D,UAAU,GAAG,IAAI,CAAC,IAAI,CACpB,OAAO,CAAC,GAAG,EAAE,EACb,WAAW,EACX,WAAW,EACX,MAAM,EACN,SAAS,EACT,OAAO,CACR;AACH;AAEa,MAAA,cAAc,GAAG,IAAI,CAAC,IAAI,CACrC,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,SAAS;AAGX;AACO,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ;AACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI;AAC3C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM;AAC7C,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ;AAEtD,MAAA,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAC1C,UAAU,EACV,MAAM,EACN,IAAI,EACJ,kBAAkB;AAGP,MAAA,YAAY,GAAG,IAAI,CAAC,IAAI,CACnC,UAAU,EACV,MAAM,EACN,SAAS,EACT,WAAW;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/helpers/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,GAAU,CAAC,YAAY,MAAM,KAAG,OAAO,CAAC,CAAC,CAgBhE,CAAA;AAED,eAAO,MAAM,wBAAwB,QAC9B,MAAM,aACA,MAAM,kBAoBlB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/helpers/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,GAAU,CAAC,YAAY,MAAM,KAAG,OAAO,CAAC,CAAC,CA+BhE,CAAA;AAED,eAAO,MAAM,wBAAwB,QAC9B,MAAM,aACA,MAAM,kBAoBlB,CAAA"}
@@ -13,15 +13,26 @@ const getTsImport = async (filePath) => {
13
13
  logger(`Typescript file not found at ${filePath}`);
14
14
  throw new Error(`Typescript file not found at ${filePath}`);
15
15
  }
16
- return await tsImport.load(filePath, {
17
- mode: LoadMode.Compile,
18
- compileOptions: {
19
- compilerOptions: {
20
- experimentalDecorators: true,
21
- emitDecoratorMetadata: true,
16
+ console.log('filePath', filePath);
17
+ let result;
18
+ try {
19
+ result = await tsImport.load(filePath, {
20
+ mode: LoadMode.Compile,
21
+ compileOptions: {
22
+ compilerOptions: {
23
+ experimentalDecorators: true,
24
+ emitDecoratorMetadata: true,
25
+ },
22
26
  },
23
- },
24
- });
27
+ }).catch((e) => {
28
+ logger('Error loading ts file:', e);
29
+ throw e;
30
+ });
31
+ }
32
+ catch (e) {
33
+ console.error(e);
34
+ }
35
+ return result;
25
36
  };
26
37
 
27
38
  export { getTsImport };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/node/helpers/index.ts"],"sourcesContent":["import fs from 'fs'\nimport * as tsImport from 'ts-import'\nimport { LoadMode } from 'ts-import'\nimport path from 'path'\nimport { glob } from 'glob'\nimport { rimraf } from 'rimraf'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:helpers')\n\nexport const getTsImport = async <T>(filePath: string): Promise<T> => {\n // Check if the config file exists\n if (!fs.existsSync(filePath)) {\n logger(`Typescript file not found at ${filePath}`)\n throw new Error(`Typescript file not found at ${filePath}`)\n }\n\n return await tsImport.load(filePath, {\n mode: LoadMode.Compile,\n compileOptions: {\n compilerOptions: {\n experimentalDecorators: true,\n emitDecoratorMetadata: true,\n },\n },\n })\n}\n\nexport const deleteFilesWithExtension = async (\n dir: string,\n extension: string,\n) => {\n const pattern = path.join(dir, `**/*${extension}`)\n glob(pattern, (err, files) => {\n if (err) {\n logger('Error finding files:', err)\n return\n }\n\n for (const file of files) {\n // TODO: Change this whole thing to be async?\n rimraf(file, (err) => {\n if (err) {\n logger('Error deleting file:', err)\n } else {\n logger(`Deleted: ${file}`)\n }\n })\n }\n })\n}\n"],"names":[],"mappings":";;;;;;;;AAQA,MAAM,MAAM,GAAG,KAAK,CAAC,iBAAiB,CAAC;MAE1B,WAAW,GAAG,OAAU,QAAgB,KAAgB;;IAEnE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC5B,QAAA,MAAM,CAAC,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAE,CAAC;AAClD,QAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAA,CAAE,CAAC;;AAG7D,IAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE;QACnC,IAAI,EAAE,QAAQ,CAAC,OAAO;AACtB,QAAA,cAAc,EAAE;AACd,YAAA,eAAe,EAAE;AACf,gBAAA,sBAAsB,EAAE,IAAI;AAC5B,gBAAA,qBAAqB,EAAE,IAAI;AAC5B,aAAA;AACF,SAAA;AACF,KAAA,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/node/helpers/index.ts"],"sourcesContent":["import fs from 'fs'\nimport * as tsImport from 'ts-import'\nimport { LoadMode } from 'ts-import'\nimport path from 'path'\nimport { glob } from 'glob'\nimport { rimraf } from 'rimraf'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:helpers')\n\nexport const getTsImport = async <T>(filePath: string): Promise<T> => {\n // Check if the config file exists\n if (!fs.existsSync(filePath)) {\n logger(`Typescript file not found at ${filePath}`)\n throw new Error(`Typescript file not found at ${filePath}`)\n }\n\n console.log('filePath', filePath)\n\n let result\n\n try {\n result = await tsImport.load(filePath, {\n mode: LoadMode.Compile,\n compileOptions: {\n compilerOptions: {\n experimentalDecorators: true,\n emitDecoratorMetadata: true,\n },\n },\n }).catch((e) => {\n logger('Error loading ts file:', e)\n throw e\n })\n\n } catch ( e ) {\n console.error(e)\n }\n\n\n return result\n}\n\nexport const deleteFilesWithExtension = async (\n dir: string,\n extension: string,\n) => {\n const pattern = path.join(dir, `**/*${extension}`)\n glob(pattern, (err, files) => {\n if (err) {\n logger('Error finding files:', err)\n return\n }\n\n for (const file of files) {\n // TODO: Change this whole thing to be async?\n rimraf(file, (err) => {\n if (err) {\n logger('Error deleting file:', err)\n } else {\n logger(`Deleted: ${file}`)\n }\n })\n }\n })\n}\n"],"names":[],"mappings":";;;;;;;;AAQA,MAAM,MAAM,GAAG,KAAK,CAAC,iBAAiB,CAAC;MAE1B,WAAW,GAAG,OAAU,QAAgB,KAAgB;;IAEnE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC5B,QAAA,MAAM,CAAC,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAE,CAAC;AAClD,QAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAA,CAAE,CAAC;;AAG7D,IAAA,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC;AAEjC,IAAA,IAAI,MAAM;AAEV,IAAA,IAAI;AACF,QAAA,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE;YACrC,IAAI,EAAE,QAAQ,CAAC,OAAO;AACtB,YAAA,cAAc,EAAE;AACd,gBAAA,eAAe,EAAE;AACf,oBAAA,sBAAsB,EAAE,IAAI;AAC5B,oBAAA,qBAAqB,EAAE,IAAI;AAC5B,iBAAA;AACF,aAAA;AACF,SAAA,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAI;AACb,YAAA,MAAM,CAAC,wBAAwB,EAAE,CAAC,CAAC;AACnC,YAAA,MAAM,CAAC;AACT,SAAC,CAAC;;IAEF,OAAQ,CAAC,EAAG;AACZ,QAAA,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;;AAIlB,IAAA,OAAO,MAAM;AACf;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/webpack/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,WAAY,GAAG,WAAW,GAAG,YAAY,OAAO,QA6FpE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/webpack/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,WAAY,GAAG,WAAW,GAAG,YAAY,OAAO,QAsGpE,CAAA"}
@@ -9,6 +9,13 @@ const withSeed = (config, webpack, isServer) => {
9
9
  // include: [path.resolve(process.cwd(), 'schema.ts')],
10
10
  // use: 'ts-loader',
11
11
  // })
12
+ config.plugins.push(
13
+ // new webpack.DefinePlugin({
14
+ // __dirname: JSON.stringify(__dirname),
15
+ // }),
16
+ new webpack.NormalModuleReplacementPlugin(/node:/, (resource) => {
17
+ resource.request = resource.request.replace(/^node:/, '');
18
+ }));
12
19
  // config.externals.push({
13
20
  // 'fsevents': 'commonjs2 fsevents',
14
21
  // })
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/node/webpack/index.ts"],"sourcesContent":["// import path from \"path\";\n// import { fileURLToPath } from \"url\";\n\n// const __filename = fileURLToPath(import.meta.url);\n// const __dirname = path.dirname(__filename);\n\nexport const withSeed = (config: any, webpack: any, isServer: boolean) => {\n // If you need to include directories outside of the project root\n // config.module.rules.push({\n // test: /\\.ts$/,\n // include: [path.resolve(process.cwd(), 'schema.ts')],\n // use: 'ts-loader',\n // })\n\n // config.externals.push({\n // 'fsevents': 'commonjs2 fsevents',\n // })\n\n // console.log('__dirname:', __dirname)\n // console.log('process.cwd():', process.cwd())\n\n // console.log('crypto-browserify exists:', fs.existsSync(path.resolve(process.cwd(), './node_modules/crypto-browserify')))\n // console.log('path-browserify exists:', fs.existsSync(path.resolve(process.cwd(), './node_modules/path-browserify')))\n\n if (!isServer) {\n // config.plugins.push(\n // new webpack.NormalModuleReplacementPlugin(/node:/, (resource: any) => {\n // resource.request = resource.request.replace(/^node:/, '')\n // }),\n // )\n // config.plugins.push(\n // new webpack.NormalModuleReplacementPlugin(\n // /^(node:)?fs$/,\n // (resource: any) => {\n // resource.request = '@zenfs/core';\n // }\n // )\n // )\n\n // config.module.rules.push({\n // test: /\\.js$/,\n // exclude: '/node_modules/@seedprotocol/sdk/node', // Exclude the 'node-files' directory\n // use: {\n // loader: 'babel-loader',\n // options: {\n // presets: ['next/babel'],\n // },\n // },\n // });\n\n\n // config.resolve.alias['fs/promises'] = '@zenfs/core/promises';\n\n config.resolve.alias['fs'] = '@zenfs/core'\n config.resolve.alias['node:fs'] = '@zenfs/core'\n config.resolve.alias['node:path'] = 'path-browserify'\n config.resolve.alias['path'] = 'path-browserify'\n\n // config.resolve.alias['fs'] = path.resolve(\n // process.cwd(),\n // './node_modules/@zenfs/core',\n // )\n // config.resolve.alias['node:fs'] = path.resolve(\n // process.cwd(),\n // './node_modules/@zenfs/core',\n // )\n // config.resolve.alias['@schema'] = path.resolve(process.cwd(), 'schema.ts')\n // // config.resolve.alias['crypto'] = path.resolve(process.cwd(), './node_modules/crypto-browserify')\n // // config.resolve.alias['node:crypto'] = path.resolve(process.cwd(), './node_modules/crypto-browserify')\n // config.resolve.alias['node:path'] = path.resolve(\n // process.cwd(),\n // './node_modules/path-browserify',\n // )\n // config.resolve.alias['path'] = path.resolve(\n // process.cwd(),\n // './node_modules/path-browserify',\n // )\n }\n\n if (isServer) {\n config.externals.push('@sqlite.org/sqlite-wasm')\n config.externals.push('nunjucks')\n config.externals.push('chokidar')\n config.externals.push('arweave')\n }\n\n // config.module.rules.push({\n // test: /seed\\.config\\.mjs$/,\n // use: [\n // {\n // loader: 'babel-loader',\n // options: {\n // plugins: ['@babel/plugin-syntax-dynamic-import'],\n // },\n // },\n // ],\n // })\n\n return config\n}\n"],"names":[],"mappings":"AAAA;AACA;AAEA;AACA;AAEa,MAAA,QAAQ,GAAG,CAAC,MAAW,EAAE,OAAY,EAAE,QAAiB,KAAI;;;;;;;;;;;;;;IAkBvE,IAAI,CAAC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;QA6Bb,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,aAAa;QAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,aAAa;QAC/C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,iBAAiB;QACrD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,iBAAiB;;;;;;;;;;;;;;;;;;;;;IAuBlD,IAAI,QAAQ,EAAE;AACZ,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,yBAAyB,CAAC;AAChD,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;AACjC,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;AACjC,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;;;;;;;;;;;;;AAelC,IAAA,OAAO,MAAM;AACf;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/node/webpack/index.ts"],"sourcesContent":["// import path from \"path\";\n// import { fileURLToPath } from \"url\";\n\n// const __filename = fileURLToPath(import.meta.url);\n// const __dirname = path.dirname(__filename);\n\nexport const withSeed = (config: any, webpack: any, isServer: boolean) => {\n // If you need to include directories outside of the project root\n // config.module.rules.push({\n // test: /\\.ts$/,\n // include: [path.resolve(process.cwd(), 'schema.ts')],\n // use: 'ts-loader',\n // })\n\n config.plugins.push(\n // new webpack.DefinePlugin({\n // __dirname: JSON.stringify(__dirname),\n // }),\n new webpack.NormalModuleReplacementPlugin(/node:/, (resource) => {\n resource.request = resource.request.replace(/^node:/, '')\n }),\n )\n\n // config.externals.push({\n // 'fsevents': 'commonjs2 fsevents',\n // })\n\n // console.log('__dirname:', __dirname)\n // console.log('process.cwd():', process.cwd())\n\n // console.log('crypto-browserify exists:', fs.existsSync(path.resolve(process.cwd(), './node_modules/crypto-browserify')))\n // console.log('path-browserify exists:', fs.existsSync(path.resolve(process.cwd(), './node_modules/path-browserify')))\n\n if (!isServer) {\n // config.plugins.push(\n // new webpack.NormalModuleReplacementPlugin(/node:/, (resource: any) => {\n // resource.request = resource.request.replace(/^node:/, '')\n // }),\n // )\n // config.plugins.push(\n // new webpack.NormalModuleReplacementPlugin(\n // /^(node:)?fs$/,\n // (resource: any) => {\n // resource.request = '@zenfs/core';\n // }\n // )\n // )\n\n // config.module.rules.push({\n // test: /\\.js$/,\n // exclude: '/node_modules/@seedprotocol/sdk/node', // Exclude the 'node-files' directory\n // use: {\n // loader: 'babel-loader',\n // options: {\n // presets: ['next/babel'],\n // },\n // },\n // });\n\n\n // config.resolve.alias['fs/promises'] = '@zenfs/core/promises';\n\n config.resolve.alias['fs'] = '@zenfs/core'\n config.resolve.alias['node:fs'] = '@zenfs/core'\n config.resolve.alias['node:path'] = 'path-browserify'\n config.resolve.alias['path'] = 'path-browserify'\n\n // config.resolve.alias['fs'] = path.resolve(\n // process.cwd(),\n // './node_modules/@zenfs/core',\n // )\n // config.resolve.alias['node:fs'] = path.resolve(\n // process.cwd(),\n // './node_modules/@zenfs/core',\n // )\n // config.resolve.alias['@schema'] = path.resolve(process.cwd(), 'schema.ts')\n // // config.resolve.alias['crypto'] = path.resolve(process.cwd(), './node_modules/crypto-browserify')\n // // config.resolve.alias['node:crypto'] = path.resolve(process.cwd(), './node_modules/crypto-browserify')\n // config.resolve.alias['node:path'] = path.resolve(\n // process.cwd(),\n // './node_modules/path-browserify',\n // )\n // config.resolve.alias['path'] = path.resolve(\n // process.cwd(),\n // './node_modules/path-browserify',\n // )\n }\n\n if (isServer) {\n config.externals.push('@sqlite.org/sqlite-wasm')\n config.externals.push('nunjucks')\n config.externals.push('chokidar')\n config.externals.push('arweave')\n }\n\n // config.module.rules.push({\n // test: /seed\\.config\\.mjs$/,\n // use: [\n // {\n // loader: 'babel-loader',\n // options: {\n // plugins: ['@babel/plugin-syntax-dynamic-import'],\n // },\n // },\n // ],\n // })\n\n return config\n}\n"],"names":[],"mappings":"AAAA;AACA;AAEA;AACA;AAEa,MAAA,QAAQ,GAAG,CAAC,MAAW,EAAE,OAAY,EAAE,QAAiB,KAAI;;;;;;;IAQvE,MAAM,CAAC,OAAO,CAAC,IAAI;;;;IAIjB,IAAI,OAAO,CAAC,6BAA6B,CAAC,OAAO,EAAE,CAAC,QAAQ,KAAI;AAC9D,QAAA,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;KAC1D,CAAC,CACH;;;;;;;;IAYD,IAAI,CAAC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;QA6Bb,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,aAAa;QAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,aAAa;QAC/C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,iBAAiB;QACrD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,iBAAiB;;;;;;;;;;;;;;;;;;;;;IAuBlD,IAAI,QAAQ,EAAE;AACZ,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,yBAAyB,CAAC;AAChD,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;AACjC,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;AACjC,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;;;;;;;;;;;;;AAelC,IAAA,OAAO,MAAM;AACf;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAGzB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
@@ -4,11 +4,11 @@ export declare const TModelValues: import("@sinclair/typebox").TRecord<import("@
4
4
  export declare const TModelSchema: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
5
5
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
6
6
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
7
- dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>;
7
+ dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>;
8
8
  ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
9
  modelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
10
10
  refModelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
11
- refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>>;
11
+ refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>>;
12
12
  storageType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ItemStorage">, import("@sinclair/typebox").TLiteral<"PropertyStorage">]>>;
13
13
  localStorageDir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
14
14
  filenameSuffix: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -17,11 +17,11 @@ export declare const TModelClass: import("@sinclair/typebox").TObject<{
17
17
  schema: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
18
18
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
19
19
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
- dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>;
20
+ dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>;
21
21
  ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
22
22
  modelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
23
23
  refModelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
24
- refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>>;
24
+ refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>>;
25
25
  storageType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ItemStorage">, import("@sinclair/typebox").TLiteral<"PropertyStorage">]>>;
26
26
  localStorageDir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
27
  filenameSuffix: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -31,11 +31,11 @@ export declare const TModelClass: import("@sinclair/typebox").TObject<{
31
31
  export declare const TModelConstructor: import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
32
32
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
33
33
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
34
- dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>;
34
+ dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>;
35
35
  ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
36
36
  modelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
37
37
  refModelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
38
- refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>>;
38
+ refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>>;
39
39
  storageType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ItemStorage">, import("@sinclair/typebox").TLiteral<"PropertyStorage">]>>;
40
40
  localStorageDir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
41
41
  filenameSuffix: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -43,11 +43,11 @@ export declare const TModelConstructor: import("@sinclair/typebox").TFunction<[i
43
43
  schema: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
44
44
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
45
45
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
46
- dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>;
46
+ dataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>;
47
47
  ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
48
48
  modelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
49
49
  refModelId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
50
- refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>>;
50
+ refValueType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"Image">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"File">, import("@sinclair/typebox").TLiteral<"Boolean">, import("@sinclair/typebox").TLiteral<"Date">]>>;
51
51
  storageType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ItemStorage">, import("@sinclair/typebox").TLiteral<"PropertyStorage">]>>;
52
52
  localStorageDir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
53
53
  filenameSuffix: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;