@tailor-platform/sdk 1.25.0 → 1.25.2

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 (91) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{application-CxDvCZts.mjs → application-BGO3TtXi.mjs} +110 -68
  3. package/dist/application-BGO3TtXi.mjs.map +1 -0
  4. package/dist/application-C0lXqKBr.mjs +9 -0
  5. package/dist/brand-GZnI4eYb.mjs +36 -0
  6. package/dist/brand-GZnI4eYb.mjs.map +1 -0
  7. package/dist/chunk-Cz-A8uMR.mjs +3 -0
  8. package/dist/cli/index.d.mts +2 -3
  9. package/dist/cli/index.mjs +167 -211
  10. package/dist/cli/index.mjs.map +1 -1
  11. package/dist/cli/lib.d.mts +706 -1109
  12. package/dist/cli/lib.mjs +28 -16
  13. package/dist/cli/lib.mjs.map +1 -1
  14. package/dist/cli/skills.mjs +2 -1
  15. package/dist/cli/skills.mjs.map +1 -1
  16. package/dist/configure/index.d.mts +5 -5
  17. package/dist/configure/index.mjs +7 -6
  18. package/dist/configure/index.mjs.map +1 -1
  19. package/dist/{enum-constants-BxdLbhsW.mjs → enum-constants-6uK0VI_s.mjs} +1 -1
  20. package/dist/{enum-constants-BxdLbhsW.mjs.map → enum-constants-6uK0VI_s.mjs.map} +1 -1
  21. package/dist/{env-jndw86T4.d.mts → env-uBeVwE9B.d.mts} +4 -7
  22. package/dist/{file-utils-C2r3AVbI.mjs → file-utils-2T9w20FP.mjs} +1 -1
  23. package/dist/{file-utils-C2r3AVbI.mjs.map → file-utils-2T9w20FP.mjs.map} +1 -1
  24. package/dist/{index-Do7zo7z-.d.mts → index-BD-K97-C.d.mts} +2 -2
  25. package/dist/{index-VZq4IAEK.d.mts → index-CT53egux.d.mts} +2 -2
  26. package/dist/{index-DZRZdh71.d.mts → index-D1J5SfyK.d.mts} +2 -2
  27. package/dist/{index-BUnLWUKQ.d.mts → index-DuZRAsc3.d.mts} +25 -22
  28. package/dist/{index-DoxGF8-i.d.mts → index-cZilKprY.d.mts} +2 -2
  29. package/dist/{interceptor-DVy32eIG.mjs → interceptor-BPiIBTk_.mjs} +2 -1
  30. package/dist/{interceptor-DVy32eIG.mjs.map → interceptor-BPiIBTk_.mjs.map} +1 -1
  31. package/dist/{job-CnLRQFrk.mjs → job-DdfW7vH3.mjs} +4 -4
  32. package/dist/{job-CnLRQFrk.mjs.map → job-DdfW7vH3.mjs.map} +1 -1
  33. package/dist/kysely/index.d.mts +3 -4
  34. package/dist/kysely/index.mjs +1 -0
  35. package/dist/kysely/index.mjs.map +1 -1
  36. package/dist/{kysely-type-DzLBuVp6.mjs → kysely-type-cMNbsQ6k.mjs} +1 -1
  37. package/dist/{kysely-type-DzLBuVp6.mjs.map → kysely-type-cMNbsQ6k.mjs.map} +1 -1
  38. package/dist/package-json-Bj76LPsV.mjs +4 -0
  39. package/dist/{package-json-DnbGCOkg.mjs → package-json-CVUv8Y9T.mjs} +1 -1
  40. package/dist/{package-json-DnbGCOkg.mjs.map → package-json-CVUv8Y9T.mjs.map} +1 -1
  41. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -2
  42. package/dist/plugin/builtin/enum-constants/index.mjs +2 -1
  43. package/dist/plugin/builtin/file-utils/index.d.mts +1 -2
  44. package/dist/plugin/builtin/file-utils/index.mjs +2 -1
  45. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -2
  46. package/dist/plugin/builtin/kysely-type/index.mjs +2 -1
  47. package/dist/plugin/builtin/seed/index.d.mts +1 -2
  48. package/dist/plugin/builtin/seed/index.mjs +2 -1
  49. package/dist/plugin/index.d.mts +2 -3
  50. package/dist/plugin/index.mjs +5 -4
  51. package/dist/plugin/index.mjs.map +1 -1
  52. package/dist/{plugin-3sT6Tcq0.d.mts → plugin-zY5wvV82.d.mts} +117 -225
  53. package/dist/{query-c9RCJduH.mjs → query-CRSZGUmD.mjs} +445 -509
  54. package/dist/query-CRSZGUmD.mjs.map +1 -0
  55. package/dist/{schema-DOx_W_s2.mjs → schema-BePzTFBV.mjs} +10 -10
  56. package/dist/schema-BePzTFBV.mjs.map +1 -0
  57. package/dist/seed/index.d.mts +1 -4
  58. package/dist/seed/index.mjs +1 -0
  59. package/dist/seed/index.mjs.map +1 -1
  60. package/dist/{seed-DkKAheSe.mjs → seed-CCVRLibh.mjs} +24 -10
  61. package/dist/seed-CCVRLibh.mjs.map +1 -0
  62. package/dist/{telemetry-d_lgTL33.mjs → telemetry-0w8OupuQ.mjs} +2 -2
  63. package/dist/{telemetry-d_lgTL33.mjs.map → telemetry-0w8OupuQ.mjs.map} +1 -1
  64. package/dist/telemetry-DDQZRqHK.mjs +4 -0
  65. package/dist/utils/test/index.d.mts +2 -3
  66. package/dist/utils/test/index.mjs +3 -2
  67. package/dist/utils/test/index.mjs.map +1 -1
  68. package/dist/{app-config-QzNOFnEy.d.mts → workflow.generated-v1LXRuB6.d.mts} +19 -22
  69. package/docs/cli/application.md +73 -33
  70. package/docs/cli/auth.md +56 -24
  71. package/docs/cli/completion.md +6 -0
  72. package/docs/cli/executor.md +73 -36
  73. package/docs/cli/function.md +30 -14
  74. package/docs/cli/secret.md +93 -41
  75. package/docs/cli/staticwebsite.md +38 -17
  76. package/docs/cli/tailordb.md +106 -48
  77. package/docs/cli/user.md +74 -10
  78. package/docs/cli/workflow.md +70 -39
  79. package/docs/cli/workspace.md +166 -60
  80. package/docs/cli-reference.md +22 -12
  81. package/docs/services/workflow.md +26 -0
  82. package/package.json +5 -5
  83. package/dist/application-CxDvCZts.mjs.map +0 -1
  84. package/dist/application-EQCsho6Z.mjs +0 -8
  85. package/dist/brand-j6C6_sGq.mjs +0 -28
  86. package/dist/brand-j6C6_sGq.mjs.map +0 -1
  87. package/dist/package-json-BKA36WTo.mjs +0 -3
  88. package/dist/query-c9RCJduH.mjs.map +0 -1
  89. package/dist/schema-DOx_W_s2.mjs.map +0 -1
  90. package/dist/seed-DkKAheSe.mjs.map +0 -1
  91. package/dist/telemetry-J6dpByo2.mjs +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry-d_lgTL33.mjs","names":[],"sources":["../src/cli/telemetry/config.ts","../src/cli/telemetry/index.ts"],"sourcesContent":["/**\n * Telemetry configuration parsed from standard OpenTelemetry environment variables.\n * Tracing is enabled when OTEL_EXPORTER_OTLP_ENDPOINT is set.\n */\nexport interface TelemetryConfig {\n readonly enabled: boolean;\n readonly endpoint: string;\n}\n\n/**\n * Parse telemetry configuration from standard OpenTelemetry environment variables.\n * Tracing is enabled when OTEL_EXPORTER_OTLP_ENDPOINT is set.\n * @returns Telemetry configuration\n */\nexport function parseTelemetryConfig(): TelemetryConfig {\n const endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? \"\";\n const enabled = endpoint.length > 0;\n\n return {\n enabled,\n endpoint,\n };\n}\n","import { trace, SpanStatusCode, type Span } from \"@opentelemetry/api\";\nimport { parseTelemetryConfig, type TelemetryConfig } from \"./config\";\n\nlet _config: TelemetryConfig | undefined;\nlet _initialized = false;\nlet _provider: { register: () => void; shutdown: () => Promise<void> } | undefined;\n\n/**\n * Check whether telemetry is currently enabled.\n * @returns true if telemetry has been initialized and is enabled\n */\nexport function isTelemetryEnabled(): boolean {\n return _config?.enabled ?? false;\n}\n\n/**\n * Initialize telemetry if OTEL_EXPORTER_OTLP_ENDPOINT is set.\n * When disabled, this is a no-op with zero overhead beyond reading env vars.\n * @returns Promise that resolves when initialization completes\n */\nexport async function initTelemetry(): Promise<void> {\n if (_initialized) return;\n _initialized = true;\n\n _config = parseTelemetryConfig();\n if (!_config.enabled) return;\n\n // Dynamic imports - only loaded when tracing is enabled\n const [\n { NodeTracerProvider, BatchSpanProcessor },\n { OTLPTraceExporter },\n { resourceFromAttributes },\n { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION },\n { readPackageJson },\n ] = await Promise.all([\n import(\"@opentelemetry/sdk-trace-node\"),\n import(\"@opentelemetry/exporter-trace-otlp-proto\"),\n import(\"@opentelemetry/resources\"),\n import(\"@opentelemetry/semantic-conventions\"),\n import(\"@/cli/shared/package-json\"),\n ]);\n\n const packageJson = await readPackageJson();\n const version = packageJson.version ?? \"unknown\";\n\n const resource = resourceFromAttributes({\n [ATTR_SERVICE_NAME]: \"tailor-sdk\",\n [ATTR_SERVICE_VERSION]: version,\n });\n\n const exporter = new OTLPTraceExporter({\n url: `${_config.endpoint}/v1/traces`,\n });\n\n _provider = new NodeTracerProvider({\n resource,\n spanProcessors: [new BatchSpanProcessor(exporter)],\n });\n\n _provider.register();\n}\n\n/**\n * Shutdown the telemetry provider, flushing all pending spans.\n * Must be called before process exit to ensure traces are exported.\n * @returns Promise that resolves when shutdown completes\n */\nexport async function shutdownTelemetry(): Promise<void> {\n if (!_provider) return;\n await _provider.shutdown();\n}\n\n/**\n * Execute a function within a new span. Records exceptions and sets span status.\n * When no TracerProvider is registered, the OTel API automatically provides\n * noop spans with zero overhead.\n * @param name - Span name\n * @param fn - Function to execute within the span\n * @returns Result of fn\n */\nexport async function withSpan<T>(name: string, fn: (span: Span) => Promise<T>): Promise<T> {\n const tracer = trace.getTracer(\"tailor-sdk\");\n\n return tracer.startActiveSpan(name, async (span) => {\n try {\n const result = await fn(span);\n span.setStatus({ code: SpanStatusCode.OK });\n return result;\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"],"mappings":";;;;;;;;AAcA,SAAgB,uBAAwC;CACtD,MAAM,WAAW,QAAQ,IAAI,+BAA+B;AAG5D,QAAO;EACL,SAHc,SAAS,SAAS;EAIhC;EACD;;;;;AClBH,IAAI;AACJ,IAAI,eAAe;AACnB,IAAI;;;;;;AAeJ,eAAsB,gBAA+B;AACnD,KAAI,aAAc;AAClB,gBAAe;AAEf,WAAU,sBAAsB;AAChC,KAAI,CAAC,QAAQ,QAAS;CAGtB,MAAM,CACJ,EAAE,oBAAoB,sBACtB,EAAE,qBACF,EAAE,0BACF,EAAE,mBAAmB,wBACrB,EAAE,qBACA,MAAM,QAAQ,IAAI;EACpB,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;EACR,CAAC;CAGF,MAAM,WADc,MAAM,iBAAiB,EACf,WAAW;AAWvC,aAAY,IAAI,mBAAmB;EACjC,UAVe,uBAAuB;IACrC,oBAAoB;IACpB,uBAAuB;GACzB,CAAC;EAQA,gBAAgB,CAAC,IAAI,mBANN,IAAI,kBAAkB,EACrC,KAAK,GAAG,QAAQ,SAAS,aAC1B,CAAC,CAIiD,CAAC;EACnD,CAAC;AAEF,WAAU,UAAU;;;;;;;AAQtB,eAAsB,oBAAmC;AACvD,KAAI,CAAC,UAAW;AAChB,OAAM,UAAU,UAAU;;;;;;;;;;AAW5B,eAAsB,SAAY,MAAc,IAA4C;AAG1F,QAFe,MAAM,UAAU,aAAa,CAE9B,gBAAgB,MAAM,OAAO,SAAS;AAClD,MAAI;GACF,MAAM,SAAS,MAAM,GAAG,KAAK;AAC7B,QAAK,UAAU,EAAE,MAAM,eAAe,IAAI,CAAC;AAC3C,UAAO;WACA,OAAO;AACd,QAAK,UAAU,EAAE,MAAM,eAAe,OAAO,CAAC;AAC9C,OAAI,iBAAiB,MACnB,MAAK,gBAAgB,MAAM;AAE7B,SAAM;YACE;AACR,QAAK,KAAK;;GAEZ"}
