@tailor-platform/sdk 1.32.0 → 1.32.1

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 (84) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/application-Cwt_ifTT.mjs +12 -0
  3. package/dist/{application-B8vok3w2.mjs → application-p2GujXmg.mjs} +10 -9
  4. package/dist/{application-B8vok3w2.mjs.map → application-p2GujXmg.mjs.map} +1 -1
  5. package/dist/{brand-GZnI4eYb.mjs → brand-0SscafcY.mjs} +2 -1
  6. package/dist/{brand-GZnI4eYb.mjs.map → brand-0SscafcY.mjs.map} +1 -1
  7. package/dist/{chunk-DEt8GZDa.mjs → chunk-COzJYswC.mjs} +1 -0
  8. package/dist/cli/index.d.mts +1 -0
  9. package/dist/cli/index.mjs +27 -26
  10. package/dist/cli/index.mjs.map +1 -1
  11. package/dist/cli/lib.d.mts +7 -6
  12. package/dist/cli/lib.mjs +14 -13
  13. package/dist/cli/lib.mjs.map +1 -1
  14. package/dist/cli/skills.d.mts +1 -0
  15. package/dist/cli/skills.mjs +2 -1
  16. package/dist/cli/skills.mjs.map +1 -1
  17. package/dist/{client-DfdgRZlQ.mjs → client-D5P1myz0.mjs} +6 -5
  18. package/dist/{client-DfdgRZlQ.mjs.map → client-D5P1myz0.mjs.map} +1 -1
  19. package/dist/{client-B0wrLUVK.mjs → client-gpRgZl1b.mjs} +5 -4
  20. package/dist/configure/index.d.mts +5 -4
  21. package/dist/configure/index.mjs +5 -4
  22. package/dist/configure/index.mjs.map +1 -1
  23. package/dist/crash-report-Cm9vFmTN.mjs +7 -0
  24. package/dist/{crash-report-wNxS0IUJ.mjs → crash-report-DnwITWeV.mjs} +5 -4
  25. package/dist/{crash-report-wNxS0IUJ.mjs.map → crash-report-DnwITWeV.mjs.map} +1 -1
  26. package/dist/{enum-constants-D1nfn0qD.mjs → enum-constants-CkKARYb7.mjs} +2 -1
  27. package/dist/{enum-constants-D1nfn0qD.mjs.map → enum-constants-CkKARYb7.mjs.map} +1 -1
  28. package/dist/{env-BgdHfWDn.d.mts → env-BZLTIlIo.d.mts} +3 -2
  29. package/dist/{file-utils-Bctuzn3x.mjs → file-utils-D2TxR_kj.mjs} +2 -1
  30. package/dist/{file-utils-Bctuzn3x.mjs.map → file-utils-D2TxR_kj.mjs.map} +1 -1
  31. package/dist/{index-D4Y81vh1.d.mts → index-BQKAzTPA.d.mts} +3 -2
  32. package/dist/{index-BAud4CE7.d.mts → index-BYk_9R3S.d.mts} +16 -15
  33. package/dist/{index-CxgBnxKM.d.mts → index-CgMytw2A.d.mts} +3 -2
  34. package/dist/{index-CdDzh-T2.d.mts → index-CoReoodF.d.mts} +3 -2
  35. package/dist/{index-FZMBoUWm.d.mts → index-vVGamLOw.d.mts} +3 -2
  36. package/dist/{interceptor-DgQNmwWJ.mjs → interceptor-1LL1gBsF.mjs} +3 -2
  37. package/dist/{interceptor-DgQNmwWJ.mjs.map → interceptor-1LL1gBsF.mjs.map} +1 -1
  38. package/dist/{job-DdfW7vH3.mjs → job-CPKYCk_e.mjs} +3 -2
  39. package/dist/{job-DdfW7vH3.mjs.map → job-CPKYCk_e.mjs.map} +1 -1
  40. package/dist/kysely/index.d.mts +1 -0
  41. package/dist/kysely/index.mjs +2 -1
  42. package/dist/kysely/index.mjs.map +1 -1
  43. package/dist/{kysely-type-B_IecdK9.mjs → kysely-type-BK0b4Rqt.mjs} +2 -1
  44. package/dist/{kysely-type-B_IecdK9.mjs.map → kysely-type-BK0b4Rqt.mjs.map} +1 -1
  45. package/dist/{logger-CqezTedh.mjs → logger-qz-Y4sBV.mjs} +2 -1
  46. package/dist/{logger-CqezTedh.mjs.map → logger-qz-Y4sBV.mjs.map} +1 -1
  47. package/dist/package-json-88x7bPKC.mjs +5 -0
  48. package/dist/{package-json-D3x2nBPB.mjs → package-json-VqyFvGiP.mjs} +2 -1
  49. package/dist/{package-json-D3x2nBPB.mjs.map → package-json-VqyFvGiP.mjs.map} +1 -1
  50. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -1
  51. package/dist/plugin/builtin/enum-constants/index.mjs +3 -2
  52. package/dist/plugin/builtin/file-utils/index.d.mts +2 -1
  53. package/dist/plugin/builtin/file-utils/index.mjs +3 -2
  54. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -1
  55. package/dist/plugin/builtin/kysely-type/index.mjs +3 -2
  56. package/dist/plugin/builtin/seed/index.d.mts +2 -1
  57. package/dist/plugin/builtin/seed/index.mjs +3 -2
  58. package/dist/plugin/index.d.mts +3 -2
  59. package/dist/plugin/index.mjs +2 -1
  60. package/dist/plugin/index.mjs.map +1 -1
  61. package/dist/{plugin-DyVYXZWz.d.mts → plugin-IIDZW9GG.d.mts} +2 -1
  62. package/dist/{runtime-DbX_UxlC.mjs → runtime-7DOyTTxR.mjs} +23 -23
  63. package/dist/runtime-7DOyTTxR.mjs.map +1 -0
  64. package/dist/{schema-CNWt2FKQ.mjs → schema-BITbkmq3.mjs} +3 -2
  65. package/dist/{schema-CNWt2FKQ.mjs.map → schema-BITbkmq3.mjs.map} +1 -1
  66. package/dist/seed/index.d.mts +1 -0
  67. package/dist/seed/index.mjs +2 -1
  68. package/dist/seed/index.mjs.map +1 -1
  69. package/dist/{seed-CWkIDWMb.mjs → seed-BXrSEJbv.mjs} +2 -1
  70. package/dist/{seed-CWkIDWMb.mjs.map → seed-BXrSEJbv.mjs.map} +1 -1
  71. package/dist/{telemetry-BSUlYTs-.mjs → telemetry-B4sp-dD2.mjs} +3 -2
  72. package/dist/{telemetry-BSUlYTs-.mjs.map → telemetry-B4sp-dD2.mjs.map} +1 -1
  73. package/dist/telemetry-DXIGGa6A.mjs +5 -0
  74. package/dist/utils/test/index.d.mts +3 -2
  75. package/dist/utils/test/index.mjs +4 -3
  76. package/dist/utils/test/index.mjs.map +1 -1
  77. package/dist/{workflow.generated-DMQ-cjyT.d.mts → workflow.generated-C2A5Ye0m.d.mts} +3 -2
  78. package/docs/generator/builtin.md +0 -8
  79. package/package.json +11 -10
  80. package/dist/application-DHifc-oA.mjs +0 -11
  81. package/dist/crash-report-BMEhRxeg.mjs +0 -6
  82. package/dist/package-json-DiZWrkIA.mjs +0 -4
  83. package/dist/runtime-DbX_UxlC.mjs.map +0 -1
  84. package/dist/telemetry-BtN2l0f1.mjs +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"file-utils-Bctuzn3x.mjs","names":[],"sources":["../src/plugin/builtin/file-utils/generate-file-utils.ts","../src/plugin/builtin/file-utils/process-file-type.ts","../src/plugin/builtin/file-utils/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport type { FileUtilMetadata } from \"./types\";\n\n/**\n * Generate unified file utility functions from collected metadata.\n * @param namespaceData - Namespace data with file utility metadata\n * @returns Generated file utility code\n */\nexport function generateUnifiedFileUtils(\n namespaceData: { namespace: string; types: FileUtilMetadata[] }[],\n): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Collect all types with their namespace\n const typeNamespaceMap = new Map<string, string>();\n const typeFieldsMap = new Map<string, string[]>();\n\n for (const { namespace, types } of namespaceData) {\n for (const type of types) {\n typeNamespaceMap.set(type.name, namespace);\n typeFieldsMap.set(type.name, type.fileFields);\n }\n }\n\n if (typeNamespaceMap.size === 0) {\n return \"\";\n }\n\n // Generate interface fields\n const interfaceFields = Array.from(typeFieldsMap.entries())\n .map(([typeName, fields]) => {\n const fieldNamesUnion = fields.map((field) => `\"${field}\"`).join(\" | \");\n return ` ${typeName}: {\\n fields: ${fieldNamesUnion};\\n };`;\n })\n .join(\"\\n\");\n\n const interfaceDefinition =\n multiline /* ts */ `\n export interface TypeWithFiles {\n ${interfaceFields}\n }\n ` + \"\\n\";\n\n // Generate namespaces object\n const namespaceEntries = Array.from(typeNamespaceMap.entries())\n .map(([typeName, namespace]) => ` ${typeName}: \"${namespace}\"`)\n .join(\",\\n\");\n\n const namespacesDefinition =\n multiline /* ts */ `\n const namespaces: Record<keyof TypeWithFiles, string> = {\n ${namespaceEntries},\n };\n ` + \"\\n\";\n\n // Generate downloadFile helper function\n const downloadFunction =\n multiline /* ts */ `\n export async function downloadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ) {\n return await tailordb.file.download(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate uploadFile helper function\n const uploadFunction =\n multiline /* ts */ `\n export async function uploadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n data: string | ArrayBuffer | Uint8Array<ArrayBufferLike> | number[],\n options?: FileUploadOptions,\n ): Promise<FileUploadResponse> {\n return await tailordb.file.upload(namespaces[type], type, field, recordId, data, options);\n }\n ` + \"\\n\";\n\n // Generate deleteFile helper function\n const deleteFunction =\n multiline /* ts */ `\n export async function deleteFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<void> {\n return await tailordb.file.delete(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate getFileMetadata helper function\n const getMetadataFunction =\n multiline /* ts */ `\n export async function getFileMetadata<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileMetadata> {\n return await tailordb.file.getMetadata(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate openFileDownloadStream helper function\n const openDownloadStreamFunction =\n multiline /* ts */ `\n export async function openFileDownloadStream<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileStreamIterator> {\n return await tailordb.file.openDownloadStream(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n return [\n interfaceDefinition,\n namespacesDefinition,\n downloadFunction,\n uploadFunction,\n deleteFunction,\n getMetadataFunction,\n openDownloadStreamFunction,\n ].join(\"\\n\");\n}\n","import type { FileUtilMetadata } from \"./types\";\nimport type { TailorDBType } from \"@/types/tailordb\";\n\n/**\n * Process a TailorDB type and extract file field metadata.\n * @param type - The parsed TailorDB type to process\n * @returns File utility metadata for the type\n */\nexport async function processFileType(type: TailorDBType): Promise<FileUtilMetadata> {\n const fileFields: string[] = [];\n\n if (type.files) {\n for (const fileFieldName of Object.keys(type.files)) {\n fileFields.push(fileFieldName);\n }\n }\n\n return {\n name: type.name,\n fileFields,\n };\n}\n","import { generateUnifiedFileUtils } from \"./generate-file-utils\";\nimport { processFileType } from \"./process-file-type\";\nimport type { FileUtilMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const FileUtilsGeneratorID = \"@tailor-platform/file-utils\";\n\ntype FileUtilsPluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates TypeWithFiles interface from TailorDB type definitions.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated file utilities\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function fileUtilsPlugin(\n options: FileUtilsPluginOptions,\n): Plugin<unknown, FileUtilsPluginOptions> {\n return {\n id: FileUtilsGeneratorID,\n description: \"Generates TypeWithFiles interface from TailorDB type definitions\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<FileUtilsPluginOptions>,\n ): Promise<GeneratorResult> {\n const namespaceData: { namespace: string; types: FileUtilMetadata[] }[] = [];\n\n for (const ns of ctx.tailordb) {\n const typesWithFiles: FileUtilMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processFileType(type);\n if (metadata.fileFields.length > 0) {\n typesWithFiles.push(metadata);\n }\n }\n\n if (typesWithFiles.length > 0) {\n namespaceData.push({\n namespace: ns.namespace,\n types: typesWithFiles,\n });\n }\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (namespaceData.length > 0) {\n const content = generateUnifiedFileUtils(namespaceData);\n if (content) {\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n }\n\n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1B,MAAM,gBAAoE,EAAE;AAE5E,QAAK,MAAM,MAAM,IAAI,UAAU;IAC7B,MAAM,iBAAqC,EAAE;AAE7C,SAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;KAC1C,MAAM,WAAW,MAAM,gBAAgB,KAAK;AAC5C,SAAI,SAAS,WAAW,SAAS,EAC/B,gBAAe,KAAK,SAAS;;AAIjC,QAAI,eAAe,SAAS,EAC1B,eAAc,KAAK;KACjB,WAAW,GAAG;KACd,OAAO;KACR,CAAC;;GAIN,MAAM,QAAkC,EAAE;AAC1C,OAAI,cAAc,SAAS,GAAG;IAC5B,MAAM,UAAU,yBAAyB,cAAc;AACvD,QAAI,QACF,OAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAIN,UAAO,EAAE,OAAO;;EAEnB"}