1
+ {"version":3,"file":"telemetry-0w8OupuQ.mjs","names":[],"sources":["../src/cli/telemetry/config.ts","../src/cli/telemetry/index.ts"],"sourcesContent":["/**\n * Telemetry configuration parsed from standard OpenTelemetry environment variables.\n * Tracing is enabled when OTEL_EXPORTER_OTLP_ENDPOINT is set.\n */\nexport interface TelemetryConfig {\n readonly enabled: boolean;\n readonly endpoint: string;\n}\n\n/**\n * Parse telemetry configuration from standard OpenTelemetry environment variables.\n * Tracing is enabled when OTEL_EXPORTER_OTLP_ENDPOINT is set.\n * @returns Telemetry configuration\n */\nexport function parseTelemetryConfig(): TelemetryConfig {\n const endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? \"\";\n const enabled = endpoint.length > 0;\n\n return {\n enabled,\n endpoint,\n };\n}\n","import { trace, SpanStatusCode, type Span } from \"@opentelemetry/api\";\nimport { parseTelemetryConfig, type TelemetryConfig } from \"./config\";\n\nlet _config: TelemetryConfig | undefined;\nlet _initialized = false;\nlet _provider: { register: () => void; shutdown: () => Promise<void> } | undefined;\n\n/**\n * Check whether telemetry is currently enabled.\n * @returns true if telemetry has been initialized and is enabled\n */\nexport function isTelemetryEnabled(): boolean {\n return _config?.enabled ?? false;\n}\n\n/**\n * Initialize telemetry if OTEL_EXPORTER_OTLP_ENDPOINT is set.\n * When disabled, this is a no-op with zero overhead beyond reading env vars.\n * @returns Promise that resolves when initialization completes\n */\nexport async function initTelemetry(): Promise<void> {\n if (_initialized) return;\n _initialized = true;\n\n _config = parseTelemetryConfig();\n if (!_config.enabled) return;\n\n // Dynamic imports - only loaded when tracing is enabled\n const [\n { NodeTracerProvider, BatchSpanProcessor },\n { OTLPTraceExporter },\n { resourceFromAttributes },\n { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION },\n { readPackageJson },\n ] = await Promise.all([\n import(\"@opentelemetry/sdk-trace-node\"),\n import(\"@opentelemetry/exporter-trace-otlp-proto\"),\n import(\"@opentelemetry/resources\"),\n import(\"@opentelemetry/semantic-conventions\"),\n import(\"@/cli/shared/package-json\"),\n ]);\n\n const packageJson = await readPackageJson();\n const version = packageJson.version ?? \"unknown\";\n\n const resource = resourceFromAttributes({\n [ATTR_SERVICE_NAME]: \"tailor-sdk\",\n [ATTR_SERVICE_VERSION]: version,\n });\n\n const exporter = new OTLPTraceExporter({\n url: `${_config.endpoint}/v1/traces`,\n });\n\n _provider = new NodeTracerProvider({\n resource,\n spanProcessors: [new BatchSpanProcessor(exporter)],\n });\n\n _provider.register();\n}\n\n/**\n * Shutdown the telemetry provider, flushing all pending spans.\n * Must be called before process exit to ensure traces are exported.\n * @returns Promise that resolves when shutdown completes\n */\nexport async function shutdownTelemetry(): Promise<void> {\n if (!_provider) return;\n await _provider.shutdown();\n}\n\n/**\n * Execute a function within a new span. Records exceptions and sets span status.\n * When no TracerProvider is registered, the OTel API automatically provides\n * noop spans with zero overhead.\n * @param name - Span name\n * @param fn - Function to execute within the span\n * @returns Result of fn\n */\nexport async function withSpan<T>(name: string, fn: (span: Span) => Promise<T>): Promise<T> {\n const tracer = trace.getTracer(\"tailor-sdk\");\n\n return tracer.startActiveSpan(name, async (span) => {\n try {\n const result = await fn(span);\n span.setStatus({ code: SpanStatusCode.OK });\n return result;\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"],"mappings":";;;;;;;;AAcA,SAAgB,uBAAwC;CACtD,MAAM,WAAW,QAAQ,IAAI,+BAA+B;AAG5D,QAAO;EACL,SAHc,SAAS,SAAS;EAIhC;EACD;;;;;AClBH,IAAI;AACJ,IAAI,eAAe;AACnB,IAAI;;;;;;AAeJ,eAAsB,gBAA+B;AACnD,KAAI,aAAc;AAClB,gBAAe;AAEf,WAAU,sBAAsB;AAChC,KAAI,CAAC,QAAQ,QAAS;CAGtB,MAAM,CACJ,EAAE,oBAAoB,sBACtB,EAAE,qBACF,EAAE,0BACF,EAAE,mBAAmB,wBACrB,EAAE,qBACA,MAAM,QAAQ,IAAI;EACpB,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;EACP,OAAO;EACR,CAAC;CAGF,MAAM,WADc,MAAM,iBAAiB,EACf,WAAW;AAWvC,aAAY,IAAI,mBAAmB;EACjC,UAVe,uBAAuB;IACrC,oBAAoB;IACpB,uBAAuB;GACzB,CAAC;EAQA,gBAAgB,CAAC,IAAI,mBANN,IAAI,kBAAkB,EACrC,KAAK,GAAG,QAAQ,SAAS,aAC1B,CAAC,CAIiD,CAAC;EACnD,CAAC;AAEF,WAAU,UAAU;;;;;;;AAQtB,eAAsB,oBAAmC;AACvD,KAAI,CAAC,UAAW;AAChB,OAAM,UAAU,UAAU;;;;;;;;;;AAW5B,eAAsB,SAAY,MAAc,IAA4C;AAG1F,QAFe,MAAM,UAAU,aAAa,CAE9B,gBAAgB,MAAM,OAAO,SAAS;AAClD,MAAI;GACF,MAAM,SAAS,MAAM,GAAG,KAAK;AAC7B,QAAK,UAAU,EAAE,MAAM,eAAe,IAAI,CAAC;AAC3C,UAAO;WACA,OAAO;AACd,QAAK,UAAU,EAAE,MAAM,eAAe,OAAO,CAAC;AAC9C,OAAI,iBAAiB,MACnB,MAAK,gBAAgB,MAAM;AAE7B,SAAM;YACE;AACR,QAAK,KAAK;;GAEZ"}
@@ -0,0 +1,4 @@
1
+ import "./chunk-Cz-A8uMR.mjs";
2
+ import { n as shutdownTelemetry, r as withSpan, t as initTelemetry } from "./telemetry-0w8OupuQ.mjs";
3
+
4
+ export { initTelemetry, shutdownTelemetry };
@@ -1,6 +1,5 @@
1
- import { V as TailorDBType, tt as TailorField } from "../../plugin-3sT6Tcq0.mjs";
2
- import "../../app-config-QzNOFnEy.mjs";
3
- import { G as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-BUnLWUKQ.mjs";
1
+ import { V as TailorDBType, tt as TailorField } from "../../plugin-zY5wvV82.mjs";
2
+ import { G as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-DuZRAsc3.mjs";
4
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
4
 
6
5
  //#region src/utils/test/mock.d.ts
@@ -1,5 +1,6 @@
1
- import "../../brand-j6C6_sGq.mjs";
2
- import { t as WORKFLOW_TEST_ENV_KEY } from "../../job-CnLRQFrk.mjs";
1
+ import "../../chunk-Cz-A8uMR.mjs";
2
+ import "../../brand-GZnI4eYb.mjs";
3
+ import { t as WORKFLOW_TEST_ENV_KEY } from "../../job-DdfW7vH3.mjs";
3
4
  import { pathToFileURL } from "node:url";
4
5
  import * as path from "node:path";
5
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/utils/test/mock.ts","../../../src/utils/test/index.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\n\ntype MainFunction = (args: Record<string, unknown>) => unknown | Promise<unknown>;\ntype QueryResolver = (query: string, params: unknown[]) => unknown[];\ntype JobHandler = (jobName: string, args: unknown) => unknown;\n\ninterface TailordbGlobal {\n tailordb?: {\n Client: new (config: { namespace?: string }) => {\n connect(): Promise<void> | void;\n end(): Promise<void> | void;\n queryObject(\n query: string,\n params?: unknown[],\n ): Promise<{ rows: unknown[] }> | { rows: unknown[] };\n };\n };\n tailor?: {\n workflow: {\n triggerJobFunction: (jobName: string, args: unknown) => unknown;\n };\n };\n}\n\nconst GlobalThis = globalThis as TailordbGlobal;\n\n/**\n * Sets up a mock for `globalThis.tailordb.Client` used in bundled resolver/executor tests.\n * @param resolver - Optional function to resolve query results. Defaults to returning empty arrays.\n * @returns Object containing arrays of executed queries and created clients for assertions.\n */\nexport function setupTailordbMock(resolver: QueryResolver = () => []): {\n executedQueries: { query: string; params: unknown[] }[];\n createdClients: { namespace?: string; ended: boolean }[];\n} {\n const executedQueries: { query: string; params: unknown[] }[] = [];\n const createdClients: { namespace?: string; ended: boolean }[] = [];\n\n class MockTailordbClient {\n private record: { namespace?: string; ended: boolean };\n\n constructor({ namespace }: { namespace?: string }) {\n this.record = { namespace, ended: false };\n createdClients.push(this.record);\n }\n\n async connect(): Promise<void> {\n /* noop */\n }\n\n async end(): Promise<void> {\n this.record.ended = true;\n }\n\n async queryObject(query: string, params: unknown[] = []): Promise<{ rows: unknown[] }> {\n executedQueries.push({ query, params });\n return { rows: resolver(query, params) ?? [] };\n }\n }\n\n GlobalThis.tailordb = {\n Client: MockTailordbClient,\n } as typeof GlobalThis.tailordb;\n\n return { executedQueries, createdClients };\n}\n\n/**\n * Sets up a mock for `globalThis.tailor.workflow.triggerJobFunction` used in bundled workflow tests.\n * @param handler - Function that handles triggered job calls and returns results.\n * @returns Object containing an array of triggered jobs for assertions.\n */\nexport function setupWorkflowMock(handler: JobHandler): {\n triggeredJobs: { jobName: string; args: unknown }[];\n} {\n const triggeredJobs: { jobName: string; args: unknown }[] = [];\n\n GlobalThis.tailor = {\n ...GlobalThis.tailor,\n workflow: {\n triggerJobFunction: (jobName: string, args: unknown) => {\n triggeredJobs.push({ jobName, args });\n return handler(jobName, args);\n },\n },\n } as typeof GlobalThis.tailor;\n\n return { triggeredJobs };\n}\n\n/**\n * Creates a function that imports a bundled JS file and returns its `main` export.\n * Used to test bundled output from `apply --buildOnly`.\n * @param baseDir - Base directory where bundled files are located.\n * @returns An async function that takes a relative path and returns the `main` function.\n */\nexport function createImportMain(baseDir: string): (relativePath: string) => Promise<MainFunction> {\n return async (relativePath: string): Promise<MainFunction> => {\n const fileUrl = pathToFileURL(path.join(baseDir, relativePath));\n fileUrl.searchParams.set(\"v\", `${Date.now()}-${Math.random()}`);\n const module = await import(fileUrl.href);\n const main = module.main;\n if (typeof main !== \"function\") {\n throw new Error(`Expected \"main\" to be a function in ${relativePath}, got ${typeof main}`);\n }\n return main;\n };\n}\n","import type { output, TailorUser } from \"@/configure\";\nimport type { TailorDBType } from \"@/configure/services/tailordb/schema\";\nimport type { TailorField } from \"@/configure/types/type\";\nimport type { StandardSchemaV1 } from \"@standard-schema/spec\";\n\nexport { WORKFLOW_TEST_ENV_KEY } from \"@/configure/services/workflow/job\";\nexport { setupTailordbMock, setupWorkflowMock, createImportMain } from \"./mock\";\n\n/** Represents an unauthenticated user in the Tailor platform. */\nexport const unauthenticatedTailorUser = {\n id: \"00000000-0000-0000-0000-000000000000\",\n type: \"\",\n workspaceId: \"00000000-0000-0000-0000-000000000000\",\n attributes: null,\n attributeList: [],\n} as const satisfies TailorUser;\n\n/**\n * Creates a hook function that processes TailorDB type fields\n * - Uses existing id from data if provided, otherwise generates UUID for id fields\n * - Recursively processes nested types\n * - Executes hooks.create for fields with create hooks\n * @template T - The output type of the hook function\n * @param type - TailorDB type definition\n * @returns A function that transforms input data according to field hooks\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createTailorDBHook<T extends TailorDBType<any, any>>(type: T) {\n return (data: unknown) => {\n return Object.entries(type.fields).reduce(\n (hooked, [key, value]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const field = value as TailorField<any, any, any>;\n if (key === \"id\") {\n // Use existing id from data if provided, otherwise generate new UUID\n const existingId =\n data && typeof data === \"object\" ? (data as Record<string, unknown>)[key] : undefined;\n hooked[key] = existingId ?? crypto.randomUUID();\n } else if (field.type === \"nested\") {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hooked[key] = createTailorDBHook({ fields: field.fields } as any)(\n (data as Record<string, unknown>)[key],\n );\n } else if (field.metadata.hooks?.create) {\n hooked[key] = field.metadata.hooks.create({\n value: (data as Record<string, unknown>)[key],\n data: data,\n user: unauthenticatedTailorUser,\n });\n if (hooked[key] instanceof Date) {\n hooked[key] = hooked[key].toISOString();\n }\n } else if (data && typeof data === \"object\") {\n hooked[key] = (data as Record<string, unknown>)[key];\n }\n return hooked;\n },\n {} as Record<string, unknown>,\n ) as Partial<output<T>>;\n };\n}\n\n/**\n * Creates the standard schema definition for lines-db\n * This returns the first argument for defineSchema with the ~standard section\n * @template T - The output type after validation\n * @param schemaType - TailorDB field schema for validation\n * @param hook - Hook function to transform data before validation\n * @returns Schema object with ~standard section for defineSchema\n */\nexport function createStandardSchema<T = Record<string, unknown>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schemaType: TailorField<any, T>,\n hook: (data: unknown) => Partial<T>,\n) {\n return {\n \"~standard\": {\n version: 1,\n vendor: \"@tailor-platform/sdk\",\n validate: (value: unknown) => {\n const hooked = hook(value);\n const result = schemaType.parse({\n value: hooked,\n data: hooked,\n user: unauthenticatedTailorUser,\n });\n if (result.issues) {\n return result;\n }\n return { value: hooked as T };\n },\n },\n } as const satisfies StandardSchemaV1<T>;\n}\n"],"mappings":";;;;;;AAyBA,MAAM,aAAa;;;;;;AAOnB,SAAgB,kBAAkB,iBAAgC,EAAE,EAGlE;CACA,MAAM,kBAA0D,EAAE;CAClE,MAAM,iBAA2D,EAAE;CAEnE,MAAM,mBAAmB;EACvB,AAAQ;EAER,YAAY,EAAE,aAAqC;AACjD,QAAK,SAAS;IAAE;IAAW,OAAO;IAAO;AACzC,kBAAe,KAAK,KAAK,OAAO;;EAGlC,MAAM,UAAyB;EAI/B,MAAM,MAAqB;AACzB,QAAK,OAAO,QAAQ;;EAGtB,MAAM,YAAY,OAAe,SAAoB,EAAE,EAAgC;AACrF,mBAAgB,KAAK;IAAE;IAAO;IAAQ,CAAC;AACvC,UAAO,EAAE,MAAM,SAAS,OAAO,OAAO,IAAI,EAAE,EAAE;;;AAIlD,YAAW,WAAW,EACpB,QAAQ,oBACT;AAED,QAAO;EAAE;EAAiB;EAAgB;;;;;;;AAQ5C,SAAgB,kBAAkB,SAEhC;CACA,MAAM,gBAAsD,EAAE;AAE9D,YAAW,SAAS;EAClB,GAAG,WAAW;EACd,UAAU,EACR,qBAAqB,SAAiB,SAAkB;AACtD,iBAAc,KAAK;IAAE;IAAS;IAAM,CAAC;AACrC,UAAO,QAAQ,SAAS,KAAK;KAEhC;EACF;AAED,QAAO,EAAE,eAAe;;;;;;;;AAS1B,SAAgB,iBAAiB,SAAkE;AACjG,QAAO,OAAO,iBAAgD;EAC5D,MAAM,UAAU,cAAc,KAAK,KAAK,SAAS,aAAa,CAAC;AAC/D,UAAQ,aAAa,IAAI,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,QAAQ,GAAG;EAE/D,MAAM,QADS,MAAM,OAAO,QAAQ,OAChB;AACpB,MAAI,OAAO,SAAS,WAClB,OAAM,IAAI,MAAM,uCAAuC,aAAa,QAAQ,OAAO,OAAO;AAE5F,SAAO;;;;;;;ACjGX,MAAa,4BAA4B;CACvC,IAAI;CACJ,MAAM;CACN,aAAa;CACb,YAAY;CACZ,eAAe,EAAE;CAClB;;;;;;;;;;AAYD,SAAgB,mBAAqD,MAAS;AAC5E,SAAQ,SAAkB;AACxB,SAAO,OAAO,QAAQ,KAAK,OAAO,CAAC,QAChC,QAAQ,CAAC,KAAK,WAAW;GAExB,MAAM,QAAQ;AACd,OAAI,QAAQ,KAIV,QAAO,QADL,QAAQ,OAAO,SAAS,WAAY,KAAiC,OAAO,WAClD,OAAO,YAAY;YACtC,MAAM,SAAS,SAExB,QAAO,OAAO,mBAAmB,EAAE,QAAQ,MAAM,QAAQ,CAAQ,CAC9D,KAAiC,KACnC;YACQ,MAAM,SAAS,OAAO,QAAQ;AACvC,WAAO,OAAO,MAAM,SAAS,MAAM,OAAO;KACxC,OAAQ,KAAiC;KACnC;KACN,MAAM;KACP,CAAC;AACF,QAAI,OAAO,gBAAgB,KACzB,QAAO,OAAO,OAAO,KAAK,aAAa;cAEhC,QAAQ,OAAO,SAAS,SACjC,QAAO,OAAQ,KAAiC;AAElD,UAAO;KAET,EAAE,CACH;;;;;;;;;;;AAYL,SAAgB,qBAEd,YACA,MACA;AACA,QAAO,EACL,aAAa;EACX,SAAS;EACT,QAAQ;EACR,WAAW,UAAmB;GAC5B,MAAM,SAAS,KAAK,MAAM;GAC1B,MAAM,SAAS,WAAW,MAAM;IAC9B,OAAO;IACP,MAAM;IACN,MAAM;IACP,CAAC;AACF,OAAI,OAAO,OACT,QAAO;AAET,UAAO,EAAE,OAAO,QAAa;;EAEhC,EACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/utils/test/mock.ts","../../../src/utils/test/index.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\n\ntype MainFunction = (args: Record<string, unknown>) => unknown | Promise<unknown>;\ntype QueryResolver = (query: string, params: unknown[]) => unknown[];\ntype JobHandler = (jobName: string, args: unknown) => unknown;\n\ninterface TailordbGlobal {\n tailordb?: {\n Client: new (config: { namespace?: string }) => {\n connect(): Promise<void> | void;\n end(): Promise<void> | void;\n queryObject(\n query: string,\n params?: unknown[],\n ): Promise<{ rows: unknown[] }> | { rows: unknown[] };\n };\n };\n tailor?: {\n workflow: {\n triggerJobFunction: (jobName: string, args: unknown) => unknown;\n };\n };\n}\n\nconst GlobalThis = globalThis as TailordbGlobal;\n\n/**\n * Sets up a mock for `globalThis.tailordb.Client` used in bundled resolver/executor tests.\n * @param resolver - Optional function to resolve query results. Defaults to returning empty arrays.\n * @returns Object containing arrays of executed queries and created clients for assertions.\n */\nexport function setupTailordbMock(resolver: QueryResolver = () => []): {\n executedQueries: { query: string; params: unknown[] }[];\n createdClients: { namespace?: string; ended: boolean }[];\n} {\n const executedQueries: { query: string; params: unknown[] }[] = [];\n const createdClients: { namespace?: string; ended: boolean }[] = [];\n\n class MockTailordbClient {\n private record: { namespace?: string; ended: boolean };\n\n constructor({ namespace }: { namespace?: string }) {\n this.record = { namespace, ended: false };\n createdClients.push(this.record);\n }\n\n async connect(): Promise<void> {\n /* noop */\n }\n\n async end(): Promise<void> {\n this.record.ended = true;\n }\n\n async queryObject(query: string, params: unknown[] = []): Promise<{ rows: unknown[] }> {\n executedQueries.push({ query, params });\n return { rows: resolver(query, params) ?? [] };\n }\n }\n\n GlobalThis.tailordb = {\n Client: MockTailordbClient,\n } as typeof GlobalThis.tailordb;\n\n return { executedQueries, createdClients };\n}\n\n/**\n * Sets up a mock for `globalThis.tailor.workflow.triggerJobFunction` used in bundled workflow tests.\n * @param handler - Function that handles triggered job calls and returns results.\n * @returns Object containing an array of triggered jobs for assertions.\n */\nexport function setupWorkflowMock(handler: JobHandler): {\n triggeredJobs: { jobName: string; args: unknown }[];\n} {\n const triggeredJobs: { jobName: string; args: unknown }[] = [];\n\n GlobalThis.tailor = {\n ...GlobalThis.tailor,\n workflow: {\n triggerJobFunction: (jobName: string, args: unknown) => {\n triggeredJobs.push({ jobName, args });\n return handler(jobName, args);\n },\n },\n } as typeof GlobalThis.tailor;\n\n return { triggeredJobs };\n}\n\n/**\n * Creates a function that imports a bundled JS file and returns its `main` export.\n * Used to test bundled output from `apply --buildOnly`.\n * @param baseDir - Base directory where bundled files are located.\n * @returns An async function that takes a relative path and returns the `main` function.\n */\nexport function createImportMain(baseDir: string): (relativePath: string) => Promise<MainFunction> {\n return async (relativePath: string): Promise<MainFunction> => {\n const fileUrl = pathToFileURL(path.join(baseDir, relativePath));\n fileUrl.searchParams.set(\"v\", `${Date.now()}-${Math.random()}`);\n const module = await import(fileUrl.href);\n const main = module.main;\n if (typeof main !== \"function\") {\n throw new Error(`Expected \"main\" to be a function in ${relativePath}, got ${typeof main}`);\n }\n return main;\n };\n}\n","import type { output, TailorUser } from \"@/configure\";\nimport type { TailorDBType } from \"@/configure/services/tailordb/schema\";\nimport type { TailorField } from \"@/configure/types/type\";\nimport type { StandardSchemaV1 } from \"@standard-schema/spec\";\n\nexport { WORKFLOW_TEST_ENV_KEY } from \"@/configure/services/workflow/job\";\nexport { setupTailordbMock, setupWorkflowMock, createImportMain } from \"./mock\";\n\n/** Represents an unauthenticated user in the Tailor platform. */\nexport const unauthenticatedTailorUser = {\n id: \"00000000-0000-0000-0000-000000000000\",\n type: \"\",\n workspaceId: \"00000000-0000-0000-0000-000000000000\",\n attributes: null,\n attributeList: [],\n} as const satisfies TailorUser;\n\n/**\n * Creates a hook function that processes TailorDB type fields\n * - Uses existing id from data if provided, otherwise generates UUID for id fields\n * - Recursively processes nested types\n * - Executes hooks.create for fields with create hooks\n * @template T - The output type of the hook function\n * @param type - TailorDB type definition\n * @returns A function that transforms input data according to field hooks\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createTailorDBHook<T extends TailorDBType<any, any>>(type: T) {\n return (data: unknown) => {\n return Object.entries(type.fields).reduce(\n (hooked, [key, value]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const field = value as TailorField<any, any, any>;\n if (key === \"id\") {\n // Use existing id from data if provided, otherwise generate new UUID\n const existingId =\n data && typeof data === \"object\" ? (data as Record<string, unknown>)[key] : undefined;\n hooked[key] = existingId ?? crypto.randomUUID();\n } else if (field.type === \"nested\") {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hooked[key] = createTailorDBHook({ fields: field.fields } as any)(\n (data as Record<string, unknown>)[key],\n );\n } else if (field.metadata.hooks?.create) {\n hooked[key] = field.metadata.hooks.create({\n value: (data as Record<string, unknown>)[key],\n data: data,\n user: unauthenticatedTailorUser,\n });\n if (hooked[key] instanceof Date) {\n hooked[key] = hooked[key].toISOString();\n }\n } else if (data && typeof data === \"object\") {\n hooked[key] = (data as Record<string, unknown>)[key];\n }\n return hooked;\n },\n {} as Record<string, unknown>,\n ) as Partial<output<T>>;\n };\n}\n\n/**\n * Creates the standard schema definition for lines-db\n * This returns the first argument for defineSchema with the ~standard section\n * @template T - The output type after validation\n * @param schemaType - TailorDB field schema for validation\n * @param hook - Hook function to transform data before validation\n * @returns Schema object with ~standard section for defineSchema\n */\nexport function createStandardSchema<T = Record<string, unknown>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schemaType: TailorField<any, T>,\n hook: (data: unknown) => Partial<T>,\n) {\n return {\n \"~standard\": {\n version: 1,\n vendor: \"@tailor-platform/sdk\",\n validate: (value: unknown) => {\n const hooked = hook(value);\n const result = schemaType.parse({\n value: hooked,\n data: hooked,\n user: unauthenticatedTailorUser,\n });\n if (result.issues) {\n return result;\n }\n return { value: hooked as T };\n },\n },\n } as const satisfies StandardSchemaV1<T>;\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,aAAa;;;;;;AAOnB,SAAgB,kBAAkB,iBAAgC,EAAE,EAGlE;CACA,MAAM,kBAA0D,EAAE;CAClE,MAAM,iBAA2D,EAAE;CAEnE,MAAM,mBAAmB;EACvB,AAAQ;EAER,YAAY,EAAE,aAAqC;AACjD,QAAK,SAAS;IAAE;IAAW,OAAO;IAAO;AACzC,kBAAe,KAAK,KAAK,OAAO;;EAGlC,MAAM,UAAyB;EAI/B,MAAM,MAAqB;AACzB,QAAK,OAAO,QAAQ;;EAGtB,MAAM,YAAY,OAAe,SAAoB,EAAE,EAAgC;AACrF,mBAAgB,KAAK;IAAE;IAAO;IAAQ,CAAC;AACvC,UAAO,EAAE,MAAM,SAAS,OAAO,OAAO,IAAI,EAAE,EAAE;;;AAIlD,YAAW,WAAW,EACpB,QAAQ,oBACT;AAED,QAAO;EAAE;EAAiB;EAAgB;;;;;;;AAQ5C,SAAgB,kBAAkB,SAEhC;CACA,MAAM,gBAAsD,EAAE;AAE9D,YAAW,SAAS;EAClB,GAAG,WAAW;EACd,UAAU,EACR,qBAAqB,SAAiB,SAAkB;AACtD,iBAAc,KAAK;IAAE;IAAS;IAAM,CAAC;AACrC,UAAO,QAAQ,SAAS,KAAK;KAEhC;EACF;AAED,QAAO,EAAE,eAAe;;;;;;;;AAS1B,SAAgB,iBAAiB,SAAkE;AACjG,QAAO,OAAO,iBAAgD;EAC5D,MAAM,UAAU,cAAc,KAAK,KAAK,SAAS,aAAa,CAAC;AAC/D,UAAQ,aAAa,IAAI,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,QAAQ,GAAG;EAE/D,MAAM,QADS,MAAM,OAAO,QAAQ,OAChB;AACpB,MAAI,OAAO,SAAS,WAClB,OAAM,IAAI,MAAM,uCAAuC,aAAa,QAAQ,OAAO,OAAO;AAE5F,SAAO;;;;;;;ACjGX,MAAa,4BAA4B;CACvC,IAAI;CACJ,MAAM;CACN,aAAa;CACb,YAAY;CACZ,eAAe,EAAE;CAClB;;;;;;;;;;AAYD,SAAgB,mBAAqD,MAAS;AAC5E,SAAQ,SAAkB;AACxB,SAAO,OAAO,QAAQ,KAAK,OAAO,CAAC,QAChC,QAAQ,CAAC,KAAK,WAAW;GAExB,MAAM,QAAQ;AACd,OAAI,QAAQ,KAIV,QAAO,QADL,QAAQ,OAAO,SAAS,WAAY,KAAiC,OAAO,WAClD,OAAO,YAAY;YACtC,MAAM,SAAS,SAExB,QAAO,OAAO,mBAAmB,EAAE,QAAQ,MAAM,QAAQ,CAAQ,CAC9D,KAAiC,KACnC;YACQ,MAAM,SAAS,OAAO,QAAQ;AACvC,WAAO,OAAO,MAAM,SAAS,MAAM,OAAO;KACxC,OAAQ,KAAiC;KACnC;KACN,MAAM;KACP,CAAC;AACF,QAAI,OAAO,gBAAgB,KACzB,QAAO,OAAO,OAAO,KAAK,aAAa;cAEhC,QAAQ,OAAO,SAAS,SACjC,QAAO,OAAQ,KAAiC;AAElD,UAAO;KAET,EAAE,CACH;;;;;;;;;;;AAYL,SAAgB,qBAEd,YACA,MACA;AACA,QAAO,EACL,aAAa;EACX,SAAS;EACT,QAAQ;EACR,WAAW,UAAmB;GAC5B,MAAM,SAAS,KAAK,MAAM;GAC1B,MAAM,SAAS,WAAW,MAAM;IAC9B,OAAO;IACP,MAAM;IACN,MAAM;IACP,CAAC;AACF,OAAI,OAAO,OACT,QAAO;AAET,UAAO,EAAE,OAAO,QAAa;;EAEhC,EACF"}
@@ -1,7 +1,6 @@
1
- import { S as TailorDBServiceInput, T as AuthConfig, kt as BuiltinIdP } from "./plugin-3sT6Tcq0.mjs";
1
+ import { S as TailorDBServiceInput, T as AuthConfig, kt as BuiltinIdP } from "./plugin-zY5wvV82.mjs";
2
2
 
3
3
  //#region src/types/idp.generated.d.ts
4
-
5
4
  /**
6
5
  * Configuration for GraphQL operations on IdP users.
7
6
  * All operations are enabled by default (undefined or true = enabled, false = disabled).
@@ -21,17 +20,12 @@ type IdPGqlOperations = {
21
20
  sendPasswordResetEmail?: boolean | undefined;
22
21
  };
23
22
  type IdPInput = {
24
- /** IdP service name */
25
- name: string;
26
- /** Authorization mode for IdP API access */
23
+ /** IdP service name */name: string; /** Authorization mode for IdP API access */
27
24
  authorization: "insecure" | "loggedIn" | {
28
25
  cel: string;
29
- };
30
- /** OAuth2 client names that can use this IdP */
31
- clients: string[];
32
- /** UI language for IdP pages */
33
- lang?: "en" | "ja" | undefined;
34
- /** User authentication policy configuration */
26
+ }; /** OAuth2 client names that can use this IdP */
27
+ clients: string[]; /** UI language for IdP pages */
28
+ lang?: "en" | "ja" | undefined; /** User authentication policy configuration */
35
29
  userAuthPolicy?: {
36
30
  useNonEmailIdentifier?: boolean | undefined;
37
31
  allowSelfPasswordReset?: boolean | undefined;
@@ -45,10 +39,8 @@ type IdPInput = {
45
39
  allowGoogleOauth?: boolean | undefined;
46
40
  allowMicrosoftOauth?: boolean | undefined;
47
41
  disablePasswordAuth?: boolean | undefined;
48
- } | undefined;
49
- /** Enable publishing user lifecycle events */
50
- publishUserEvents?: boolean | undefined;
51
- /** Configure which GraphQL operations are enabled */
42
+ } | undefined; /** Enable publishing user lifecycle events */
43
+ publishUserEvents?: boolean | undefined; /** Configure which GraphQL operations are enabled */
52
44
  gqlOperations?: "query" | {
53
45
  create?: boolean | undefined;
54
46
  update?: boolean | undefined;
@@ -97,11 +89,8 @@ declare function defineSecretManager<const T extends SecretsInput>(config: T): D
97
89
  //#endregion
98
90
  //#region src/types/staticwebsite.generated.d.ts
99
91
  type StaticWebsite = {
100
- /** Static website name */
101
- name: string;
102
- /** Static website description */
103
- description?: string | undefined;
104
- /** IP addresses allowed to access the website */
92
+ /** Static website name */name: string; /** Static website description */
93
+ description?: string | undefined; /** IP addresses allowed to access the website */
105
94
  allowedIpAddresses?: string[] | undefined;
106
95
  };
107
96
  type StaticWebsiteInput = StaticWebsite;
@@ -193,5 +182,13 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
193
182
  inlineSourcemap?: boolean;
194
183
  }
195
184
  //#endregion
196
- export { IdPGqlOperationsInput as _, ResolverServiceConfig as a, WorkflowServiceInput as c, SecretsConfig as d, defineSecretManager as f, IdPGqlOperations as g, IdpDefinitionBrand as h, ResolverExternalConfig as i, StaticWebsiteConfig as l, IdPExternalConfig as m, ExecutorServiceConfig as n, ResolverServiceInput as o, IdPConfig as p, ExecutorServiceInput as r, WorkflowServiceConfig as s, AppConfig as t, defineStaticWebSite as u, IdPInput as v };
197
- //# sourceMappingURL=app-config-QzNOFnEy.d.mts.map
185
+ //#region src/types/workflow.generated.d.ts
186
+ type RetryPolicy = {
187
+ /** Maximum number of retries (1-10) */maxRetries: number; /** Initial backoff duration (e.g., '1s', '500ms', '1m', max 1h) */
188
+ initialBackoff: `${number}ms` | `${number}s` | `${number}m`; /** Maximum backoff duration (e.g., '30s', '5m', max 24h) */
189
+ maxBackoff: `${number}ms` | `${number}s` | `${number}m`; /** Backoff multiplier (>= 1) */
190
+ backoffMultiplier: number;
191
+ };
192
+ //#endregion
193
+ export { IdPGqlOperations as _, ResolverExternalConfig as a, WorkflowServiceConfig as c, defineStaticWebSite as d, SecretsConfig as f, IdpDefinitionBrand as g, IdPExternalConfig as h, ExecutorServiceInput as i, WorkflowServiceInput as l, IdPConfig as m, AppConfig as n, ResolverServiceConfig as o, defineSecretManager as p, ExecutorServiceConfig as r, ResolverServiceInput as s, RetryPolicy as t, StaticWebsiteConfig as u, IdPGqlOperationsInput as v, IdPInput as y };
194
+ //# sourceMappingURL=workflow.generated-v1LXRuB6.d.mts.map
@@ -44,6 +44,12 @@ tailor-sdk init [options] [name]
44
44
 
45
45
  <!-- politty:command:init:options:end -->
46
46
 
47
+ <!-- politty:command:init:global-options-link:start -->
48
+
49
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
50
+
51
+ <!-- politty:command:init:global-options-link:end -->
52
+
47
53
  <!-- politty:command:generate:heading:start -->
48
54
 
49
55
  ## generate
@@ -77,6 +83,12 @@ tailor-sdk generate [options]
77
83
 
78
84
  <!-- politty:command:generate:options:end -->
79
85
 
86
+ <!-- politty:command:generate:global-options-link:start -->
87
+
88
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
89
+
90
+ <!-- politty:command:generate:global-options-link:end -->
91
+
80
92
  <!-- politty:command:apply:heading:start -->
81
93
 
82
94
  ## apply
@@ -103,19 +115,25 @@ tailor-sdk apply [options]
103
115
 
104
116
  **Options**
105
117
 
106
- | Option | Alias | Description | Required | Default |
107
- | ------------------------------- | ----- | -------------------------------------------------- | -------- | -------------------- |
108
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
109
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
110
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
111
- | `--yes` | `-y` | Skip confirmation prompts | No | `false` |
112
- | `--dry-run` | `-d` | Run the command without making any changes | No | - |
113
- | `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - |
114
- | `--no-cache` | - | Disable bundle caching for this run | No | - |
115
- | `--clean-cache` | - | Clean the bundle cache before building | No | - |
118
+ | Option | Alias | Description | Required | Default | Env |
119
+ | ------------------------------- | ----- | -------------------------------------------------- | -------- | -------------------- | --------------------------------- |
120
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
121
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
122
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
123
+ | `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
124
+ | `--dry-run` | `-d` | Run the command without making any changes | No | - | - |
125
+ | `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | - |
126
+ | `--no-cache` | - | Disable bundle caching for this run | No | - | - |
127
+ | `--clean-cache` | - | Clean the bundle cache before building | No | - | - |
116
128
 
117
129
  <!-- politty:command:apply:options:end -->
118
130
 
131
+ <!-- politty:command:apply:global-options-link:start -->
132
+
133
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
134
+
135
+ <!-- politty:command:apply:global-options-link:end -->
136
+
119
137
  **Migration Handling:**
120
138
 
121
139
  When migrations are configured (`db.tailordb.migration` in config), the `apply` command automatically:
@@ -164,15 +182,21 @@ tailor-sdk remove [options]
164
182
 
165
183
  **Options**
166
184
 
167
- | Option | Alias | Description | Required | Default |
168
- | ------------------------------- | ----- | ------------------------- | -------- | -------------------- |
169
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
170
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
171
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
172
- | `--yes` | `-y` | Skip confirmation prompts | No | `false` |
185
+ | Option | Alias | Description | Required | Default | Env |
186
+ | ------------------------------- | ----- | ------------------------- | -------- | -------------------- | --------------------------------- |
187
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
188
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
189
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
190
+ | `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
173
191
 
174
192
  <!-- politty:command:remove:options:end -->
175
193
 
194
+ <!-- politty:command:remove:global-options-link:start -->
195
+
196
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
197
+
198
+ <!-- politty:command:remove:global-options-link:end -->
199
+
176
200
  <!-- politty:command:show:heading:start -->
177
201
 
178
202
  ## show
@@ -199,15 +223,20 @@ tailor-sdk show [options]
199
223
 
200
224
  **Options**
201
225
 
202
- | Option | Alias | Description | Required | Default |
203
- | ------------------------------- | ----- | ----------------------- | -------- | -------------------- |
204
- | `--json` | `-j` | Output as JSON | No | `false` |
205
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
206
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
207
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
226
+ | Option | Alias | Description | Required | Default | Env |
227
+ | ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- |
228
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
229
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
230
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
208
231
 
209
232
  <!-- politty:command:show:options:end -->
210
233
 
234
+ <!-- politty:command:show:global-options-link:start -->
235
+
236
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
237
+
238
+ <!-- politty:command:show:global-options-link:end -->
239
+
211
240
  <!-- politty:command:open:heading:start -->
212
241
 
213
242
  ## open
@@ -234,14 +263,20 @@ tailor-sdk open [options]
234
263
 
235
264
  **Options**
236
265
 
237
- | Option | Alias | Description | Required | Default |
238
- | ------------------------------- | ----- | ----------------------- | -------- | -------------------- |
239
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
240
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
241
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
266
+ | Option | Alias | Description | Required | Default | Env |
267
+ | ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- |
268
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
269
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
270
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
242
271
 
243
272
  <!-- politty:command:open:options:end -->
244
273
 
274
+ <!-- politty:command:open:global-options-link:start -->
275
+
276
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
277
+
278
+ <!-- politty:command:open:global-options-link:end -->
279
+
245
280
  <!-- politty:command:api:heading:start -->
246
281
 
247
282
  ## api
@@ -278,11 +313,16 @@ tailor-sdk api [options] <endpoint>
278
313
 
279
314
  **Options**
280
315
 
281
- | Option | Alias | Description | Required | Default |
282
- | ------------------------------- | ----- | -------------------- | -------- | ------- |
283
- | `--json` | `-j` | Output as JSON | No | `false` |
284
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
285
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
286
- | `--body <BODY>` | `-b` | Request body as JSON | No | `"{}"` |
316
+ | Option | Alias | Description | Required | Default | Env |
317
+ | ------------------------------- | ----- | -------------------- | -------- | ------- | ------------------------------ |
318
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
319
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
320
+ | `--body <BODY>` | `-b` | Request body as JSON | No | `"{}"` | - |
287
321
 
288
322
  <!-- politty:command:api:options:end -->
323
+
324
+ <!-- politty:command:api:global-options-link:start -->
325
+
326
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
327
+
328
+ <!-- politty:command:api:global-options-link:end -->
package/docs/cli/auth.md CHANGED
@@ -34,6 +34,12 @@ tailor-sdk machineuser [command]
34
34
  | [`machineuser token`](#machineuser-token) | Get an access token for a machine user. |
35
35
 
36
36
  <!-- politty:command:machineuser:subcommands:end -->
37
+
38
+ <!-- politty:command:machineuser:global-options-link:start -->
39
+
40
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
41
+
42
+ <!-- politty:command:machineuser:global-options-link:end -->
37
43
  <!-- politty:command:machineuser list:heading:start -->
38
44
 
39
45
  ### machineuser list
@@ -60,14 +66,19 @@ tailor-sdk machineuser list [options]
60
66
 
61
67
  **Options**
62
68
 
63
- | Option | Alias | Description | Required | Default |
64
- | ------------------------------- | ----- | ----------------------- | -------- | -------------------- |
65
- | `--json` | `-j` | Output as JSON | No | `false` |
66
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
67
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
68
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
69
+ | Option | Alias | Description | Required | Default | Env |
70
+ | ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- |
71
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
72
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
73
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
69
74
 
70
75
  <!-- politty:command:machineuser list:options:end -->
76
+
77
+ <!-- politty:command:machineuser list:global-options-link:start -->
78
+
79
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
80
+
81
+ <!-- politty:command:machineuser list:global-options-link:end -->
71
82
  <!-- politty:command:machineuser token:heading:start -->
72
83
 
73
84
  ### machineuser token
@@ -104,14 +115,19 @@ tailor-sdk machineuser token [options] <name>
104
115
 
105
116
  **Options**
106
117
 
107
- | Option | Alias | Description | Required | Default |
108
- | ------------------------------- | ----- | ----------------------- | -------- | -------------------- |
109
- | `--json` | `-j` | Output as JSON | No | `false` |
110
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
111
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
112
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
118
+ | Option | Alias | Description | Required | Default | Env |
119
+ | ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- |
120
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
121
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
122
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
113
123
 
114
124
  <!-- politty:command:machineuser token:options:end -->
125
+
126
+ <!-- politty:command:machineuser token:global-options-link:start -->
127
+
128
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
129
+
130
+ <!-- politty:command:machineuser token:global-options-link:end -->
115
131
  <!-- politty:command:oauth2client:heading:start -->
116
132
 
117
133
  ## oauth2client
@@ -144,6 +160,12 @@ tailor-sdk oauth2client [command]
144
160
  | [`oauth2client list`](#oauth2client-list) | List all OAuth2 clients in the application. |
145
161
 
146
162
  <!-- politty:command:oauth2client:subcommands:end -->
163
+
164
+ <!-- politty:command:oauth2client:global-options-link:start -->
165
+
166
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
167
+
168
+ <!-- politty:command:oauth2client:global-options-link:end -->
147
169
  <!-- politty:command:oauth2client list:heading:start -->
148
170
 
149
171
  ### oauth2client list
@@ -170,14 +192,19 @@ tailor-sdk oauth2client list [options]
170
192
 
171
193
  **Options**
172
194
 
173
- | Option | Alias | Description | Required | Default |
174
- | ------------------------------- | ----- | ----------------------- | -------- | -------------------- |
175
- | `--json` | `-j` | Output as JSON | No | `false` |
176
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
177
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
178
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
195
+ | Option | Alias | Description | Required | Default | Env |
196
+ | ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- |
197
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
198
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
199
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
179
200
 
180
201
  <!-- politty:command:oauth2client list:options:end -->
202
+
203
+ <!-- politty:command:oauth2client list:global-options-link:start -->
204
+
205
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
206
+
207
+ <!-- politty:command:oauth2client list:global-options-link:end -->
181
208
  <!-- politty:command:oauth2client get:heading:start -->
182
209
 
183
210
  ### oauth2client get
@@ -214,15 +241,20 @@ tailor-sdk oauth2client get [options] <name>
214
241
 
215
242
  **Options**
216
243
 
217
- | Option | Alias | Description | Required | Default |
218
- | ------------------------------- | ----- | ----------------------- | -------- | -------------------- |
219
- | `--json` | `-j` | Output as JSON | No | `false` |
220
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - |
221
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - |
222
- | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` |
244
+ | Option | Alias | Description | Required | Default | Env |
245
+ | ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- |
246
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
247
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
248
+ | `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
223
249
 
224
250
  <!-- politty:command:oauth2client get:options:end -->
225
251
 
252
+ <!-- politty:command:oauth2client get:global-options-link:start -->
253
+
254
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
255
+
256
+ <!-- politty:command:oauth2client get:global-options-link:end -->
257
+
226
258
  **Output:**
227
259
 
228
260
  Returns a list of OAuth2 clients with the following fields:
@@ -41,3 +41,9 @@ tailor-sdk completion [options] [shell]
41
41
  | `--instructions` | `-i` | Show installation instructions | No | `false` |
42
42
 
43
43
  <!-- politty:command:completion:options:end -->
44
+
45
+ <!-- politty:command:completion:global-options-link:start -->
46
+
47
+ See [Global Options](../cli-reference.md#global-options) for options available to all commands.
48
+
49
+ <!-- politty:command:completion:global-options-link:end -->