1
+ {"version":3,"file":"file-utils-D2TxR_kj.mjs","names":[],"sources":["../src/plugin/builtin/file-utils/generate-file-utils.ts","../src/plugin/builtin/file-utils/process-file-type.ts","../src/plugin/builtin/file-utils/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport type { FileUtilMetadata } from \"./types\";\n\n/**\n * Generate unified file utility functions from collected metadata.\n * @param namespaceData - Namespace data with file utility metadata\n * @returns Generated file utility code\n */\nexport function generateUnifiedFileUtils(\n namespaceData: { namespace: string; types: FileUtilMetadata[] }[],\n): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Collect all types with their namespace\n const typeNamespaceMap = new Map<string, string>();\n const typeFieldsMap = new Map<string, string[]>();\n\n for (const { namespace, types } of namespaceData) {\n for (const type of types) {\n typeNamespaceMap.set(type.name, namespace);\n typeFieldsMap.set(type.name, type.fileFields);\n }\n }\n\n if (typeNamespaceMap.size === 0) {\n return \"\";\n }\n\n // Generate interface fields\n const interfaceFields = Array.from(typeFieldsMap.entries())\n .map(([typeName, fields]) => {\n const fieldNamesUnion = fields.map((field) => `\"${field}\"`).join(\" | \");\n return ` ${typeName}: {\\n fields: ${fieldNamesUnion};\\n };`;\n })\n .join(\"\\n\");\n\n const interfaceDefinition =\n multiline /* ts */ `\n export interface TypeWithFiles {\n ${interfaceFields}\n }\n ` + \"\\n\";\n\n // Generate namespaces object\n const namespaceEntries = Array.from(typeNamespaceMap.entries())\n .map(([typeName, namespace]) => ` ${typeName}: \"${namespace}\"`)\n .join(\",\\n\");\n\n const namespacesDefinition =\n multiline /* ts */ `\n const namespaces: Record<keyof TypeWithFiles, string> = {\n ${namespaceEntries},\n };\n ` + \"\\n\";\n\n // Generate downloadFile helper function\n const downloadFunction =\n multiline /* ts */ `\n export async function downloadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ) {\n return await tailordb.file.download(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate uploadFile helper function\n const uploadFunction =\n multiline /* ts */ `\n export async function uploadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n data: string | ArrayBuffer | Uint8Array<ArrayBufferLike> | number[],\n options?: FileUploadOptions,\n ): Promise<FileUploadResponse> {\n return await tailordb.file.upload(namespaces[type], type, field, recordId, data, options);\n }\n ` + \"\\n\";\n\n // Generate deleteFile helper function\n const deleteFunction =\n multiline /* ts */ `\n export async function deleteFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<void> {\n return await tailordb.file.delete(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate getFileMetadata helper function\n const getMetadataFunction =\n multiline /* ts */ `\n export async function getFileMetadata<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileMetadata> {\n return await tailordb.file.getMetadata(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate openFileDownloadStream helper function\n const openDownloadStreamFunction =\n multiline /* ts */ `\n export async function openFileDownloadStream<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileStreamIterator> {\n return await tailordb.file.openDownloadStream(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n return [\n interfaceDefinition,\n namespacesDefinition,\n downloadFunction,\n uploadFunction,\n deleteFunction,\n getMetadataFunction,\n openDownloadStreamFunction,\n ].join(\"\\n\");\n}\n","import type { FileUtilMetadata } from \"./types\";\nimport type { TailorDBType } from \"@/types/tailordb\";\n\n/**\n * Process a TailorDB type and extract file field metadata.\n * @param type - The parsed TailorDB type to process\n * @returns File utility metadata for the type\n */\nexport async function processFileType(type: TailorDBType): Promise<FileUtilMetadata> {\n const fileFields: string[] = [];\n\n if (type.files) {\n for (const fileFieldName of Object.keys(type.files)) {\n fileFields.push(fileFieldName);\n }\n }\n\n return {\n name: type.name,\n fileFields,\n };\n}\n","import { generateUnifiedFileUtils } from \"./generate-file-utils\";\nimport { processFileType } from \"./process-file-type\";\nimport type { FileUtilMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const FileUtilsGeneratorID = \"@tailor-platform/file-utils\";\n\ntype FileUtilsPluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates TypeWithFiles interface from TailorDB type definitions.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated file utilities\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function fileUtilsPlugin(\n options: FileUtilsPluginOptions,\n): Plugin<unknown, FileUtilsPluginOptions> {\n return {\n id: FileUtilsGeneratorID,\n description: \"Generates TypeWithFiles interface from TailorDB type definitions\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<FileUtilsPluginOptions>,\n ): Promise<GeneratorResult> {\n const namespaceData: { namespace: string; types: FileUtilMetadata[] }[] = [];\n\n for (const ns of ctx.tailordb) {\n const typesWithFiles: FileUtilMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processFileType(type);\n if (metadata.fileFields.length > 0) {\n typesWithFiles.push(metadata);\n }\n }\n\n if (typesWithFiles.length > 0) {\n namespaceData.push({\n namespace: ns.namespace,\n types: typesWithFiles,\n });\n }\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (namespaceData.length > 0) {\n const content = generateUnifiedFileUtils(namespaceData);\n if (content) {\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,yBACd,eACQ;AACR,KAAI,cAAc,WAAW,EAC3B,QAAO;CAIT,MAAM,mCAAmB,IAAI,KAAqB;CAClD,MAAM,gCAAgB,IAAI,KAAuB;AAEjD,MAAK,MAAM,EAAE,WAAW,WAAW,cACjC,MAAK,MAAM,QAAQ,OAAO;AACxB,mBAAiB,IAAI,KAAK,MAAM,UAAU;AAC1C,gBAAc,IAAI,KAAK,MAAM,KAAK,WAAW;;AAIjD,KAAI,iBAAiB,SAAS,EAC5B,QAAO;AA4FT,QAAO;EAhFL,EAAmB;;QARG,MAAM,KAAK,cAAc,SAAS,CAAC,CACxD,KAAK,CAAC,UAAU,YAAY;AAE3B,UAAO,KAAK,SAAS,mBADG,OAAO,KAAK,UAAU,IAAI,MAAM,GAAG,CAAC,KAAK,MAAM,CACf;IACxD,CACD,KAAK,KAAK,CAKS;;QAEhB;EAQJ,EAAmB;;QALI,MAAM,KAAK,iBAAiB,SAAS,CAAC,CAC5D,KAAK,CAAC,UAAU,eAAe,KAAK,SAAS,KAAK,UAAU,GAAG,CAC/D,KAAK,MAAM,CAKS;;QAEjB;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;;;QAUf;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;QAQf;EAUL,CAAC,KAAK,KAAK;;;;;;;;;;ACvHd,eAAsB,gBAAgB,MAA+C;CACnF,MAAM,aAAuB,EAAE;AAE/B,KAAI,KAAK,MACP,MAAK,MAAM,iBAAiB,OAAO,KAAK,KAAK,MAAM,CACjD,YAAW,KAAK,cAAc;AAIlC,QAAO;EACL,MAAM,KAAK;EACX;EACD;;;;;ACdH,MAAa,uBAAuB;;;;;;;AAYpC,SAAgB,gBACd,SACyC;AACzC,QAAO;EACL,IAAI;EACJ,aAAa;EACb,cAAc;EAEd,MAAM,gBACJ,KAC0B;GAC1B,MAAM,gBAAoE,EAAE;AAE5E,QAAK,MAAM,MAAM,IAAI,UAAU;IAC7B,MAAM,iBAAqC,EAAE;AAE7C,SAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;KAC1C,MAAM,WAAW,MAAM,gBAAgB,KAAK;AAC5C,SAAI,SAAS,WAAW,SAAS,EAC/B,gBAAe,KAAK,SAAS;;AAIjC,QAAI,eAAe,SAAS,EAC1B,eAAc,KAAK;KACjB,WAAW,GAAG;KACd,OAAO;KACR,CAAC;;GAIN,MAAM,QAAkC,EAAE;AAC1C,OAAI,cAAc,SAAS,GAAG;IAC5B,MAAM,UAAU,yBAAyB,cAAc;AACvD,QAAI,QACF,OAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAIN,UAAO,EAAE,OAAO;;EAEnB"}
@@ -1,4 +1,5 @@
1
- import { n as Plugin } from "./plugin-DyVYXZWz.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
3
 
3
4
  //#region src/plugin/builtin/file-utils/index.d.ts
4
5
  declare const FileUtilsGeneratorID = "@tailor-platform/file-utils";
@@ -14,4 +15,4 @@ type FileUtilsPluginOptions = {
14
15
  declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
15
16
  //#endregion
16
17
  export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
17
- //# sourceMappingURL=index-D4Y81vh1.d.mts.map
18
+ //# sourceMappingURL=index-BQKAzTPA.d.mts.map
@@ -1,6 +1,7 @@
1
- import { $ as FieldOutput, A as DefinedAuth, Ct as IncomingWebhookTrigger$1, Dt as WebhookOperation$1, Et as ScheduleTriggerInput, F as UserAttributeMap, H as TailorDBType, O as AuthServiceInput, Ot as WorkflowOperation$1, P as UserAttributeListKey, Q as FieldOptions, St as IdpUserTrigger$1, Tt as ResolverExecutedTrigger$1, V as TailorDBInstance, X as DefinedFieldMetadata, Y as ArrayFieldOutput, Z as FieldMetadata, _t as AuthAccessTokenTrigger$1, at as output$1, bt as FunctionOperation$1, et as TailorFieldType, ft as AllowedValues, gt as GeneratorConfig, ht as ResolverInput, it as JsonCompatible, kt as AuthInvoker$1, mt as Resolver, n as Plugin, nt as TailorField, pt as AllowedValuesOutput, rt as InferFieldsOutput, tt as TailorAnyField, ut as TailorUser, wt as RecordTrigger$1, xt as GqlOperation$1, yt as ExecutorInput } from "./plugin-DyVYXZWz.mjs";
2
- import { n as TailorEnv, r as TailorActor } from "./env-BgdHfWDn.mjs";
3
- import { g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy, y as IdPInput } from "./workflow.generated-DMQ-cjyT.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { $ as FieldOutput, A as DefinedAuth, Ct as IncomingWebhookTrigger$1, Dt as WebhookOperation$1, Et as ScheduleTriggerInput, F as UserAttributeMap, H as TailorDBType, O as AuthServiceInput, Ot as WorkflowOperation$1, P as UserAttributeListKey, Q as FieldOptions, St as IdpUserTrigger$1, Tt as ResolverExecutedTrigger$1, V as TailorDBInstance, X as DefinedFieldMetadata, Y as ArrayFieldOutput, Z as FieldMetadata, _t as AuthAccessTokenTrigger$1, at as output$1, bt as FunctionOperation$1, et as TailorFieldType, ft as AllowedValues, gt as GeneratorConfig, ht as ResolverInput, it as JsonCompatible, kt as AuthInvoker$1, mt as Resolver, n as Plugin, nt as TailorField, pt as AllowedValuesOutput, rt as InferFieldsOutput, tt as TailorAnyField, ut as TailorUser, wt as RecordTrigger$1, xt as GqlOperation$1, yt as ExecutorInput } from "./plugin-IIDZW9GG.mjs";
3
+ import { n as TailorEnv, r as TailorActor } from "./env-BZLTIlIo.mjs";
4
+ import { g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy, y as IdPInput } from "./workflow.generated-C2A5Ye0m.mjs";
4
5
  import * as zod from "zod";
5
6
  import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
6
7
  import { Client } from "@urql/core";
@@ -650,7 +651,16 @@ declare function defineConfig<const Config extends AppConfig & Record<Exclude<ke
650
651
  * @param configs - Generator configurations
651
652
  * @returns Generator configurations as given
652
653
  */
653
- declare function defineGenerators(...configs: GeneratorConfig[]): ({
654
+ declare function defineGenerators(...configs: GeneratorConfig[]): (["@tailor-platform/kysely-type", {
655
+ distPath: string;
656
+ }] | ["@tailor-platform/seed", {
657
+ distPath: string;
658
+ machineUserName?: string | undefined;
659
+ }] | ["@tailor-platform/enum-constants", {
660
+ distPath: string;
661
+ }] | ["@tailor-platform/file-utils", {
662
+ distPath: string;
663
+ }] | {
654
664
  id: string;
655
665
  description: string;
656
666
  dependencies: ("executor" | "tailordb" | "resolver")[];
@@ -660,16 +670,7 @@ declare function defineGenerators(...configs: GeneratorConfig[]): ({
660
670
  processExecutor?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
661
671
  processTailorDBNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
662
672
  processResolverNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
663
- } | ["@tailor-platform/kysely-type", {
664
- distPath: string;
665
- }] | ["@tailor-platform/seed", {
666
- distPath: string;
667
- machineUserName?: string | undefined;
668
- }] | ["@tailor-platform/enum-constants", {
669
- distPath: string;
670
- }] | ["@tailor-platform/file-utils", {
671
- distPath: string;
672
- }])[];
673
+ })[];
673
674
  /**
674
675
  * Define plugins to be used with the Tailor SDK.
675
676
  * Plugins can generate additional types, resolvers, and executors
@@ -757,4 +758,4 @@ declare namespace t {
757
758
  }
758
759
  //#endregion
759
760
  export { AuthInvoker as $, idpUserCreatedTrigger as A, WebhookOperation as B, RecordTrigger as C, authAccessTokenIssuedTrigger as D, ResolverExecutedTrigger as E, recordUpdatedTrigger as F, WORKFLOW_TEST_ENV_KEY as G, Workflow as H, resolverExecutedTrigger as I, WorkflowJobInput as J, WorkflowJob as K, FunctionOperation as L, idpUserUpdatedTrigger as M, recordCreatedTrigger as N, authAccessTokenRefreshedTrigger as O, recordDeletedTrigger as P, createResolver as Q, GqlOperation as R, RecordDeletedArgs as S, ResolverExecutedArgs as T, WorkflowConfig as U, WorkflowOperation as V, createWorkflow as W, createWorkflowJob as X, WorkflowJobOutput as Y, QueryType as Z, AuthAccessTokenArgs as _, defineGenerators as a, IdpUserTrigger as b, createExecutor as c, IncomingWebhookRequest as d, defineAuth as et, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, idpUserDeletedTrigger as j, authAccessTokenRevokedTrigger as k, Trigger as l, ScheduleArgs as m, output as n, definePlugins as o, incomingWebhookTrigger as p, WorkflowJobContext as q, t as r, defineIdp as s, infer as t, IncomingWebhookArgs as u, AuthAccessTokenTrigger as v, RecordUpdatedArgs as w, RecordCreatedArgs as x, IdpUserArgs as y, Operation as z };
760
- //# sourceMappingURL=index-BAud4CE7.d.mts.map
761
+ //# sourceMappingURL=index-BYk_9R3S.d.mts.map
@@ -1,4 +1,5 @@
1
- import { n as Plugin } from "./plugin-DyVYXZWz.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
3
 
3
4
  //#region src/plugin/builtin/kysely-type/index.d.ts
4
5
  declare const KyselyGeneratorID = "@tailor-platform/kysely-type";
@@ -14,4 +15,4 @@ type KyselyTypePluginOptions = {
14
15
  declare function kyselyTypePlugin(options: KyselyTypePluginOptions): Plugin<unknown, KyselyTypePluginOptions>;
15
16
  //#endregion
16
17
  export { kyselyTypePlugin as n, KyselyGeneratorID as t };
17
- //# sourceMappingURL=index-CxgBnxKM.d.mts.map
18
+ //# sourceMappingURL=index-CgMytw2A.d.mts.map
@@ -1,4 +1,5 @@
1
- import { n as Plugin } from "./plugin-DyVYXZWz.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
3
 
3
4
  //#region src/plugin/builtin/seed/index.d.ts
4
5
  declare const SeedGeneratorID = "@tailor-platform/seed";
@@ -16,4 +17,4 @@ type SeedPluginOptions = {
16
17
  declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
17
18
  //#endregion
18
19
  export { seedPlugin as n, SeedGeneratorID as t };
19
- //# sourceMappingURL=index-CdDzh-T2.d.mts.map
20
+ //# sourceMappingURL=index-CoReoodF.d.mts.map
@@ -1,4 +1,5 @@
1
- import { n as Plugin } from "./plugin-DyVYXZWz.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
3
 
3
4
  //#region src/plugin/builtin/enum-constants/index.d.ts
4
5
  declare const EnumConstantsGeneratorID = "@tailor-platform/enum-constants";
@@ -14,4 +15,4 @@ type EnumConstantsPluginOptions = {
14
15
  declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
15
16
  //#endregion
16
17
  export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
17
- //# sourceMappingURL=index-FZMBoUWm.d.mts.map
18
+ //# sourceMappingURL=index-vVGamLOw.d.mts.map
@@ -1,4 +1,5 @@
1
- import "./chunk-DEt8GZDa.mjs";
1
+
2
+ import "./chunk-COzJYswC.mjs";
2
3
  import { SpanStatusCode, trace } from "@opentelemetry/api";
3
4
 
4
5
  //#region src/cli/telemetry/interceptor.ts
@@ -31,4 +32,4 @@ function createTracingInterceptor() {
31
32
 
32
33
  //#endregion
33
34
  export { createTracingInterceptor };
34
- //# sourceMappingURL=interceptor-DgQNmwWJ.mjs.map
35
+ //# sourceMappingURL=interceptor-1LL1gBsF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"interceptor-DgQNmwWJ.mjs","names":[],"sources":["../src/cli/telemetry/interceptor.ts"],"sourcesContent":["import { trace, SpanStatusCode } from \"@opentelemetry/api\";\nimport type { Interceptor } from \"@connectrpc/connect\";\n\n/**\n * Create a Connect-RPC interceptor that records OTLP spans for each RPC call.\n * When no TracerProvider is registered, the OTel API automatically provides\n * noop spans with zero overhead.\n * @returns Tracing interceptor\n */\nexport function createTracingInterceptor(): Interceptor {\n return (next) => async (req) => {\n const tracer = trace.getTracer(\"tailor-sdk\");\n\n return tracer.startActiveSpan(`rpc.${req.method.name}`, async (span) => {\n span.setAttribute(\"rpc.method\", req.method.name);\n span.setAttribute(\"rpc.service\", \"OperatorService\");\n span.setAttribute(\"rpc.system\", \"connect-rpc\");\n\n try {\n const response = await next(req);\n span.setStatus({ code: SpanStatusCode.OK });\n return response;\n } catch (error) {\n span.setStatus({ code: SpanStatusCode.ERROR });\n if (error instanceof Error) {\n span.recordException(error);\n }\n throw error;\n } finally {\n span.end();\n }\n });\n };\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,2BAAwC;AACtD,SAAQ,SAAS,OAAO,QAAQ;AAG9B,SAFe,MAAM,UAAU,aAAa,CAE9B,gBAAgB,OAAO,IAAI,OAAO,QAAQ,OAAO,SAAS;AACtE,QAAK,aAAa,cAAc,IAAI,OAAO,KAAK;AAChD,QAAK,aAAa,eAAe,kBAAkB;AACnD,QAAK,aAAa,cAAc,cAAc;AAE9C,OAAI;IACF,MAAM,WAAW,MAAM,KAAK,IAAI;AAChC,SAAK,UAAU,EAAE,MAAM,eAAe,IAAI,CAAC;AAC3C,WAAO;YACA,OAAO;AACd,SAAK,UAAU,EAAE,MAAM,eAAe,OAAO,CAAC;AAC9C,QAAI,iBAAiB,MACnB,MAAK,gBAAgB,MAAM;AAE7B,UAAM;aACE;AACR,SAAK,KAAK;;IAEZ"}
1
+ {"version":3,"file":"interceptor-1LL1gBsF.mjs","names":[],"sources":["../src/cli/telemetry/interceptor.ts"],"sourcesContent":["import { trace, SpanStatusCode } from \"@opentelemetry/api\";\nimport type { Interceptor } from \"@connectrpc/connect\";\n\n/**\n * Create a Connect-RPC interceptor that records OTLP spans for each RPC call.\n * When no TracerProvider is registered, the OTel API automatically provides\n * noop spans with zero overhead.\n * @returns Tracing interceptor\n */\nexport function createTracingInterceptor(): Interceptor {\n return (next) => async (req) => {\n const tracer = trace.getTracer(\"tailor-sdk\");\n\n return tracer.startActiveSpan(`rpc.${req.method.name}`, async (span) => {\n span.setAttribute(\"rpc.method\", req.method.name);\n span.setAttribute(\"rpc.service\", \"OperatorService\");\n span.setAttribute(\"rpc.system\", \"connect-rpc\");\n\n try {\n const response = await next(req);\n span.setStatus({ code: SpanStatusCode.OK });\n return response;\n } catch (error) {\n span.setStatus({ code: SpanStatusCode.ERROR });\n if (error instanceof Error) {\n span.recordException(error);\n }\n throw error;\n } finally {\n span.end();\n }\n });\n };\n}\n"],"mappings":";;;;;;;;;;;AASA,SAAgB,2BAAwC;AACtD,SAAQ,SAAS,OAAO,QAAQ;AAG9B,SAFe,MAAM,UAAU,aAAa,CAE9B,gBAAgB,OAAO,IAAI,OAAO,QAAQ,OAAO,SAAS;AACtE,QAAK,aAAa,cAAc,IAAI,OAAO,KAAK;AAChD,QAAK,aAAa,eAAe,kBAAkB;AACnD,QAAK,aAAa,cAAc,cAAc;AAE9C,OAAI;IACF,MAAM,WAAW,MAAM,KAAK,IAAI;AAChC,SAAK,UAAU,EAAE,MAAM,eAAe,IAAI,CAAC;AAC3C,WAAO;YACA,OAAO;AACd,SAAK,UAAU,EAAE,MAAM,eAAe,OAAO,CAAC;AAC9C,QAAI,iBAAiB,MACnB,MAAK,gBAAgB,MAAM;AAE7B,UAAM;aACE;AACR,SAAK,KAAK;;IAEZ"}
@@ -1,4 +1,5 @@
1
- import { t as brandValue } from "./brand-GZnI4eYb.mjs";
1
+
2
+ import { t as brandValue } from "./brand-0SscafcY.mjs";
2
3
 
3
4
  //#region src/configure/services/workflow/job.ts
4
5
  /**
@@ -50,4 +51,4 @@ const createWorkflowJob = (config) => {
50
51
 
51
52
  //#endregion
52
53
  export { createWorkflowJob as n, WORKFLOW_TEST_ENV_KEY as t };
53
- //# sourceMappingURL=job-DdfW7vH3.mjs.map
54
+ //# sourceMappingURL=job-CPKYCk_e.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"job-DdfW7vH3.mjs","names":[],"sources":["../src/configure/services/workflow/job.ts"],"sourcesContent":["import { brandValue } from \"@/utils/brand\";\nimport type { TailorEnv } from \"@/configure/types/env\";\nimport type { JsonCompatible } from \"@/configure/types/helpers\";\nimport type { Jsonifiable, Jsonify, JsonPrimitive } from \"type-fest\";\n\n/**\n * Context object passed as the second argument to workflow job body functions.\n */\nexport type WorkflowJobContext = {\n env: TailorEnv;\n};\n\n/**\n * Allowed output types for workflow job body functions.\n * Includes Jsonifiable (JSON-serializable values including objects with toJSON like Date),\n * undefined, and void.\n */\nexport type WorkflowJobOutput = Jsonifiable | undefined | void;\n\n/**\n * Convert output type to what trigger returns after JSON serialization.\n * - Jsonifiable values are converted via Jsonify (Date -> string, etc.)\n * - undefined remains undefined\n * - void becomes void\n */\ntype JsonifyOutput<T> = T extends Jsonifiable ? Jsonify<T> : T;\n\n/**\n * Input type constraint for workflow jobs.\n * Accepts any type that is JSON-compatible (primitives, arrays, objects with JSON-compatible values).\n * Excludes objects with toJSON method (like Date) since they won't be serialized in input.\n */\nexport type WorkflowJobInput = undefined | JsonCompatible<unknown>;\n\n/**\n * WorkflowJob represents a job that can be triggered in a workflow.\n *\n * Type constraints:\n * - Input: Must be JSON-compatible (no Date/toJSON objects) or undefined. Interfaces are allowed.\n * - Output: Must be Jsonifiable, undefined, or void\n * - Trigger returns Jsonify<Output> (Date becomes string after JSON.stringify)\n */\nexport interface WorkflowJob<Name extends string = string, Input = undefined, Output = undefined> {\n name: Name;\n /**\n * Trigger this job with the given input.\n * At runtime, this is a placeholder that calls the body function.\n * During bundling, calls to .trigger() are transformed to\n * tailor.workflow.triggerJobFunction(\"<job-name>\", args).\n *\n * Returns Jsonify<Output> because the value passes through JSON.stringify.\n *\n * Inside a workflow job body, .trigger() calls are transformed by the bundler\n * into synchronous `triggerJobFunction` calls. You may use `await` for\n * readability — the bundler strips it automatically at build time.\n * @example\n * // Both styles work — await is stripped by the bundler:\n * body: async (input) => {\n * const a = await jobA.trigger({ id: input.id });\n * const b = await jobB.trigger({ id: input.id });\n * return { a, b };\n * }\n */\n trigger: [Input] extends [undefined]\n ? () => Promise<JsonifyOutput<Awaited<Output>>>\n : (input: Input) => Promise<JsonifyOutput<Awaited<Output>>>;\n body: (input: Input, context: WorkflowJobContext) => Output | Promise<Output>;\n}\n\n/**\n * Helper type to check if all property types are valid.\n * Uses -? to remove optional modifiers so all properties are treated uniformly.\n */\ntype AllPropertiesValid<T> = {\n [K in keyof T]-?: IsValidInput<T[K]> extends true ? true : false;\n}[keyof T] extends true\n ? true\n : false;\n\n/**\n * Check if a type contains any non-JSON-compatible values.\n * Returns `true` if the type is valid for input, `false` otherwise.\n *\n * Accepts:\n * - JSON primitives (string, number, boolean, null)\n * - undefined\n * - Optional primitives (e.g., string | undefined)\n * - Arrays of valid types\n * - Objects with valid field types\n *\n * Rejects:\n * - Objects with toJSON methods (like Date)\n * - Other non-JSON-serializable types\n */\ntype IsValidInput<T> = T extends undefined\n ? true\n : T extends JsonPrimitive\n ? true\n : T extends readonly (infer U)[]\n ? IsValidInput<U>\n : T extends object\n ? T extends { toJSON: () => unknown }\n ? false\n : AllPropertiesValid<T>\n : false;\n\n/**\n * Helper type to check if all property types are valid for output.\n * Uses -? to remove optional modifiers so all properties are treated uniformly.\n */\ntype AllPropertiesValidOutput<T> = {\n [K in keyof T]-?: IsValidOutput<T[K]> extends true ? true : false;\n}[keyof T] extends true\n ? true\n : false;\n\n/**\n * Check if a type is valid for output.\n * Returns `true` if the type is valid, `false` otherwise.\n *\n * Accepts:\n * - JSON primitives (string, number, boolean, null)\n * - undefined and void\n * - Optional primitives (e.g., string | undefined)\n * - Jsonifiable types (Date, objects with toJSON)\n * - Arrays of valid types\n * - Objects with valid field types\n */\ntype IsValidOutput<T> = T extends undefined | void\n ? true\n : T extends JsonPrimitive\n ? true\n : T extends readonly (infer U)[]\n ? IsValidOutput<U>\n : T extends object\n ? AllPropertiesValidOutput<T>\n : false;\n\n/**\n * Body function type with conditional constraint.\n * If input contains invalid types (like Date), the body type becomes `never` to cause an error.\n */\ntype WorkflowJobBody<I, O> =\n IsValidInput<I> extends true\n ? IsValidOutput<O> extends true\n ? (input: I, context: WorkflowJobContext) => O | Promise<O>\n : never\n : never;\n\n/**\n * Environment variable key for workflow testing.\n * Contains JSON-serialized TailorEnv object.\n */\nexport const WORKFLOW_TEST_ENV_KEY = \"TAILOR_TEST_WORKFLOW_ENV\";\n\n/**\n * Create a workflow job definition.\n *\n * All jobs must be named exports from the workflow file.\n * Job names must be unique across the entire project.\n * @param config - Job configuration with name and body function\n * @param config.name - Unique job name across the project\n * @param config.body - Async function that processes the job input\n * @returns A WorkflowJob that can be triggered from other jobs\n * @example\n * // Simple job with async body:\n * export const fetchData = createWorkflowJob({\n * name: \"fetch-data\",\n * body: async (input: { id: string }) => {\n * const db = getDB(\"tailordb\");\n * return await db.selectFrom(\"Table\").selectAll().where(\"id\", \"=\", input.id).executeTakeFirst();\n * },\n * });\n * @example\n * // Orchestrator job that fans out to other jobs.\n * // await is optional — the bundler strips it at build time.\n * export const orchestrate = createWorkflowJob({\n * name: \"orchestrate\",\n * body: async (input: { orderId: string }) => {\n * const inventory = await checkInventory.trigger({ orderId: input.orderId });\n * const payment = await processPayment.trigger({ orderId: input.orderId });\n * return { inventory, payment };\n * },\n * });\n */\nexport const createWorkflowJob = <const Name extends string, I = undefined, O = undefined>(config: {\n readonly name: Name;\n readonly body: WorkflowJobBody<I, O>;\n}): WorkflowJob<Name, I, Awaited<O>> => {\n return brandValue(\n {\n name: config.name,\n // JSON.parse(JSON.stringify(...)) ensures the return value matches Jsonify<Output> type.\n // This converts Date objects to strings, matching actual runtime behavior.\n // In production, bundler transforms .trigger() calls to tailor.workflow.triggerJobFunction().\n trigger: async (args?: unknown) => {\n const env: TailorEnv = JSON.parse(process.env[WORKFLOW_TEST_ENV_KEY] || \"{}\");\n const result = await config.body(args as I, { env });\n return result ? JSON.parse(JSON.stringify(result)) : result;\n },\n body: config.body,\n } as WorkflowJob<Name, I, Awaited<O>>,\n \"workflow-job\",\n );\n};\n"],"mappings":";;;;;;;AAyJA,MAAa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCrC,MAAa,qBAA8E,WAGnD;AACtC,QAAO,WACL;EACE,MAAM,OAAO;EAIb,SAAS,OAAO,SAAmB;GACjC,MAAM,MAAiB,KAAK,MAAM,QAAQ,mCAA8B,KAAK;GAC7E,MAAM,SAAS,MAAM,OAAO,KAAK,MAAW,EAAE,KAAK,CAAC;AACpD,UAAO,SAAS,KAAK,MAAM,KAAK,UAAU,OAAO,CAAC,GAAG;;EAEvD,MAAM,OAAO;EACd,EACD,eACD"}
1
+ {"version":3,"file":"job-CPKYCk_e.mjs","names":[],"sources":["../src/configure/services/workflow/job.ts"],"sourcesContent":["import { brandValue } from \"@/utils/brand\";\nimport type { TailorEnv } from \"@/configure/types/env\";\nimport type { JsonCompatible } from \"@/configure/types/helpers\";\nimport type { Jsonifiable, Jsonify, JsonPrimitive } from \"type-fest\";\n\n/**\n * Context object passed as the second argument to workflow job body functions.\n */\nexport type WorkflowJobContext = {\n env: TailorEnv;\n};\n\n/**\n * Allowed output types for workflow job body functions.\n * Includes Jsonifiable (JSON-serializable values including objects with toJSON like Date),\n * undefined, and void.\n */\nexport type WorkflowJobOutput = Jsonifiable | undefined | void;\n\n/**\n * Convert output type to what trigger returns after JSON serialization.\n * - Jsonifiable values are converted via Jsonify (Date -> string, etc.)\n * - undefined remains undefined\n * - void becomes void\n */\ntype JsonifyOutput<T> = T extends Jsonifiable ? Jsonify<T> : T;\n\n/**\n * Input type constraint for workflow jobs.\n * Accepts any type that is JSON-compatible (primitives, arrays, objects with JSON-compatible values).\n * Excludes objects with toJSON method (like Date) since they won't be serialized in input.\n */\nexport type WorkflowJobInput = undefined | JsonCompatible<unknown>;\n\n/**\n * WorkflowJob represents a job that can be triggered in a workflow.\n *\n * Type constraints:\n * - Input: Must be JSON-compatible (no Date/toJSON objects) or undefined. Interfaces are allowed.\n * - Output: Must be Jsonifiable, undefined, or void\n * - Trigger returns Jsonify<Output> (Date becomes string after JSON.stringify)\n */\nexport interface WorkflowJob<Name extends string = string, Input = undefined, Output = undefined> {\n name: Name;\n /**\n * Trigger this job with the given input.\n * At runtime, this is a placeholder that calls the body function.\n * During bundling, calls to .trigger() are transformed to\n * tailor.workflow.triggerJobFunction(\"<job-name>\", args).\n *\n * Returns Jsonify<Output> because the value passes through JSON.stringify.\n *\n * Inside a workflow job body, .trigger() calls are transformed by the bundler\n * into synchronous `triggerJobFunction` calls. You may use `await` for\n * readability — the bundler strips it automatically at build time.\n * @example\n * // Both styles work — await is stripped by the bundler:\n * body: async (input) => {\n * const a = await jobA.trigger({ id: input.id });\n * const b = await jobB.trigger({ id: input.id });\n * return { a, b };\n * }\n */\n trigger: [Input] extends [undefined]\n ? () => Promise<JsonifyOutput<Awaited<Output>>>\n : (input: Input) => Promise<JsonifyOutput<Awaited<Output>>>;\n body: (input: Input, context: WorkflowJobContext) => Output | Promise<Output>;\n}\n\n/**\n * Helper type to check if all property types are valid.\n * Uses -? to remove optional modifiers so all properties are treated uniformly.\n */\ntype AllPropertiesValid<T> = {\n [K in keyof T]-?: IsValidInput<T[K]> extends true ? true : false;\n}[keyof T] extends true\n ? true\n : false;\n\n/**\n * Check if a type contains any non-JSON-compatible values.\n * Returns `true` if the type is valid for input, `false` otherwise.\n *\n * Accepts:\n * - JSON primitives (string, number, boolean, null)\n * - undefined\n * - Optional primitives (e.g., string | undefined)\n * - Arrays of valid types\n * - Objects with valid field types\n *\n * Rejects:\n * - Objects with toJSON methods (like Date)\n * - Other non-JSON-serializable types\n */\ntype IsValidInput<T> = T extends undefined\n ? true\n : T extends JsonPrimitive\n ? true\n : T extends readonly (infer U)[]\n ? IsValidInput<U>\n : T extends object\n ? T extends { toJSON: () => unknown }\n ? false\n : AllPropertiesValid<T>\n : false;\n\n/**\n * Helper type to check if all property types are valid for output.\n * Uses -? to remove optional modifiers so all properties are treated uniformly.\n */\ntype AllPropertiesValidOutput<T> = {\n [K in keyof T]-?: IsValidOutput<T[K]> extends true ? true : false;\n}[keyof T] extends true\n ? true\n : false;\n\n/**\n * Check if a type is valid for output.\n * Returns `true` if the type is valid, `false` otherwise.\n *\n * Accepts:\n * - JSON primitives (string, number, boolean, null)\n * - undefined and void\n * - Optional primitives (e.g., string | undefined)\n * - Jsonifiable types (Date, objects with toJSON)\n * - Arrays of valid types\n * - Objects with valid field types\n */\ntype IsValidOutput<T> = T extends undefined | void\n ? true\n : T extends JsonPrimitive\n ? true\n : T extends readonly (infer U)[]\n ? IsValidOutput<U>\n : T extends object\n ? AllPropertiesValidOutput<T>\n : false;\n\n/**\n * Body function type with conditional constraint.\n * If input contains invalid types (like Date), the body type becomes `never` to cause an error.\n */\ntype WorkflowJobBody<I, O> =\n IsValidInput<I> extends true\n ? IsValidOutput<O> extends true\n ? (input: I, context: WorkflowJobContext) => O | Promise<O>\n : never\n : never;\n\n/**\n * Environment variable key for workflow testing.\n * Contains JSON-serialized TailorEnv object.\n */\nexport const WORKFLOW_TEST_ENV_KEY = \"TAILOR_TEST_WORKFLOW_ENV\";\n\n/**\n * Create a workflow job definition.\n *\n * All jobs must be named exports from the workflow file.\n * Job names must be unique across the entire project.\n * @param config - Job configuration with name and body function\n * @param config.name - Unique job name across the project\n * @param config.body - Async function that processes the job input\n * @returns A WorkflowJob that can be triggered from other jobs\n * @example\n * // Simple job with async body:\n * export const fetchData = createWorkflowJob({\n * name: \"fetch-data\",\n * body: async (input: { id: string }) => {\n * const db = getDB(\"tailordb\");\n * return await db.selectFrom(\"Table\").selectAll().where(\"id\", \"=\", input.id).executeTakeFirst();\n * },\n * });\n * @example\n * // Orchestrator job that fans out to other jobs.\n * // await is optional — the bundler strips it at build time.\n * export const orchestrate = createWorkflowJob({\n * name: \"orchestrate\",\n * body: async (input: { orderId: string }) => {\n * const inventory = await checkInventory.trigger({ orderId: input.orderId });\n * const payment = await processPayment.trigger({ orderId: input.orderId });\n * return { inventory, payment };\n * },\n * });\n */\nexport const createWorkflowJob = <const Name extends string, I = undefined, O = undefined>(config: {\n readonly name: Name;\n readonly body: WorkflowJobBody<I, O>;\n}): WorkflowJob<Name, I, Awaited<O>> => {\n return brandValue(\n {\n name: config.name,\n // JSON.parse(JSON.stringify(...)) ensures the return value matches Jsonify<Output> type.\n // This converts Date objects to strings, matching actual runtime behavior.\n // In production, bundler transforms .trigger() calls to tailor.workflow.triggerJobFunction().\n trigger: async (args?: unknown) => {\n const env: TailorEnv = JSON.parse(process.env[WORKFLOW_TEST_ENV_KEY] || \"{}\");\n const result = await config.body(args as I, { env });\n return result ? JSON.parse(JSON.stringify(result)) : result;\n },\n body: config.body,\n } as WorkflowJob<Name, I, Awaited<O>>,\n \"workflow-job\",\n );\n};\n"],"mappings":";;;;;;;;AAyJA,MAAa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCrC,MAAa,qBAA8E,WAGnD;AACtC,QAAO,WACL;EACE,MAAM,OAAO;EAIb,SAAS,OAAO,SAAmB;GACjC,MAAM,MAAiB,KAAK,MAAM,QAAQ,mCAA8B,KAAK;GAC7E,MAAM,SAAS,MAAM,OAAO,KAAK,MAAW,EAAE,KAAK,CAAC;AACpD,UAAO,SAAS,KAAK,MAAM,KAAK,UAAU,OAAO,CAAC,GAAG;;EAEvD,MAAM,OAAO;EACd,EACD,eACD"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="@tailor-platform/function-types" />
1
2
  import { TailordbDialect } from "@tailor-platform/function-kysely-tailordb";
2
3
  import { ColumnType, ColumnType as ColumnType$1, Insertable, Insertable as Insertable$1, Kysely, Kysely as Kysely$1, KyselyConfig, KyselyConfig as KyselyConfig$1, Selectable, Selectable as Selectable$1, Transaction, Transaction as Transaction$1, Updateable, Updateable as Updateable$1, sql } from "kysely";
3
4
 
@@ -1,4 +1,5 @@
1
- import "../chunk-DEt8GZDa.mjs";
1
+
2
+ import "../chunk-COzJYswC.mjs";
2
3
  import { TailordbDialect, TailordbDialect as TailordbDialect$1 } from "@tailor-platform/function-kysely-tailordb";
3
4
  import { Kysely, Kysely as Kysely$1, sql } from "kysely";
4
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Kysely","TailordbDialect"],"sources":["../../src/kysely/index.ts"],"sourcesContent":["/**\n * Kysely integration module for generated TailorDB code.\n *\n * Re-exports kysely and function-kysely-tailordb types through a single import path\n * to avoid phantom dependency issues with pnpm, and provides namespace-aware\n * utility types and factory functions used by the code generator.\n */\n\nimport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\nimport {\n type ColumnType,\n Kysely,\n type Insertable,\n type KyselyConfig,\n type Selectable,\n sql,\n type Transaction as KyselyTransaction,\n type Updateable,\n} from \"kysely\";\n\nexport {\n type ColumnType,\n Kysely,\n type KyselyConfig,\n type Transaction,\n type Insertable,\n type Selectable,\n sql,\n type Updateable,\n} from \"kysely\";\n\nexport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\nexport type Timestamp = ColumnType<Date, Date | string, Date | string>;\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\nexport type Serial<T = string | number> = ColumnType<T, never, never>;\n\nexport type TailordbKysely<DB> = Kysely<DB>;\nexport type NamespaceDB<NS, N extends keyof NS = keyof NS> = TailordbKysely<NS[N]>;\n\n/**\n * Create a namespace-aware getDB function for generated code.\n * @returns A getDB function that creates Kysely instances for specific namespaces\n */\nexport function createGetDB<NS>() {\n return function getDB<const N extends keyof NS & string>(\n namespace: N,\n config?: Omit<KyselyConfig, \"dialect\">,\n ): TailordbKysely<NS[N]> {\n const client = new tailordb.Client({ namespace });\n return new Kysely<NS[N]>({\n dialect: new TailordbDialect(client),\n ...config,\n });\n };\n}\n\nexport type NamespaceTransaction<NS, K extends keyof NS | TailordbKysely<NS[keyof NS]> = keyof NS> =\n K extends TailordbKysely<infer DB>\n ? KyselyTransaction<DB>\n : K extends keyof NS\n ? KyselyTransaction<NS[K]>\n : never;\n\nexport type NamespaceTableName<NS> = {\n [N in keyof NS]: keyof NS[N];\n}[keyof NS];\n\nexport type NamespaceTable<NS, T extends NamespaceTableName<NS>> = {\n [N in keyof NS]: T extends keyof NS[N] ? NS[N][T] : never;\n}[keyof NS];\n\nexport type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable<\n NamespaceTable<NS, T>\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,SAAgB,cAAkB;AAChC,QAAO,SAAS,MACd,WACA,QACuB;AAEvB,SAAO,IAAIA,SAAc;GACvB,SAAS,IAAIC,kBAFA,IAAI,SAAS,OAAO,EAAE,WAAW,CAAC,CAEX;GACpC,GAAG;GACJ,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":["Kysely","TailordbDialect"],"sources":["../../src/kysely/index.ts"],"sourcesContent":["/**\n * Kysely integration module for generated TailorDB code.\n *\n * Re-exports kysely and function-kysely-tailordb types through a single import path\n * to avoid phantom dependency issues with pnpm, and provides namespace-aware\n * utility types and factory functions used by the code generator.\n */\n\nimport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\nimport {\n type ColumnType,\n Kysely,\n type Insertable,\n type KyselyConfig,\n type Selectable,\n sql,\n type Transaction as KyselyTransaction,\n type Updateable,\n} from \"kysely\";\n\nexport {\n type ColumnType,\n Kysely,\n type KyselyConfig,\n type Transaction,\n type Insertable,\n type Selectable,\n sql,\n type Updateable,\n} from \"kysely\";\n\nexport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\nexport type Timestamp = ColumnType<Date, Date | string, Date | string>;\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\nexport type Serial<T = string | number> = ColumnType<T, never, never>;\n\nexport type TailordbKysely<DB> = Kysely<DB>;\nexport type NamespaceDB<NS, N extends keyof NS = keyof NS> = TailordbKysely<NS[N]>;\n\n/**\n * Create a namespace-aware getDB function for generated code.\n * @returns A getDB function that creates Kysely instances for specific namespaces\n */\nexport function createGetDB<NS>() {\n return function getDB<const N extends keyof NS & string>(\n namespace: N,\n config?: Omit<KyselyConfig, \"dialect\">,\n ): TailordbKysely<NS[N]> {\n const client = new tailordb.Client({ namespace });\n return new Kysely<NS[N]>({\n dialect: new TailordbDialect(client),\n ...config,\n });\n };\n}\n\nexport type NamespaceTransaction<NS, K extends keyof NS | TailordbKysely<NS[keyof NS]> = keyof NS> =\n K extends TailordbKysely<infer DB>\n ? KyselyTransaction<DB>\n : K extends keyof NS\n ? KyselyTransaction<NS[K]>\n : never;\n\nexport type NamespaceTableName<NS> = {\n [N in keyof NS]: keyof NS[N];\n}[keyof NS];\n\nexport type NamespaceTable<NS, T extends NamespaceTableName<NS>> = {\n [N in keyof NS]: T extends keyof NS[N] ? NS[N][T] : never;\n}[keyof NS];\n\nexport type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable<\n NamespaceTable<NS, T>\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,SAAgB,cAAkB;AAChC,QAAO,SAAS,MACd,WACA,QACuB;AAEvB,SAAO,IAAIA,SAAc;GACvB,SAAS,IAAIC,kBAFA,IAAI,SAAS,OAAO,EAAE,WAAW,CAAC,CAEX;GACpC,GAAG;GACJ,CAAC"}
@@ -1,3 +1,4 @@
1
+
1
2
  import ml from "multiline-ts";
2
3
 
3
4
  //#region src/plugin/builtin/kysely-type/type-processor.ts
@@ -257,4 +258,4 @@ function kyselyTypePlugin(options) {
257
258
 
258
259
  //#endregion
259
260
  export { kyselyTypePlugin as n, KyselyGeneratorID as t };
260
- //# sourceMappingURL=kysely-type-B_IecdK9.mjs.map
261
+ //# sourceMappingURL=kysely-type-BK0b4Rqt.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kysely-type-B_IecdK9.mjs","names":[],"sources":["../src/plugin/builtin/kysely-type/type-processor.ts","../src/plugin/builtin/kysely-type/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport { type KyselyNamespaceMetadata, type KyselyTypeMetadata } from \"./types\";\nimport type { OperatorFieldConfig, TailorDBType } from \"@/types/tailordb\";\n\ntype UsedUtilityTypes = { Timestamp: boolean; Serial: boolean };\n\ntype FieldTypeResult = {\n type: string;\n usedUtilityTypes: UsedUtilityTypes;\n};\n\n/**\n * Get the enum type definition.\n * @param fieldConfig - The field configuration\n * @returns The enum type as a string union\n */\nfunction getEnumType(fieldConfig: OperatorFieldConfig): string {\n const allowedValues = fieldConfig.allowedValues;\n\n if (allowedValues && Array.isArray(allowedValues)) {\n return allowedValues\n .map((v: string | { value: string }) => {\n const value = typeof v === \"string\" ? v : v.value;\n return `\"${value}\"`;\n })\n .join(\" | \");\n }\n return \"string\";\n}\n\n/**\n * Get the nested object type definition.\n * @param fieldConfig - The field configuration\n * @returns The nested type with used utility types\n */\nfunction getNestedType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fields = fieldConfig.fields;\n if (!fields || typeof fields !== \"object\") {\n return {\n type: \"string\",\n usedUtilityTypes: { Timestamp: false, Serial: false },\n };\n }\n\n const fieldResults = Object.entries(fields).map(([fieldName, nestedOperatorFieldConfig]) => ({\n fieldName,\n ...generateFieldType(nestedOperatorFieldConfig),\n }));\n\n const fieldTypes = fieldResults.map((result) => `${result.fieldName}: ${result.type}`);\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const type = `{\\n ${fieldTypes.join(\";\\n \")}${fieldTypes.length > 0 ? \";\" : \"\"}\\n}`;\n return { type, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Get the base Kysely type for a field (without array/null modifiers).\n * @param fieldConfig - The field configuration\n * @returns The base type with used utility types\n */\nfunction getBaseType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fieldType = fieldConfig.type;\n const usedUtilityTypes = { Timestamp: false, Serial: false };\n\n let type: string;\n switch (fieldType) {\n case \"uuid\":\n case \"string\":\n case \"decimal\":\n type = \"string\";\n break;\n case \"integer\":\n case \"float\":\n type = \"number\";\n break;\n case \"date\":\n case \"datetime\":\n usedUtilityTypes.Timestamp = true;\n type = \"Timestamp\";\n break;\n case \"bool\":\n case \"boolean\":\n type = \"boolean\";\n break;\n case \"enum\":\n type = getEnumType(fieldConfig);\n break;\n case \"nested\": {\n const nestedResult = getNestedType(fieldConfig);\n return nestedResult;\n }\n default:\n type = \"string\";\n break;\n }\n\n return { type, usedUtilityTypes };\n}\n\n/**\n * Generate the complete field type including array and null modifiers.\n * @param fieldConfig - The field configuration\n * @returns The complete field type with used utility types\n */\nfunction generateFieldType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const baseTypeResult = getBaseType(fieldConfig);\n const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };\n\n const isArray = fieldConfig.array === true;\n const isNullable = fieldConfig.required !== true;\n\n let finalType = baseTypeResult.type;\n if (isArray) {\n // Wrap enum types in parentheses before adding array suffix\n const needsParens = fieldConfig.type === \"enum\";\n finalType = needsParens ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;\n }\n if (isNullable) {\n finalType = `${finalType} | null`;\n }\n\n if (fieldConfig.serial) {\n usedUtilityTypes.Serial = true;\n finalType = `Serial<${finalType}>`;\n }\n if (fieldConfig.hooks?.create) {\n finalType = `Generated<${finalType}>`;\n }\n\n return { type: finalType, usedUtilityTypes };\n}\n\n/**\n * Generate the table interface.\n * @param type - The parsed TailorDB type\n * @returns The type definition and used utility types\n */\nfunction generateTableInterface(type: TailorDBType): {\n typeDef: string;\n usedUtilityTypes: UsedUtilityTypes;\n} {\n const fieldEntries = Object.entries(type.fields).filter(([fieldName]) => fieldName !== \"id\");\n\n const fieldResults = fieldEntries.map(([fieldName, parsedField]) => ({\n fieldName,\n ...generateFieldType(parsedField.config),\n }));\n\n const fields = [\n \"id: Generated<string>;\",\n ...fieldResults.map((result) => `${result.fieldName}: ${result.type};`),\n ];\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const typeDef = multiline /* ts */ `\n ${type.name}: {\n ${fields.join(\"\\n\")}\n }\n `;\n\n return { typeDef, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Convert a TailorDBType into KyselyTypeMetadata.\n * @param type - Parsed TailorDB type\n * @returns Generated Kysely type metadata\n */\nexport async function processKyselyType(type: TailorDBType): Promise<KyselyTypeMetadata> {\n const result = generateTableInterface(type);\n\n return {\n name: type.name,\n typeDef: result.typeDef,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n}\n\n/**\n * Generate unified types file from multiple namespaces.\n * @param namespaceData - Namespace metadata\n * @returns Generated types file contents\n */\nexport function generateUnifiedKyselyTypes(namespaceData: KyselyNamespaceMetadata[]): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Aggregate used utility types from all namespaces\n const globalUsedUtilityTypes = namespaceData.reduce(\n (acc, ns) => ({\n Timestamp: acc.Timestamp || ns.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || ns.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const utilityTypeImports: string[] = [\"type Generated\"];\n if (globalUsedUtilityTypes.Timestamp) {\n utilityTypeImports.push(\"type Timestamp\");\n }\n if (globalUsedUtilityTypes.Serial) {\n utilityTypeImports.push(\"type Serial\");\n }\n\n const importsSection = multiline /* ts */ `\n import {\n createGetDB,\n ${utilityTypeImports.join(\",\\n\")},\n type NamespaceDB,\n type NamespaceInsertable,\n type NamespaceSelectable,\n type NamespaceTable,\n type NamespaceTableName,\n type NamespaceTransaction,\n type NamespaceUpdateable,\n } from \"@tailor-platform/sdk/kysely\";\n `;\n\n // Generate Namespace interface with multiple namespaces\n const namespaceInterfaces = namespaceData\n .map(({ namespace, types }) => {\n const typeDefsWithIndent = types\n .map((type) => {\n return type.typeDef\n .split(\"\\n\")\n .map((line) => (line.trim() ? ` ${line}` : \"\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n\n return ` \"${namespace}\": {\\n${typeDefsWithIndent}\\n }`;\n })\n .join(\",\\n\");\n\n const namespaceInterface = `export interface Namespace {\\n${namespaceInterfaces}\\n}`;\n\n const getDBFunction = multiline /* ts */ `\n export const getDB = createGetDB<Namespace>();\n\n export type DB<N extends keyof Namespace = keyof Namespace> = NamespaceDB<Namespace, N>;\n `;\n\n const utilityTypeExports = multiline /* ts */ `\n export type Transaction<K extends keyof Namespace | DB = keyof Namespace> =\n NamespaceTransaction<Namespace, K>;\n\n type TableName = NamespaceTableName<Namespace>;\n export type Table<T extends TableName> = NamespaceTable<Namespace, T>;\n\n export type Insertable<T extends TableName> = NamespaceInsertable<Namespace, T>;\n export type Selectable<T extends TableName> = NamespaceSelectable<Namespace, T>;\n export type Updateable<T extends TableName> = NamespaceUpdateable<Namespace, T>;\n `;\n\n return (\n [importsSection, namespaceInterface, getDBFunction, utilityTypeExports].join(\"\\n\\n\") + \"\\n\"\n );\n}\n","import { processKyselyType, generateUnifiedKyselyTypes } from \"./type-processor\";\nimport type { KyselyTypeMetadata, KyselyNamespaceMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const KyselyGeneratorID = \"@tailor-platform/kysely-type\";\n\ntype KyselyTypePluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates Kysely type definitions for TailorDB types.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated types\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function kyselyTypePlugin(\n options: KyselyTypePluginOptions,\n): Plugin<unknown, KyselyTypePluginOptions> {\n return {\n id: KyselyGeneratorID,\n description: \"Generates Kysely type definitions for TailorDB types\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<KyselyTypePluginOptions>,\n ): Promise<GeneratorResult> {\n const allNamespaceData: KyselyNamespaceMetadata[] = [];\n\n for (const ns of ctx.tailordb) {\n const typeMetadataList: KyselyTypeMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processKyselyType(type);\n typeMetadataList.push(metadata);\n }\n\n if (typeMetadataList.length === 0) continue;\n\n const usedUtilityTypes = typeMetadataList.reduce(\n (acc, type) => ({\n Timestamp: acc.Timestamp || type.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || type.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n allNamespaceData.push({\n namespace: ns.namespace,\n types: typeMetadataList,\n usedUtilityTypes,\n });\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allNamespaceData.length > 0) {\n const content = generateUnifiedKyselyTypes(allNamespaceData);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;AAgBA,SAAS,YAAY,aAA0C;CAC7D,MAAM,gBAAgB,YAAY;AAElC,KAAI,iBAAiB,MAAM,QAAQ,cAAc,CAC/C,QAAO,cACJ,KAAK,MAAkC;AAEtC,SAAO,IADO,OAAO,MAAM,WAAW,IAAI,EAAE,MAC3B;GACjB,CACD,KAAK,MAAM;AAEhB,QAAO;;;;;;;AAQT,SAAS,cAAc,aAAmD;CACxE,MAAM,SAAS,YAAY;AAC3B,KAAI,CAAC,UAAU,OAAO,WAAW,SAC/B,QAAO;EACL,MAAM;EACN,kBAAkB;GAAE,WAAW;GAAO,QAAQ;GAAO;EACtD;CAGH,MAAM,eAAe,OAAO,QAAQ,OAAO,CAAC,KAAK,CAAC,WAAW,gCAAgC;EAC3F;EACA,GAAG,kBAAkB,0BAA0B;EAChD,EAAE;CAEH,MAAM,aAAa,aAAa,KAAK,WAAW,GAAG,OAAO,UAAU,IAAI,OAAO,OAAO;CAEtF,MAAM,yBAAyB,aAAa,QACzC,KAAK,YAAY;EAChB,WAAW,IAAI,aAAa,OAAO,iBAAiB;EACpD,QAAQ,IAAI,UAAU,OAAO,iBAAiB;EAC/C,GACD;EAAE,WAAW;EAAO,QAAQ;EAAO,CACpC;AAGD,QAAO;EAAE,MADI,QAAQ,WAAW,KAAK,QAAQ,GAAG,WAAW,SAAS,IAAI,MAAM,GAAG;EAClE,kBAAkB;EAAwB;;;;;;;AAQ3D,SAAS,YAAY,aAAmD;CACtE,MAAM,YAAY,YAAY;CAC9B,MAAM,mBAAmB;EAAE,W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ACb,cAAc;EAEd,MAAM,gBACJ,KAC0B;GAC1B,MAAM,mBAA8C,EAAE;AAEtD,QAAK,MAAM,MAAM,IAAI,UAAU;IAC7B,MAAM,mBAAyC,EAAE;AAEjD,SAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;KAC1C,MAAM,WAAW,MAAM,kBAAkB,KAAK;AAC9C,sBAAiB,KAAK,SAAS;;AAGjC,QAAI,iBAAiB,WAAW,EAAG;IAEnC,MAAM,mBAAmB,iBAAiB,QACvC,KAAK,UAAU;KACd,WAAW,IAAI,aAAa,KAAK,iBAAiB;KAClD,QAAQ,IAAI,UAAU,KAAK,iBAAiB;KAC7C,GACD;KAAE,WAAW;KAAO,QAAQ;KAAO,CACpC;AAED,qBAAiB,KAAK;KACpB,WAAW,GAAG;KACd,OAAO;KACP;KACD,CAAC;;GAGJ,MAAM,QAAkC,EAAE;AAC1C,OAAI,iBAAiB,SAAS,GAAG;IAC/B,MAAM,UAAU,2BAA2B,iBAAiB;AAC5D,UAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAGJ,UAAO,EAAE,OAAO;;EAEnB"}
1
+ {"version":3,"file":"kysely-type-BK0b4Rqt.mjs","names":[],"sources":["../src/plugin/builtin/kysely-type/type-processor.ts","../src/plugin/builtin/kysely-type/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport { type KyselyNamespaceMetadata, type KyselyTypeMetadata } from \"./types\";\nimport type { OperatorFieldConfig, TailorDBType } from \"@/types/tailordb\";\n\ntype UsedUtilityTypes = { Timestamp: boolean; Serial: boolean };\n\ntype FieldTypeResult = {\n type: string;\n usedUtilityTypes: UsedUtilityTypes;\n};\n\n/**\n * Get the enum type definition.\n * @param fieldConfig - The field configuration\n * @returns The enum type as a string union\n */\nfunction getEnumType(fieldConfig: OperatorFieldConfig): string {\n const allowedValues = fieldConfig.allowedValues;\n\n if (allowedValues && Array.isArray(allowedValues)) {\n return allowedValues\n .map((v: string | { value: string }) => {\n const value = typeof v === \"string\" ? v : v.value;\n return `\"${value}\"`;\n })\n .join(\" | \");\n }\n return \"string\";\n}\n\n/**\n * Get the nested object type definition.\n * @param fieldConfig - The field configuration\n * @returns The nested type with used utility types\n */\nfunction getNestedType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fields = fieldConfig.fields;\n if (!fields || typeof fields !== \"object\") {\n return {\n type: \"string\",\n usedUtilityTypes: { Timestamp: false, Serial: false },\n };\n }\n\n const fieldResults = Object.entries(fields).map(([fieldName, nestedOperatorFieldConfig]) => ({\n fieldName,\n ...generateFieldType(nestedOperatorFieldConfig),\n }));\n\n const fieldTypes = fieldResults.map((result) => `${result.fieldName}: ${result.type}`);\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const type = `{\\n ${fieldTypes.join(\";\\n \")}${fieldTypes.length > 0 ? \";\" : \"\"}\\n}`;\n return { type, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Get the base Kysely type for a field (without array/null modifiers).\n * @param fieldConfig - The field configuration\n * @returns The base type with used utility types\n */\nfunction getBaseType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fieldType = fieldConfig.type;\n const usedUtilityTypes = { Timestamp: false, Serial: false };\n\n let type: string;\n switch (fieldType) {\n case \"uuid\":\n case \"string\":\n case \"decimal\":\n type = \"string\";\n break;\n case \"integer\":\n case \"float\":\n type = \"number\";\n break;\n case \"date\":\n case \"datetime\":\n usedUtilityTypes.Timestamp = true;\n type = \"Timestamp\";\n break;\n case \"bool\":\n case \"boolean\":\n type = \"boolean\";\n break;\n case \"enum\":\n type = getEnumType(fieldConfig);\n break;\n case \"nested\": {\n const nestedResult = getNestedType(fieldConfig);\n return nestedResult;\n }\n default:\n type = \"string\";\n break;\n }\n\n return { type, usedUtilityTypes };\n}\n\n/**\n * Generate the complete field type including array and null modifiers.\n * @param fieldConfig - The field configuration\n * @returns The complete field type with used utility types\n */\nfunction generateFieldType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const baseTypeResult = getBaseType(fieldConfig);\n const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };\n\n const isArray = fieldConfig.array === true;\n const isNullable = fieldConfig.required !== true;\n\n let finalType = baseTypeResult.type;\n if (isArray) {\n // Wrap enum types in parentheses before adding array suffix\n const needsParens = fieldConfig.type === \"enum\";\n finalType = needsParens ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;\n }\n if (isNullable) {\n finalType = `${finalType} | null`;\n }\n\n if (fieldConfig.serial) {\n usedUtilityTypes.Serial = true;\n finalType = `Serial<${finalType}>`;\n }\n if (fieldConfig.hooks?.create) {\n finalType = `Generated<${finalType}>`;\n }\n\n return { type: finalType, usedUtilityTypes };\n}\n\n/**\n * Generate the table interface.\n * @param type - The parsed TailorDB type\n * @returns The type definition and used utility types\n */\nfunction generateTableInterface(type: TailorDBType): {\n typeDef: string;\n usedUtilityTypes: UsedUtilityTypes;\n} {\n const fieldEntries = Object.entries(type.fields).filter(([fieldName]) => fieldName !== \"id\");\n\n const fieldResults = fieldEntries.map(([fieldName, parsedField]) => ({\n fieldName,\n ...generateFieldType(parsedField.config),\n }));\n\n const fields = [\n \"id: Generated<string>;\",\n ...fieldResults.map((result) => `${result.fieldName}: ${result.type};`),\n ];\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const typeDef = multiline /* ts */ `\n ${type.name}: {\n ${fields.join(\"\\n\")}\n }\n `;\n\n return { typeDef, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Convert a TailorDBType into KyselyTypeMetadata.\n * @param type - Parsed TailorDB type\n * @returns Generated Kysely type metadata\n */\nexport async function processKyselyType(type: TailorDBType): Promise<KyselyTypeMetadata> {\n const result = generateTableInterface(type);\n\n return {\n name: type.name,\n typeDef: result.typeDef,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n}\n\n/**\n * Generate unified types file from multiple namespaces.\n * @param namespaceData - Namespace metadata\n * @returns Generated types file contents\n */\nexport function generateUnifiedKyselyTypes(namespaceData: KyselyNamespaceMetadata[]): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Aggregate used utility types from all namespaces\n const globalUsedUtilityTypes = namespaceData.reduce(\n (acc, ns) => ({\n Timestamp: acc.Timestamp || ns.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || ns.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const utilityTypeImports: string[] = [\"type Generated\"];\n if (globalUsedUtilityTypes.Timestamp) {\n utilityTypeImports.push(\"type Timestamp\");\n }\n if (globalUsedUtilityTypes.Serial) {\n utilityTypeImports.push(\"type Serial\");\n }\n\n const importsSection = multiline /* ts */ `\n import {\n createGetDB,\n ${utilityTypeImports.join(\",\\n\")},\n type NamespaceDB,\n type NamespaceInsertable,\n type NamespaceSelectable,\n type NamespaceTable,\n type NamespaceTableName,\n type NamespaceTransaction,\n type NamespaceUpdateable,\n } from \"@tailor-platform/sdk/kysely\";\n `;\n\n // Generate Namespace interface with multiple namespaces\n const namespaceInterfaces = namespaceData\n .map(({ namespace, types }) => {\n const typeDefsWithIndent = types\n .map((type) => {\n return type.typeDef\n .split(\"\\n\")\n .map((line) => (line.trim() ? ` ${line}` : \"\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n\n return ` \"${namespace}\": {\\n${typeDefsWithIndent}\\n }`;\n })\n .join(\",\\n\");\n\n const namespaceInterface = `export interface Namespace {\\n${namespaceInterfaces}\\n}`;\n\n const getDBFunction = multiline /* ts */ `\n export const getDB = createGetDB<Namespace>();\n\n export type DB<N extends keyof Namespace = keyof Namespace> = NamespaceDB<Namespace, N>;\n `;\n\n const utilityTypeExports = multiline /* ts */ `\n export type Transaction<K extends keyof Namespace | DB = keyof Namespace> =\n NamespaceTransaction<Namespace, K>;\n\n type TableName = NamespaceTableName<Namespace>;\n export type Table<T extends TableName> = NamespaceTable<Namespace, T>;\n\n export type Insertable<T extends TableName> = NamespaceInsertable<Namespace, T>;\n export type Selectable<T extends TableName> = NamespaceSelectable<Namespace, T>;\n export type Updateable<T extends TableName> = NamespaceUpdateable<Namespace, T>;\n `;\n\n return (\n [importsSection, namespaceInterface, getDBFunction, utilityTypeExports].join(\"\\n\\n\") + \"\\n\"\n );\n}\n","import { processKyselyType, generateUnifiedKyselyTypes } from \"./type-processor\";\nimport type { KyselyTypeMetadata, KyselyNamespaceMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const KyselyGeneratorID = \"@tailor-platform/kysely-type\";\n\ntype KyselyTypePluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates Kysely type definitions for TailorDB types.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated types\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function kyselyTypePlugin(\n options: KyselyTypePluginOptions,\n): Plugin<unknown, KyselyTypePluginOptions> {\n return {\n id: KyselyGeneratorID,\n description: \"Generates Kysely type definitions for TailorDB types\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<KyselyTypePluginOptions>,\n ): Promise<GeneratorResult> {\n const allNamespaceData: KyselyNamespaceMetadata[] = [];\n\n for (const ns of ctx.tailordb) {\n const typeMetadataList: KyselyTypeMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processKyselyType(type);\n typeMetadataList.push(metadata);\n }\n\n if (typeMetadataList.length === 0) continue;\n\n const usedUtilityTypes = typeMetadataList.reduce(\n (acc, type) => ({\n Timestamp: acc.Timestamp || type.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || type.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n allNamespaceData.push({\n namespace: ns.namespace,\n types: typeMetadataList,\n usedUtilityTypes,\n });\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allNamespaceData.length > 0) {\n const content = generateUnifiedKyselyTypes(allNamespaceData);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAS,YAAY,aAA0C;CAC7D,MAAM,gBAAgB,YAAY;AAElC,KAAI,iBAAiB,MAAM,QAAQ,cAAc,CAC/C,QAAO,cACJ,KAAK,MAAkC;AAEtC,SAAO,IADO,OAAO,MAAM,WAAW,IAAI,EAAE,MAC3B;GACjB,CACD,KAAK,MAAM;AAEhB,QAAO;;;;;;;AAQT,SAAS,cAAc,aAAmD;CACxE,MAAM,SAAS,YAAY;AAC3B,KAAI,CAAC,UAAU,OAAO,WAAW,SAC/B,QAAO;EACL,MAAM;EACN,kBAAkB;GAAE,WAAW;GAAO,QAAQ;GAAO;EACtD;CAGH,MAAM,eAAe,OAAO,QAAQ,OAAO,CAAC,KAAK,CAAC,WAAW,gCAAgC;EAC3F;EACA,GAAG,kBAAkB,0BAA0B;EAChD,EAAE;CAEH,MAAM,aAAa,aAAa,KAAK,WAAW,GAAG,OAAO,UAAU,IAAI,OAAO,OAAO;CAEtF,MAAM,yBAAyB,aAAa,QACzC,KAAK,YAAY;EAChB,WAAW,IAAI,aAAa,OAAO,iBAAiB;EACpD,QAAQ,IAAI,UAAU,OAAO,iBAAiB;EAC/C,GACD;EAAE,WAAW;EAAO,QAAQ;EAAO,CACpC;AAGD,QAAO;EAAE,MADI,QAAQ,WAAW,KAAK,QAAQ,GAAG,WAAW,SAAS,IAAI,MAAM,GAAG;EAClE,kBAAkB;EAAwB;;;;;;;AAQ3D,SAAS,YAAY,aAAmD;CACtE,MAAM,YAAY,YAAY;CAC9B,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L,IAAI;EACJ,aAAa;EACb,cAAc;EAEd,MAAM,gBACJ,KAC0B;GAC1B,MAAM,mBAA8C,EAAE;AAEtD,QAAK,MAAM,MAAM,IAAI,UAAU;IAC7B,MAAM,mBAAyC,EAAE;AAEjD,SAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;KAC1C,MAAM,WAAW,MAAM,kBAAkB,KAAK;AAC9C,sBAAiB,KAAK,SAAS;;AAGjC,QAAI,iBAAiB,WAAW,EAAG;IAEnC,MAAM,mBAAmB,iBAAiB,QACvC,KAAK,UAAU;KACd,WAAW,IAAI,aAAa,KAAK,iBAAiB;KAClD,QAAQ,IAAI,UAAU,KAAK,iBAAiB;KAC7C,GACD;KAAE,WAAW;KAAO,QAAQ;KAAO,CACpC;AAED,qBAAiB,KAAK;KACpB,WAAW,GAAG;KACd,OAAO;KACP;KACD,CAAC;;GAGJ,MAAM,QAAkC,EAAE;AAC1C,OAAI,iBAAiB,SAAS,GAAG;IAC/B,MAAM,UAAU,2BAA2B,iBAAiB;AAC5D,UAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAGJ,UAAO,EAAE,OAAO;;EAEnB"}
@@ -1,3 +1,4 @@
1
+
1
2
  import { formatWithOptions } from "node:util";
2
3
  import chalk from "chalk";
3
4
  import { formatDistanceToNowStrict } from "date-fns";
@@ -178,4 +179,4 @@ const logger = {
178
179
 
179
180
  //#endregion
180
181
  export { symbols as i, logger as n, styles as r, CIPromptError as t };
181
- //# sourceMappingURL=logger-CqezTedh.mjs.map
182
+ //# sourceMappingURL=logger-qz-Y4sBV.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger-CqezTedh.mjs","names":[],"sources":["../src/cli/shared/logger.ts"],"sourcesContent":["import { formatWithOptions, type InspectOptions } from \"node:util\";\nimport chalk from \"chalk\";\nimport { formatDistanceToNowStrict } from \"date-fns\";\nimport { getBorderCharacters, table } from \"table\";\n\n/**\n * Error thrown when a prompt is attempted in a CI environment\n */\nexport class CIPromptError extends Error {\n constructor(message?: string) {\n super(\n message ??\n \"Interactive prompts are not available in CI environments. Use --yes flag to skip confirmation prompts.\",\n );\n this.name = \"CIPromptError\";\n }\n}\n\n/**\n * Semantic style functions for inline text styling\n */\nexport const styles = {\n // Status colors\n success: chalk.green,\n error: chalk.red,\n warning: chalk.yellow,\n info: chalk.cyan,\n\n // Action colors (for change sets)\n create: chalk.green,\n update: chalk.yellow,\n delete: chalk.red,\n unchanged: chalk.gray,\n\n // Emphasis\n bold: chalk.bold,\n dim: chalk.gray,\n highlight: chalk.cyanBright,\n successBright: chalk.greenBright,\n errorBright: chalk.redBright,\n\n // Resource types\n resourceType: chalk.bold,\n resourceName: chalk.cyan,\n\n // File paths\n path: chalk.cyan,\n\n // Values\n value: chalk.white,\n placeholder: chalk.gray.italic,\n};\n\n/**\n * Standardized symbols for CLI output\n */\nexport const symbols = {\n success: chalk.green(\"\\u2713\"),\n error: chalk.red(\"\\u2716\"),\n warning: chalk.yellow(\"\\u26a0\"),\n info: chalk.cyan(\"i\"),\n create: chalk.green(\"+\"),\n update: chalk.yellow(\"~\"),\n delete: chalk.red(\"-\"),\n replace: chalk.magenta(\"\\u00b1\"),\n bullet: chalk.gray(\"\\u2022\"),\n arrow: chalk.gray(\"\\u2192\"),\n};\n\n/**\n * Log output modes\n */\nexport type LogMode = \"default\" | \"stream\" | \"plain\";\n\nexport interface LogOptions {\n /** Output mode (default: \"default\") */\n mode?: LogMode;\n /** Number of spaces to indent the entire line (default: 0) */\n indent?: number;\n}\n\n/** Field transformer function. null excludes the field from table output. */\nexport type FieldTransformer = ((value: unknown, item: object) => string) | null;\n\nexport interface OutOptions {\n /** Table display field transform/exclude settings. Only applied in table mode (not JSON). */\n display?: Record<string, FieldTransformer>;\n\n /** Show null values in table output (default: false) */\n showNull?: boolean;\n}\n\n// In JSON mode, all logs go to stderr to keep stdout clean for JSON data\nlet _jsonMode = false;\n\n// Type icons for log output\nconst TYPE_ICONS: Record<string, string> = {\n info: \"ℹ\",\n success: \"✔\",\n warn: \"⚠\",\n error: \"✖\",\n debug: \"⚙\",\n trace: \"→\",\n log: \"\",\n};\n\n// Color functions for icon and message text\nconst TYPE_COLORS: Record<string, (text: string) => string> = {\n info: chalk.cyan,\n success: chalk.green,\n warn: chalk.yellow,\n error: chalk.red,\n debug: chalk.gray,\n trace: chalk.gray,\n log: (text) => text,\n};\n\ninterface FormatLogLineOptions {\n mode: string;\n indent: number;\n type: string;\n message: string;\n timestamp?: string;\n}\n\n/**\n * Formats a log line with the appropriate prefix and indentation\n * @param opts - Formatting options\n * @returns Formatted log line\n */\nexport function formatLogLine(opts: FormatLogLineOptions): string {\n const { mode, indent, type, message, timestamp } = opts;\n const indentPrefix = indent > 0 ? \" \".repeat(indent) : \"\";\n const colorFn = TYPE_COLORS[type] || ((text: string) => text);\n\n // Plain mode: color only, no icon, no timestamp\n if (mode === \"plain\") {\n return `${indentPrefix}${colorFn(message)}\\n`;\n }\n\n // Default/Stream mode: with icon and color\n const icon = TYPE_ICONS[type] || \"\";\n const prefix = icon ? `${icon} ` : \"\";\n const coloredOutput = colorFn(`${prefix}${message}`);\n const timestampPrefix = timestamp ?? \"\";\n\n return `${indentPrefix}${timestampPrefix}${coloredOutput}\\n`;\n}\n\n/**\n * Writes a formatted log line to stderr.\n * @param type - Log type (info, success, warn, error, log)\n * @param message - Log message\n * @param opts - Log options (mode and indent)\n */\nfunction writeLog(type: string, message: string, opts?: LogOptions): void {\n const mode = opts?.mode ?? \"default\";\n const indent = opts?.indent ?? 0;\n const inspectOpts: InspectOptions = {\n breakLength: process.stdout.columns || 80,\n };\n const formattedMessage = formatWithOptions(inspectOpts, message);\n const timestamp = mode === \"stream\" ? `${new Date().toLocaleTimeString()} ` : \"\";\n const output = formatLogLine({ mode, indent, type, message: formattedMessage, timestamp });\n process.stderr.write(output);\n}\n\nexport const logger = {\n get jsonMode(): boolean {\n return _jsonMode;\n },\n set jsonMode(value: boolean) {\n _jsonMode = value;\n },\n\n info(message: string, opts?: LogOptions): void {\n writeLog(\"info\", message, opts);\n },\n\n success(message: string, opts?: LogOptions): void {\n writeLog(\"success\", message, opts);\n },\n\n warn(message: string, opts?: LogOptions): void {\n writeLog(\"warn\", message, opts);\n },\n\n error(message: string, opts?: LogOptions): void {\n writeLog(\"error\", message, opts);\n },\n\n log(message: string): void {\n writeLog(\"log\", message, { mode: \"plain\" });\n },\n\n newline(): void {\n process.stderr.write(\"\\n\");\n },\n\n debug(message: string): void {\n if (process.env.DEBUG === \"true\") {\n writeLog(\"log\", styles.dim(message), { mode: \"plain\" });\n }\n },\n\n out(data: string | object | object[], options?: OutOptions): void {\n if (typeof data === \"string\") {\n process.stdout.write(data.endsWith(\"\\n\") ? data : data + \"\\n\");\n return;\n }\n\n if (this.jsonMode) {\n // eslint-disable-next-line no-restricted-syntax\n console.log(JSON.stringify(data));\n return;\n }\n\n const display = options?.display;\n\n // Helper to format a value for table display\n const formatValue = (value: unknown, pretty = false): string => {\n if (options?.showNull && value === null) return \"NULL\";\n if (value === null || value === undefined) return \"N/A\";\n if (value instanceof Date) {\n return formatDistanceToNowStrict(value, { addSuffix: true });\n }\n if (typeof value === \"object\") {\n return pretty ? JSON.stringify(value, null, 2) : JSON.stringify(value);\n }\n return String(value);\n };\n\n // Helper to check if field should be excluded\n const isExcluded = (key: string): boolean => {\n return display !== undefined && key in display && display[key] === null;\n };\n\n // Helper to apply transformer or default formatting\n const transformValue = (key: string, value: unknown, item: object, pretty = false): string => {\n if (display && key in display) {\n const transformer = display[key];\n if (transformer) {\n return transformer(value, item);\n }\n }\n return formatValue(value, pretty);\n };\n\n if (!Array.isArray(data)) {\n const entries = Object.entries(data).filter(([key]) => !isExcluded(key));\n const formattedEntries = entries.map(([key, value]) => [\n key,\n transformValue(key, value, data, true),\n ]);\n const t = table(formattedEntries, {\n singleLine: false,\n border: getBorderCharacters(\"norc\"),\n });\n process.stdout.write(t);\n return;\n }\n\n if (data.length === 0) {\n return;\n }\n\n const allHeaders = Array.from(new Set(data.flatMap((item) => Object.keys(item))));\n const headers = allHeaders.filter((h) => !isExcluded(h));\n const rows = data.map((item) =>\n headers.map((header) =>\n transformValue(header, (item as Record<string, unknown>)[header], item),\n ),\n );\n\n const t = table([headers, ...rows], {\n border: getBorderCharacters(\"norc\"),\n drawHorizontalLine: (lineIndex, rowCount) => {\n return lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount;\n },\n });\n process.stdout.write(t);\n },\n};\n"],"mappings":";;;;;;;;;AAQA,IAAa,gBAAb,cAAmC,MAAM;CACvC,YAAY,SAAkB;AAC5B,QACE,WACE,yGACH;AACD,OAAK,OAAO;;;;;;AAOhB,MAAa,SAAS;CAEpB,SAAS,MAAM;CACf,OAAO,MAAM;CACb,SAAS,MAAM;CACf,MAAM,MAAM;CAGZ,QAAQ,MAAM;CACd,QAAQ,MAAM;CACd,QAAQ,MAAM;CACd,WAAW,MAAM;CAGjB,MAAM,MAAM;CACZ,KAAK,MAAM;CACX,WAAW,MAAM;CACjB,eAAe,MAAM;CACrB,aAAa,MAAM;CAGnB,cAAc,MAAM;CACpB,cAAc,MAAM;CAGpB,MAAM,MAAM;CAGZ,OAAO,MAAM;CACb,aAAa,MAAM,KAAK;CACzB;;;;AAKD,MAAa,UAAU;CACrB,SAAS,MAAM,MAAM,IAAS;CAC9B,OAAO,MAAM,IAAI,IAAS;CAC1B,SAAS,MAAM,OAAO,IAAS;CAC/B,MAAM,MAAM,KAAK,IAAI;CACrB,QAAQ,MAAM,MAAM,IAAI;CACxB,QAAQ,MAAM,OAAO,IAAI;CACzB,QAAQ,MAAM,IAAI,IAAI;CACtB,SAAS,MAAM,QAAQ,IAAS;CAChC,QAAQ,MAAM,KAAK,IAAS;CAC5B,OAAO,MAAM,KAAK,IAAS;CAC5B;AA0BD,IAAI,YAAY;AAGhB,MAAM,aAAqC;CACzC,MAAM;CACN,SAAS;CACT,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO;CACP,KAAK;CACN;AA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C;IAChC,YAAY;IACZ,QAAQ,oBAAoB,OAAO;IACpC,CAAC;AACF,WAAQ,OAAO,MAAM,EAAE;AACvB;;AAGF,MAAI,KAAK,WAAW,EAClB;EAIF,MAAM,UADa,MAAM,KAAK,IAAI,IAAI,KAAK,SAAS,SAAS,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CACtD,QAAQ,MAAM,CAAC,WAAW,EAAE,CAAC;EAOxD,MAAM,IAAI,MAAM,CAAC,SAAS,GANb,KAAK,KAAK,SACrB,QAAQ,KAAK,WACX,eAAe,QAAS,KAAiC,SAAS,KAAK,CACxE,CACF,CAEiC,EAAE;GAClC,QAAQ,oBAAoB,OAAO;GACnC,qBAAqB,WAAW,aAAa;AAC3C,WAAO,cAAc,KAAK,cAAc,KAAK,cAAc;;GAE9D,CAAC;AACF,UAAQ,OAAO,MAAM,EAAE;;CAE1B"}
1
+ {"version":3,"file":"logger-qz-Y4sBV.mjs","names":[],"sources":["../src/cli/shared/logger.ts"],"sourcesContent":["import { formatWithOptions, type InspectOptions } from \"node:util\";\nimport chalk from \"chalk\";\nimport { formatDistanceToNowStrict } from \"date-fns\";\nimport { getBorderCharacters, table } from \"table\";\n\n/**\n * Error thrown when a prompt is attempted in a CI environment\n */\nexport class CIPromptError extends Error {\n constructor(message?: string) {\n super(\n message ??\n \"Interactive prompts are not available in CI environments. Use --yes flag to skip confirmation prompts.\",\n );\n this.name = \"CIPromptError\";\n }\n}\n\n/**\n * Semantic style functions for inline text styling\n */\nexport const styles = {\n // Status colors\n success: chalk.green,\n error: chalk.red,\n warning: chalk.yellow,\n info: chalk.cyan,\n\n // Action colors (for change sets)\n create: chalk.green,\n update: chalk.yellow,\n delete: chalk.red,\n unchanged: chalk.gray,\n\n // Emphasis\n bold: chalk.bold,\n dim: chalk.gray,\n highlight: chalk.cyanBright,\n successBright: chalk.greenBright,\n errorBright: chalk.redBright,\n\n // Resource types\n resourceType: chalk.bold,\n resourceName: chalk.cyan,\n\n // File paths\n path: chalk.cyan,\n\n // Values\n value: chalk.white,\n placeholder: chalk.gray.italic,\n};\n\n/**\n * Standardized symbols for CLI output\n */\nexport const symbols = {\n success: chalk.green(\"\\u2713\"),\n error: chalk.red(\"\\u2716\"),\n warning: chalk.yellow(\"\\u26a0\"),\n info: chalk.cyan(\"i\"),\n create: chalk.green(\"+\"),\n update: chalk.yellow(\"~\"),\n delete: chalk.red(\"-\"),\n replace: chalk.magenta(\"\\u00b1\"),\n bullet: chalk.gray(\"\\u2022\"),\n arrow: chalk.gray(\"\\u2192\"),\n};\n\n/**\n * Log output modes\n */\nexport type LogMode = \"default\" | \"stream\" | \"plain\";\n\nexport interface LogOptions {\n /** Output mode (default: \"default\") */\n mode?: LogMode;\n /** Number of spaces to indent the entire line (default: 0) */\n indent?: number;\n}\n\n/** Field transformer function. null excludes the field from table output. */\nexport type FieldTransformer = ((value: unknown, item: object) => string) | null;\n\nexport interface OutOptions {\n /** Table display field transform/exclude settings. Only applied in table mode (not JSON). */\n display?: Record<string, FieldTransformer>;\n\n /** Show null values in table output (default: false) */\n showNull?: boolean;\n}\n\n// In JSON mode, all logs go to stderr to keep stdout clean for JSON data\nlet _jsonMode = false;\n\n// Type icons for log output\nconst TYPE_ICONS: Record<string, string> = {\n info: \"ℹ\",\n success: \"✔\",\n warn: \"⚠\",\n error: \"✖\",\n debug: \"⚙\",\n trace: \"→\",\n log: \"\",\n};\n\n// Color functions for icon and message text\nconst TYPE_COLORS: Record<string, (text: string) => string> = {\n info: chalk.cyan,\n success: chalk.green,\n warn: chalk.yellow,\n error: chalk.red,\n debug: chalk.gray,\n trace: chalk.gray,\n log: (text) => text,\n};\n\ninterface FormatLogLineOptions {\n mode: string;\n indent: number;\n type: string;\n message: string;\n timestamp?: string;\n}\n\n/**\n * Formats a log line with the appropriate prefix and indentation\n * @param opts - Formatting options\n * @returns Formatted log line\n */\nexport function formatLogLine(opts: FormatLogLineOptions): string {\n const { mode, indent, type, message, timestamp } = opts;\n const indentPrefix = indent > 0 ? \" \".repeat(indent) : \"\";\n const colorFn = TYPE_COLORS[type] || ((text: string) => text);\n\n // Plain mode: color only, no icon, no timestamp\n if (mode === \"plain\") {\n return `${indentPrefix}${colorFn(message)}\\n`;\n }\n\n // Default/Stream mode: with icon and color\n const icon = TYPE_ICONS[type] || \"\";\n const prefix = icon ? `${icon} ` : \"\";\n const coloredOutput = colorFn(`${prefix}${message}`);\n const timestampPrefix = timestamp ?? \"\";\n\n return `${indentPrefix}${timestampPrefix}${coloredOutput}\\n`;\n}\n\n/**\n * Writes a formatted log line to stderr.\n * @param type - Log type (info, success, warn, error, log)\n * @param message - Log message\n * @param opts - Log options (mode and indent)\n */\nfunction writeLog(type: string, message: string, opts?: LogOptions): void {\n const mode = opts?.mode ?? \"default\";\n const indent = opts?.indent ?? 0;\n const inspectOpts: InspectOptions = {\n breakLength: process.stdout.columns || 80,\n };\n const formattedMessage = formatWithOptions(inspectOpts, message);\n const timestamp = mode === \"stream\" ? `${new Date().toLocaleTimeString()} ` : \"\";\n const output = formatLogLine({ mode, indent, type, message: formattedMessage, timestamp });\n process.stderr.write(output);\n}\n\nexport const logger = {\n get jsonMode(): boolean {\n return _jsonMode;\n },\n set jsonMode(value: boolean) {\n _jsonMode = value;\n },\n\n info(message: string, opts?: LogOptions): void {\n writeLog(\"info\", message, opts);\n },\n\n success(message: string, opts?: LogOptions): void {\n writeLog(\"success\", message, opts);\n },\n\n warn(message: string, opts?: LogOptions): void {\n writeLog(\"warn\", message, opts);\n },\n\n error(message: string, opts?: LogOptions): void {\n writeLog(\"error\", message, opts);\n },\n\n log(message: string): void {\n writeLog(\"log\", message, { mode: \"plain\" });\n },\n\n newline(): void {\n process.stderr.write(\"\\n\");\n },\n\n debug(message: string): void {\n if (process.env.DEBUG === \"true\") {\n writeLog(\"log\", styles.dim(message), { mode: \"plain\" });\n }\n },\n\n out(data: string | object | object[], options?: OutOptions): void {\n if (typeof data === \"string\") {\n process.stdout.write(data.endsWith(\"\\n\") ? data : data + \"\\n\");\n return;\n }\n\n if (this.jsonMode) {\n // eslint-disable-next-line no-restricted-syntax\n console.log(JSON.stringify(data));\n return;\n }\n\n const display = options?.display;\n\n // Helper to format a value for table display\n const formatValue = (value: unknown, pretty = false): string => {\n if (options?.showNull && value === null) return \"NULL\";\n if (value === null || value === undefined) return \"N/A\";\n if (value instanceof Date) {\n return formatDistanceToNowStrict(value, { addSuffix: true });\n }\n if (typeof value === \"object\") {\n return pretty ? JSON.stringify(value, null, 2) : JSON.stringify(value);\n }\n return String(value);\n };\n\n // Helper to check if field should be excluded\n const isExcluded = (key: string): boolean => {\n return display !== undefined && key in display && display[key] === null;\n };\n\n // Helper to apply transformer or default formatting\n const transformValue = (key: string, value: unknown, item: object, pretty = false): string => {\n if (display && key in display) {\n const transformer = display[key];\n if (transformer) {\n return transformer(value, item);\n }\n }\n return formatValue(value, pretty);\n };\n\n if (!Array.isArray(data)) {\n const entries = Object.entries(data).filter(([key]) => !isExcluded(key));\n const formattedEntries = entries.map(([key, value]) => [\n key,\n transformValue(key, value, data, true),\n ]);\n const t = table(formattedEntries, {\n singleLine: false,\n border: getBorderCharacters(\"norc\"),\n });\n process.stdout.write(t);\n return;\n }\n\n if (data.length === 0) {\n return;\n }\n\n const allHeaders = Array.from(new Set(data.flatMap((item) => Object.keys(item))));\n const headers = allHeaders.filter((h) => !isExcluded(h));\n const rows = data.map((item) =>\n headers.map((header) =>\n transformValue(header, (item as Record<string, unknown>)[header], item),\n ),\n );\n\n const t = table([headers, ...rows], {\n border: getBorderCharacters(\"norc\"),\n drawHorizontalLine: (lineIndex, rowCount) => {\n return lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount;\n },\n });\n process.stdout.write(t);\n },\n};\n"],"mappings":";;;;;;;;;;AAQA,IAAa,gBAAb,cAAmC,MAAM;CACvC,YAAY,SAAkB;AAC5B,QACE,WACE,yGACH;AACD,OAAK,OAAO;;;;;;AAOhB,MAAa,SAAS;CAEpB,SAAS,MAAM;CACf,OAAO,MAAM;CACb,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K,cAAc,KAAK,cAAc;;GAE9D,CAAC;AACF,UAAQ,OAAO,MAAM,EAAE;;CAE1B"}
@@ -0,0 +1,5 @@
1
+
2
+ import "./chunk-COzJYswC.mjs";
3
+ import { t as readPackageJson } from "./package-json-VqyFvGiP.mjs";
4
+
5
+ export { readPackageJson };
@@ -1,3 +1,4 @@
1
+
1
2
  import { readPackageJSON } from "pkg-types";
2
3
 
3
4
  //#region src/cli/shared/package-json.ts
@@ -14,4 +15,4 @@ async function readPackageJson() {
14
15
 
15
16
  //#endregion
16
17
  export { readPackageJson as t };
17
- //# sourceMappingURL=package-json-D3x2nBPB.mjs.map
18
+ //# sourceMappingURL=package-json-VqyFvGiP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-json-D3x2nBPB.mjs","names":[],"sources":["../src/cli/shared/package-json.ts"],"sourcesContent":["import { readPackageJSON, type PackageJson } from \"pkg-types\";\n\nlet packageJson: PackageJson | null = null;\n\n/**\n * Read and cache the package.json of the SDK package.\n * @returns Parsed package.json contents\n */\nexport async function readPackageJson() {\n if (packageJson) {\n return packageJson;\n }\n packageJson = await readPackageJSON(import.meta.url);\n return packageJson;\n}\n"],"mappings":";;;AAEA,IAAI,cAAkC;;;;;AAMtC,eAAsB,kBAAkB;AACtC,KAAI,YACF,QAAO;AAET,eAAc,MAAM,gBAAgB,OAAO,KAAK,IAAI;AACpD,QAAO"}
1
+ {"version":3,"file":"package-json-VqyFvGiP.mjs","names":[],"sources":["../src/cli/shared/package-json.ts"],"sourcesContent":["import { readPackageJSON, type PackageJson } from \"pkg-types\";\n\nlet packageJson: PackageJson | null = null;\n\n/**\n * Read and cache the package.json of the SDK package.\n * @returns Parsed package.json contents\n */\nexport async function readPackageJson() {\n if (packageJson) {\n return packageJson;\n }\n packageJson = await readPackageJSON(import.meta.url);\n return packageJson;\n}\n"],"mappings":";;;;AAEA,IAAI,cAAkC;;;;;AAMtC,eAAsB,kBAAkB;AACtC,KAAI,YACF,QAAO;AAET,eAAc,MAAM,gBAAgB,OAAO,KAAK,IAAI;AACpD,QAAO"}
@@ -1,2 +1,3 @@
1
- import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-FZMBoUWm.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-vVGamLOw.mjs";
2
3
  export { EnumConstantsGeneratorID, enumConstantsPlugin };
@@ -1,4 +1,5 @@
1
- import "../../../chunk-DEt8GZDa.mjs";
2
- import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../enum-constants-D1nfn0qD.mjs";
1
+
2
+ import "../../../chunk-COzJYswC.mjs";
3
+ import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../enum-constants-CkKARYb7.mjs";
3
4
 
4
5
  export { EnumConstantsGeneratorID, enumConstantsPlugin };
@@ -1,2 +1,3 @@
1
- import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-D4Y81vh1.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-BQKAzTPA.mjs";
2
3
  export { FileUtilsGeneratorID, fileUtilsPlugin };
@@ -1,4 +1,5 @@
1
- import "../../../chunk-DEt8GZDa.mjs";
2
- import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../file-utils-Bctuzn3x.mjs";
1
+
2
+ import "../../../chunk-COzJYswC.mjs";
3
+ import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../file-utils-D2TxR_kj.mjs";
3
4
 
4
5
  export { FileUtilsGeneratorID, fileUtilsPlugin };
@@ -1,2 +1,3 @@
1
- import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-CxgBnxKM.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-CgMytw2A.mjs";
2
3
  export { KyselyGeneratorID, kyselyTypePlugin };
@@ -1,4 +1,5 @@
1
- import "../../../chunk-DEt8GZDa.mjs";
2
- import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../kysely-type-B_IecdK9.mjs";
1
+
2
+ import "../../../chunk-COzJYswC.mjs";
3
+ import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../kysely-type-BK0b4Rqt.mjs";
3
4
 
4
5
  export { KyselyGeneratorID, kyselyTypePlugin };
@@ -1,2 +1,3 @@
1
- import { n as seedPlugin, t as SeedGeneratorID } from "../../../index-CdDzh-T2.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { n as seedPlugin, t as SeedGeneratorID } from "../../../index-CoReoodF.mjs";
2
3
  export { SeedGeneratorID, seedPlugin };
@@ -1,4 +1,5 @@
1
- import "../../../chunk-DEt8GZDa.mjs";
2
- import { n as seedPlugin, t as SeedGeneratorID } from "../../../seed-CWkIDWMb.mjs";
1
+
2
+ import "../../../chunk-COzJYswC.mjs";
3
+ import { n as seedPlugin, t as SeedGeneratorID } from "../../../seed-BXrSEJbv.mjs";
3
4
 
4
5
  export { SeedGeneratorID, seedPlugin };
@@ -1,5 +1,6 @@
1
- import { z as TailorAnyDBType } from "../plugin-DyVYXZWz.mjs";
2
- import { n as TailorEnv, r as TailorActor } from "../env-BgdHfWDn.mjs";
1
+ /// <reference types="@tailor-platform/function-types" />
2
+ import { z as TailorAnyDBType } from "../plugin-IIDZW9GG.mjs";
3
+ import { n as TailorEnv, r as TailorActor } from "../env-BZLTIlIo.mjs";
3
4
 
4
5
  //#region src/plugin/with-context.d.ts
5
6
  /**
@@ -1,4 +1,5 @@
1
- import "../chunk-DEt8GZDa.mjs";
1
+
2
+ import "../chunk-COzJYswC.mjs";
2
3
  import * as fs from "node:fs";
3
4
  import * as path from "pathe";
4
5
  import { pathToFileURL } from "node:url";