@tailor-platform/sdk 2.0.0-next.3 → 2.0.0-next.4

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 (118) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/aigateway-DR4Kwuik.mjs +9 -0
  3. package/dist/{aigateway-B3oZZE6v.mjs.map → aigateway-DR4Kwuik.mjs.map} +1 -1
  4. package/dist/application-BO4ZF8wP.mjs +3 -0
  5. package/dist/{application-eHp9jXld.mjs → application-BX13RArL.mjs} +293 -17
  6. package/dist/application-BX13RArL.mjs.map +1 -0
  7. package/dist/authconnection-CZvi9ANm.mjs +9 -0
  8. package/dist/authconnection-CZvi9ANm.mjs.map +1 -0
  9. package/dist/brand-Eo4pLXPJ.mjs.map +1 -1
  10. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +1 -0
  11. package/dist/cli/index.mjs +138 -38
  12. package/dist/cli/index.mjs.map +1 -1
  13. package/dist/cli/lib.mjs +4 -4
  14. package/dist/cli/query/index.d.mts +4 -0
  15. package/dist/cli/ts-hook.mjs +43 -13
  16. package/dist/completion/zsh-worker.zsh +10 -10
  17. package/dist/configure/config/types.d.mts +3 -1
  18. package/dist/configure/index.d.mts +3 -1
  19. package/dist/configure/index.mjs +114 -4
  20. package/dist/configure/index.mjs.map +1 -1
  21. package/dist/configure/services/index.d.mts +3 -1
  22. package/dist/configure/services/tailordb/schema.d.mts +20 -20
  23. package/dist/configure/services/workflow/execution-policy.d.mts +71 -0
  24. package/dist/configure/services/workflow/execution-policy.types.d.mts +104 -0
  25. package/dist/configure/services/workflow/index.d.mts +3 -1
  26. package/dist/configure/services/workflow/job.d.mts +7 -2
  27. package/dist/{context-Bd266-ru.mjs → context-DYQVYWqZ.mjs} +4 -5
  28. package/dist/{context-Bd266-ru.mjs.map → context-DYQVYWqZ.mjs.map} +1 -1
  29. package/dist/{file-BbdFGdMV.mjs → file-BUcmVIH2.mjs} +12 -14
  30. package/dist/file-BUcmVIH2.mjs.map +1 -0
  31. package/dist/{file-utils-CYZnO1pX.mjs → file-utils-yEiIS4nJ.mjs} +2 -2
  32. package/dist/file-utils-yEiIS4nJ.mjs.map +1 -0
  33. package/dist/{globals-DhwZj0RB.mjs → globals-BjhJJ2dN.mjs} +2 -2
  34. package/dist/globals-BjhJJ2dN.mjs.map +1 -0
  35. package/dist/iconv-QWaZh0TT.mjs +38 -0
  36. package/dist/iconv-QWaZh0TT.mjs.map +1 -0
  37. package/dist/{idp-Bx25ZBdN.mjs → idp-RA_swu-h.mjs} +4 -5
  38. package/dist/idp-RA_swu-h.mjs.map +1 -0
  39. package/dist/{kysely-type-5eAChaHO.mjs → kysely-type-D-zflMGf.mjs} +1 -3
  40. package/dist/kysely-type-D-zflMGf.mjs.map +1 -0
  41. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  42. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  43. package/dist/{register-ts-hook-ZpBacA07.mjs → register-ts-hook-BM1caLT0.mjs} +255 -256
  44. package/dist/register-ts-hook-BM1caLT0.mjs.map +1 -0
  45. package/dist/{registry-DH4m7eYo.mjs → registry-BSbq6SPo.mjs} +4 -3
  46. package/dist/registry-BSbq6SPo.mjs.map +1 -0
  47. package/dist/resource_pb-BRv7AMXK.mjs +49 -0
  48. package/dist/resource_pb-BRv7AMXK.mjs.map +1 -0
  49. package/dist/runtime/aigateway.d.mts +5 -14
  50. package/dist/runtime/aigateway.mjs +2 -2
  51. package/dist/runtime/authconnection.d.mts +5 -14
  52. package/dist/runtime/authconnection.mjs +2 -2
  53. package/dist/runtime/context.d.mts +14 -5
  54. package/dist/runtime/context.mjs +2 -2
  55. package/dist/runtime/file.d.mts +14 -54
  56. package/dist/runtime/file.mjs +2 -2
  57. package/dist/runtime/globals.d.mts +1 -1
  58. package/dist/runtime/iconv.d.mts +5 -53
  59. package/dist/runtime/iconv.mjs +2 -2
  60. package/dist/runtime/idp.d.mts +13 -70
  61. package/dist/runtime/idp.mjs +2 -2
  62. package/dist/runtime/index.d.mts +11 -11
  63. package/dist/runtime/index.mjs +9 -9
  64. package/dist/runtime/secretmanager.d.mts +7 -20
  65. package/dist/runtime/secretmanager.mjs +2 -2
  66. package/dist/runtime/workflow.d.mts +42 -41
  67. package/dist/runtime/workflow.mjs +2 -2
  68. package/dist/{schema-89dYxNC2.mjs → schema-C4LYbXVG.mjs} +5 -5
  69. package/dist/{schema-89dYxNC2.mjs.map → schema-C4LYbXVG.mjs.map} +1 -1
  70. package/dist/secretmanager-CYlpffsz.mjs +13 -0
  71. package/dist/secretmanager-CYlpffsz.mjs.map +1 -0
  72. package/dist/{service_pb-DjwIn4jO.mjs → service_pb-B2FF59sP.mjs} +1 -1
  73. package/dist/{service_pb-CIrhGwHk.mjs → service_pb-B5w9rjPY.mjs} +17 -50
  74. package/dist/service_pb-B5w9rjPY.mjs.map +1 -0
  75. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +1 -1
  76. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +29 -9
  77. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +35 -1
  78. package/dist/utils/test/index.mjs.map +1 -1
  79. package/dist/vitest/environment.mjs +1 -1
  80. package/dist/vitest/index.mjs +11 -11
  81. package/dist/vitest/index.mjs.map +1 -1
  82. package/dist/vitest/mocks/workflow.d.mts +5 -3
  83. package/dist/vitest/setup.mjs +1 -1
  84. package/dist/workflow-GNuSnsTx.mjs +22 -0
  85. package/dist/workflow-GNuSnsTx.mjs.map +1 -0
  86. package/docs/cli/auth.md +3 -3
  87. package/docs/cli/setup.md +8 -8
  88. package/docs/configuration.md +24 -0
  89. package/docs/migration/v2.md +111 -0
  90. package/docs/plugin/custom.md +4 -4
  91. package/docs/plugin/index.md +2 -2
  92. package/docs/runtime.md +4 -2
  93. package/docs/services/auth.md +2 -2
  94. package/docs/services/resolver.md +1 -1
  95. package/docs/services/tailordb-migration.md +1 -1
  96. package/docs/services/tailordb.md +31 -31
  97. package/docs/services/workflow.md +78 -0
  98. package/package.json +1 -1
  99. package/dist/aigateway-B3oZZE6v.mjs +0 -15
  100. package/dist/application-D2hSK1ZL.mjs +0 -3
  101. package/dist/application-eHp9jXld.mjs.map +0 -1
  102. package/dist/authconnection-BGQM8FZI.mjs +0 -15
  103. package/dist/authconnection-BGQM8FZI.mjs.map +0 -1
  104. package/dist/file-BbdFGdMV.mjs.map +0 -1
  105. package/dist/file-utils-CYZnO1pX.mjs.map +0 -1
  106. package/dist/globals-DhwZj0RB.mjs.map +0 -1
  107. package/dist/iconv-D2vi8G36.mjs +0 -63
  108. package/dist/iconv-D2vi8G36.mjs.map +0 -1
  109. package/dist/idp-Bx25ZBdN.mjs.map +0 -1
  110. package/dist/kysely-type-5eAChaHO.mjs.map +0 -1
  111. package/dist/register-ts-hook-ZpBacA07.mjs.map +0 -1
  112. package/dist/registry-DH4m7eYo.mjs.map +0 -1
  113. package/dist/rolldown-runtime-DXywRVcq.mjs +0 -20
  114. package/dist/secretmanager-BVxw3ih_.mjs +0 -24
  115. package/dist/secretmanager-BVxw3ih_.mjs.map +0 -1
  116. package/dist/service_pb-CIrhGwHk.mjs.map +0 -1
  117. package/dist/workflow-Bo59B75H.mjs +0 -50
  118. package/dist/workflow-Bo59B75H.mjs.map +0 -1
@@ -0,0 +1,9 @@
1
+ //#region src/runtime/authconnection.ts
2
+ const api = () => globalThis.tailor.authconnection;
3
+ const getConnectionToken = (...args) => api().getConnectionToken(...args);
4
+ /** Runtime wrapper namespace for `tailor.authconnection`. */
5
+ const authconnection = { getConnectionToken };
6
+
7
+ //#endregion
8
+ export { authconnection as t };
9
+ //# sourceMappingURL=authconnection-CZvi9ANm.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authconnection-CZvi9ANm.mjs","names":[],"sources":["../src/runtime/authconnection.ts"],"sourcesContent":["/**\n * Auth connection utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.authconnection` runtime API.\n * At runtime this delegates to `globalThis.tailor.authconnection`. Use\n * `mockAuthconnection` from `@tailor-platform/sdk/vitest` to mock in unit tests.\n *\n * `connectionName` is narrowed to the connection names defined in `defineAuth()`'s\n * `connections` once `tailor.d.ts` has been generated (via `tailor deploy`/`generate`).\n * @example\n * import { authconnection } from \"@tailor-platform/sdk/runtime\";\n *\n * const token = await authconnection.getConnectionToken(\"my-connection\");\n */\n\nimport type { AuthConnectionTokenResult } from \"#/configure/services/auth/types\";\n// Import from the public entry (not `#/configure/types/connection-name`) so this d.ts\n// references `@tailor-platform/sdk` externally instead of inlining the registry — a single\n// generated `declare module \"@tailor-platform/sdk\"` then narrows this entry too.\nimport type { ConnectionName } from \"@tailor-platform/sdk\";\n\n/**\n * Platform API surface for `tailor.authconnection`. Describes the shape the\n * platform runtime injects on `globalThis.tailor.authconnection`.\n */\nexport interface TailorAuthconnectionAPI {\n /**\n * Returns the access token for the given auth connection.\n * @param connectionName - Auth connection name as defined in tailor.config\n * @returns Token payload\n */\n getConnectionToken(connectionName: ConnectionName): Promise<AuthConnectionTokenResult>;\n}\n\nconst api = (): TailorAuthconnectionAPI =>\n (globalThis as unknown as { tailor: { authconnection: TailorAuthconnectionAPI } }).tailor\n .authconnection;\n\nconst getConnectionToken: TailorAuthconnectionAPI[\"getConnectionToken\"] = (...args) =>\n api().getConnectionToken(...args);\n\n/** Runtime wrapper namespace for `tailor.authconnection`. */\nexport const authconnection = { getConnectionToken } as const satisfies TailorAuthconnectionAPI;\n"],"mappings":";AAkCA,MAAM,YACH,WAAkF,OAChF;AAEL,MAAM,sBAAqE,GAAG,SAC5E,IAAI,CAAC,CAAC,mBAAmB,GAAG,IAAI;;AAGlC,MAAa,iBAAiB,EAAE,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"brand-Eo4pLXPJ.mjs","names":[],"sources":["../src/utils/brand.ts"],"sourcesContent":["// Symbol.for ensures the same symbol is returned across different ESM module instances,\n// avoiding identity mismatches when multiple copies of the SDK are loaded.\nexport const SDK_BRAND: unique symbol = Symbol.for(\"tailor-platform/sdk\");\n\nexport type SdkBrandKind =\n | \"tailordb-type\"\n | \"resolver\"\n | \"executor\"\n | \"workflow\"\n | \"workflow-job\"\n | \"wait-point\"\n | \"http-adapter\";\n\n/**\n * Adds a non-enumerable SDK brand symbol to the given object (in-place).\n * The brand stores the kind so service loaders can distinguish between\n * different SDK object types (e.g. a type loader skips executors).\n * @param value - The object to brand\n * @param kind - The kind of SDK object\n * @returns The same object with the brand applied\n */\nexport function brandValue<T extends object>(value: T, kind: SdkBrandKind): T {\n Object.defineProperty(value, SDK_BRAND, {\n value: kind,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return value;\n}\n\n/**\n * Checks whether the given value has been branded by the SDK.\n * When kind is specified, only returns true if the brand matches that kind.\n * Accepts a single kind or an array of kinds for multi-kind matching.\n * @param value - The value to check\n * @param kind - Optional kind or kinds to match against\n * @returns True if the value has the SDK brand symbol (and matches kind if specified)\n */\nexport function isSdkBranded(\n value: unknown,\n kind?: SdkBrandKind | readonly SdkBrandKind[],\n): boolean {\n if (value === null || typeof value !== \"object\" || !(SDK_BRAND in value)) return false;\n const stored = (value as Record<symbol, unknown>)[SDK_BRAND];\n // No kind filter → any brand matches. Legacy `true` brand → matches any kind.\n return (\n kind === undefined ||\n stored === true ||\n (Array.isArray(kind) ? kind.includes(stored as SdkBrandKind) : stored === kind)\n );\n}\n"],"mappings":";AAEA,MAAa,YAA2B,OAAO,IAAI,qBAAqB;;;;;;;;;AAmBxE,SAAgB,WAA6B,OAAU,MAAuB;CAC5E,OAAO,eAAe,OAAO,WAAW;EACtC,OAAO;EACP,YAAY;EACZ,cAAc;EACd,UAAU;CACZ,CAAC;CACD,OAAO;AACT;;;;;;;;;AAUA,SAAgB,aACd,OACA,MACS;CACT,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,EAAE,aAAa,QAAQ,OAAO;CACjF,MAAM,SAAU,MAAkC;CAElD,OACE,SAAS,UACT,WAAW,SACV,MAAM,QAAQ,IAAI,IAAI,KAAK,SAAS,MAAsB,IAAI,WAAW;AAE9E"}
1
+ {"version":3,"file":"brand-Eo4pLXPJ.mjs","names":[],"sources":["../src/utils/brand.ts"],"sourcesContent":["// Symbol.for ensures the same symbol is returned across different ESM module instances,\n// avoiding identity mismatches when multiple copies of the SDK are loaded.\nexport const SDK_BRAND: unique symbol = Symbol.for(\"tailor-platform/sdk\");\n\nexport type SdkBrandKind =\n | \"tailordb-type\"\n | \"resolver\"\n | \"executor\"\n | \"workflow\"\n | \"workflow-job\"\n | \"wait-point\"\n | \"execution-policy\"\n | \"http-adapter\";\n\n/**\n * Adds a non-enumerable SDK brand symbol to the given object (in-place).\n * The brand stores the kind so service loaders can distinguish between\n * different SDK object types (e.g. a type loader skips executors).\n * @param value - The object to brand\n * @param kind - The kind of SDK object\n * @returns The same object with the brand applied\n */\nexport function brandValue<T extends object>(value: T, kind: SdkBrandKind): T {\n Object.defineProperty(value, SDK_BRAND, {\n value: kind,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return value;\n}\n\n/**\n * Checks whether the given value has been branded by the SDK.\n * When kind is specified, only returns true if the brand matches that kind.\n * Accepts a single kind or an array of kinds for multi-kind matching.\n * @param value - The value to check\n * @param kind - Optional kind or kinds to match against\n * @returns True if the value has the SDK brand symbol (and matches kind if specified)\n */\nexport function isSdkBranded(\n value: unknown,\n kind?: SdkBrandKind | readonly SdkBrandKind[],\n): boolean {\n if (value === null || typeof value !== \"object\" || !(SDK_BRAND in value)) return false;\n const stored = (value as Record<symbol, unknown>)[SDK_BRAND];\n // No kind filter → any brand matches. Legacy `true` brand → matches any kind.\n return (\n kind === undefined ||\n stored === true ||\n (Array.isArray(kind) ? kind.includes(stored as SdkBrandKind) : stored === kind)\n );\n}\n"],"mappings":";AAEA,MAAa,YAA2B,OAAO,IAAI,qBAAqB;;;;;;;;;AAoBxE,SAAgB,WAA6B,OAAU,MAAuB;CAC5E,OAAO,eAAe,OAAO,WAAW;EACtC,OAAO;EACP,YAAY;EACZ,cAAc;EACd,UAAU;CACZ,CAAC;CACD,OAAO;AACT;;;;;;;;;AAUA,SAAgB,aACd,OACA,MACS;CACT,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,EAAE,aAAa,QAAQ,OAAO;CACjF,MAAM,SAAU,MAAkC;CAElD,OACE,SAAS,UACT,WAAW,SACV,MAAM,QAAQ,IAAI,IAAI,KAAK,SAAS,MAAsB,IAAI,WAAW;AAE9E"}
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { C as CustomDomainStatus, R as FunctionExecution_Type, mt as AuthInvokerSchema, xt as PATScope } from "../service_pb-CIrhGwHk.mjs";
3
2
  import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
4
3
  import { n as logger, r as styles } from "../logger-BEiZZ3qT.mjs";
5
- import { $t as compareSnapshotWithRemote, A as listCommand$13, An as apiCommand, Bn as pagedLogArgs, C as listCommand$14, Cn as hasChanges, Dn as PluginManager, Dt as listCommand$7, E as waitCommand, En as sdkNameLabelKey, F as generateCommand$1, Fn as configArg, G as removeCommand$1, Gt as deploy, H as extractOwnedNamespaces, Hn as toPageDirection, Ht as formatKeyValueTable, I as generateMigrationScript, In as confirmationArgs, It as getCommand$6, K as updateCommand$3, Kt as ensureConfigId, L as writeDbTypesFile, Ln as deploymentArgs, Mn as assertWritable, N as truncateCommand, Nn as defineAppCommand, O as resumeCommand, On as generateUserTypes, Pn as commonArgs, Pt as startCommand, Q as getCommand$5, Qt as parseMigrationLabelNumber, R as getConfiguredEditorCommand, Rn as isVerbose, Rt as executionsCommand, Sn as formatMigrationDiff, T as healthCommand, Tn as resourceTrn, Tt as triggerCommand, U as logBetaWarning, Un as workspaceArgs, Ut as getCommand$1, V as showCommand, Vn as paginationArgs, Vt as functionExecutionStatusToString, X as listCommand$12, Xt as MIGRATION_LABEL_KEY, Y as treeCommand, Zt as handleOptionalToRequiredError, _n as loadDiff, b as createCommand$4, bn as parseMigrationNumberArg, c as listCommand$15, cn as compareLocalTypesWithSnapshot, ct as createCommand$3, dn as getLatestMigrationNumber, en as generateAllTypeManifestsFromSnapshot, et as updateCommand$2, f as restoreCommand, ft as getCommand$3, g as getCommand$7, gn as isValidMigrationNumber, gt as listCommand$9, ht as tokenCommand$1, i as updateCommand$4, in as INITIAL_SCHEMA_NUMBER, it as getCommand$4, jt as jobsCommand, kn as prompt, m as listCommand$16, mn as getMigrationFiles, nt as listCommand$11, o as removeCommand, ot as deleteCommand$4, pn as getMigrationFilePath, qt as executeScript, r as queryCommand, sn as assertValidMigrationFiles, t as registerTsHook, tn as protoGqlPermission, u as inviteCommand, un as createSnapshotFromLocalTypes, ut as listCommand$10, v as deleteCommand$5, vn as reconstructSnapshotFromMigrations, vt as generate, wn as getNamespacesWithMigrations, wt as webhookCommand, xt as getCommand$2, yn as formatMigrationNumber, yt as listCommand$8, z as openInConfiguredEditor, zn as multiConfigArg } from "../register-ts-hook-ZpBacA07.mjs";
6
- import { A as hasUserTokenEntry, B as removeLegacyUserAlias, C as getDistDir, D as deleteUserTokens, E as loadConfig, F as loadPlatformClientConfig, G as closeConnectionPool, H as resolveUserTokenKey, I as loadStoredUserTokens, J as fetchAllTolerant, K as defaultPlatformBaseUrl, L as loadWorkspaceId, M as loadConfigPath, N as loadConsoleBaseUrl, O as fetchLatestToken, P as loadMachineUserName, Q as fetchUserInfo, R as platformConfigFromProfile, U as saveUserTokens, V as resolveConfigUser, W as writePlatformConfig, X as fetchPaged, Z as fetchPlatformMachineUserToken, _ as composeFunctionTreeshakeOptions, a as resolveInlineSourcemap, at as isDefaultPlatform, c as ResolverSchema, et as getOAuth2ClientId, g as platformBundleDefinePlugin, it as initOperatorClient, j as loadAccessToken, k as hasAnyUserTokenEntry, nt as getPlatformBaseUrl, q as fetchAll, rt as initOAuth2Client, s as WorkflowJobSchema, t as defineApplication, tt as getOrNull, u as INVOKER_EXPR, v as createLogLevelTreeshakeOptions, w as hashContent$1, y as resolveBundleLogLevel, z as readPlatformConfig } from "../application-eHp9jXld.mjs";
4
+ import { $ as fetchUserInfo, A as hasAnyUserTokenEntry, B as readPlatformConfig, D as loadConfig, Et as workspaceArgs, F as loadMachineUserName, G as writePlatformConfig, H as resolveConfigUser, I as loadPlatformClientConfig, J as fetchAll, K as closeConnectionPool, L as loadStoredUserTokens, M as loadAccessToken, N as loadConfigPath, O as deleteUserTokens, P as loadConsoleBaseUrl, Q as fetchPlatformMachineUserToken, R as loadWorkspaceId, T as hashContent$1, Tt as toPageDirection, U as resolveUserTokenKey, V as removeLegacyUserAlias, W as saveUserTokens, Y as fetchAllTolerant, Z as fetchPaged, _ as platformBundleDefinePlugin, a as resolveInlineSourcemap, at as initOperatorClient, b as resolveBundleLogLevel, bt as pagedLogArgs, c as WorkflowJobSchema, d as INVOKER_EXPR, dt as confirmationArgs, ft as deploymentArgs, gt as multiConfigArg, ht as isVerbose, it as initOAuth2Client, j as hasUserTokenEntry, k as fetchLatestToken, l as ResolverSchema, lt as commonArgs, nt as getOrNull, ot as isDefaultPlatform, q as defaultPlatformBaseUrl, rt as getPlatformBaseUrl, t as defineApplication, tt as getOAuth2ClientId, ut as configArg, v as composeFunctionTreeshakeOptions, w as getDistDir, wt as resolveMachineUserInputSource, xt as paginationArgs, y as createLogLevelTreeshakeOptions, z as platformConfigFromProfile } from "../application-BX13RArL.mjs";
5
+ import { $t as compareSnapshotWithRemote, A as listCommand$13, An as apiCommand, C as listCommand$14, Cn as hasChanges, Dn as PluginManager, Dt as listCommand$7, E as waitCommand, En as sdkNameLabelKey, F as generateCommand$1, G as removeCommand$1, Gt as deploy, H as extractOwnedNamespaces, Ht as formatKeyValueTable, I as generateMigrationScript, It as getCommand$6, K as updateCommand$3, Kt as ensureConfigId, L as writeDbTypesFile, Mn as assertWritable, N as truncateCommand, Nn as defineAppCommand, O as resumeCommand, On as generateUserTypes, Pt as startCommand, Q as getCommand$5, Qt as parseMigrationLabelNumber, R as getConfiguredEditorCommand, Rt as executionsCommand, Sn as formatMigrationDiff, T as healthCommand, Tn as resourceTrn, Tt as triggerCommand, U as logBetaWarning, Ut as getCommand$1, V as showCommand, Vt as functionExecutionStatusToString, X as listCommand$12, Xt as MIGRATION_LABEL_KEY, Y as treeCommand, Zt as handleOptionalToRequiredError, _n as loadDiff, b as createCommand$4, bn as parseMigrationNumberArg, c as listCommand$15, cn as compareLocalTypesWithSnapshot, ct as createCommand$3, dn as getLatestMigrationNumber, en as generateAllTypeManifestsFromSnapshot, et as updateCommand$2, f as restoreCommand, ft as getCommand$3, g as getCommand$7, gn as isValidMigrationNumber, gt as listCommand$9, ht as tokenCommand$1, i as updateCommand$4, in as INITIAL_SCHEMA_NUMBER, it as getCommand$4, jt as jobsCommand, kn as prompt, m as listCommand$16, mn as getMigrationFiles, nt as listCommand$11, o as removeCommand, ot as deleteCommand$4, pn as getMigrationFilePath, qt as executeScript, r as queryCommand, sn as assertValidMigrationFiles, t as registerTsHook, tn as protoGqlPermission, u as inviteCommand, un as createSnapshotFromLocalTypes, ut as listCommand$10, v as deleteCommand$5, vn as reconstructSnapshotFromMigrations, vt as generate, wn as getNamespacesWithMigrations, wt as webhookCommand, xt as getCommand$2, yn as formatMigrationNumber, yt as listCommand$8, z as openInConfiguredEditor } from "../register-ts-hook-BM1caLT0.mjs";
7
6
  import { i as ExecutorSchema, r as stripExecutorTriggerArgs } from "../service-ufH7sS8o.mjs";
8
7
  import { t as multiline } from "../multiline-sfHpTZZK.mjs";
9
8
  import { t as readPackageJson } from "../package-json-8b0O9TlX.mjs";
10
9
  import { i as userAgent } from "../secret-file-aoNXJmKa.mjs";
11
10
  import { n as isCLIError } from "../errors-118wUDRr.mjs";
11
+ import { B as FunctionExecution_Type, Ct as PATScope, T as CustomDomainStatus, gt as AuthInvokerSchema } from "../service_pb-B5w9rjPY.mjs";
12
12
  import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crashreport-Cg-pqRJV.mjs";
13
13
  import { t as isPluginGeneratedType } from "../type-source-DH_LH20p.mjs";
14
14
  import * as path from "pathe";
@@ -1425,6 +1425,7 @@ When a \`.js\` file is provided, detection and bundling are skipped and the file
1425
1425
  const authNamespace = resolveAuthNamespace(config.auth);
1426
1426
  const machineUserName = await resolveMachineUserName({
1427
1427
  cliMachineUser: args["machine-user"],
1428
+ cliMachineUserSource: resolveMachineUserInputSource(args["machine-user"]),
1428
1429
  profile: args.profile,
1429
1430
  authConfig: config.auth
1430
1431
  });
@@ -1545,9 +1546,10 @@ function resolveAuthNamespace(authConfig) {
1545
1546
  * @returns Resolved machine user name
1546
1547
  */
1547
1548
  async function resolveMachineUserName(options) {
1548
- const { cliMachineUser, profile, authConfig } = options;
1549
+ const { cliMachineUser, cliMachineUserSource, profile, authConfig } = options;
1549
1550
  const resolved = await loadMachineUserName({
1550
1551
  machineUser: cliMachineUser,
1552
+ machineUserSource: cliMachineUserSource,
1551
1553
  profile
1552
1554
  });
1553
1555
  if (resolved) return resolved;
@@ -3169,7 +3171,7 @@ function findTarget(lock, kind, workspaceName) {
3169
3171
 
3170
3172
  //#endregion
3171
3173
  //#region src/cli/commands/setup/action.yml
3172
- var action_default = "# __HEADER__\nname: __WORKSPACE_NAME__\ndescription: >-\n Deploy __WORKSPACE_NAME__ to Tailor Platform.\n Checkout and dependency installation are expected to be handled by the caller.\n\ninputs:\n workspace-id:\n description: Tailor Platform workspace id\n required: true\n name:\n description: Workspace name (used in Slack notifications)\n required: true\n working-directory:\n description: App directory relative to the repository root\n required: false\n default: \".\"\n platform-client-id:\n description: Machine-user client id\n required: true\n platform-client-secret:\n description: Machine-user client secret\n required: true\n slack-token:\n description: Slack bot token\n required: false\n slack-channel-id:\n description: Slack channel id\n required: false\n user-mapping:\n description: JSON string mapping GitHub usernames to Slack user IDs\n required: false\n package-manager:\n description: Package manager used for dependency installation (pnpm, npm, yarn, bun)\n required: false\n default: pnpm\n\noutputs:\n app-url:\n description: Deployed application URL\n value: ${{ steps.tailor-apply.outputs.app-url }}\n\nruns:\n using: composite\n steps:\n # __STATIC_WEBSITE_BUILD_START__\n - id: build-site\n shell: bash\n run: |\n # Replace with your static website build command.\n # Example: pnpm --filter <package-name> run build:static\n # Note: this run: command is user-editable. Custom build commands are preserved across\n # reruns and are not treated as drift by setup check. Other edits to this file are flagged\n # as drift and will be overwritten if you re-run setup action with --force.\n true\n # __STATIC_WEBSITE_BUILD_END__\n - id: tailor-apply\n uses: tailor-platform/actions/deploy@e74173d4bdd931d036ad359cf5f7729fc6aa7067 # v1.5.1\n with:\n workspace-id: ${{ inputs.workspace-id }}\n working-directory: ${{ inputs.working-directory }}\n package-manager: ${{ inputs.package-manager }}\n platform-client-id: ${{ inputs.platform-client-id }}\n platform-client-secret: ${{ inputs.platform-client-secret }}\n - id: tailor-notify\n if: failure() && inputs.slack-token != '' && inputs.slack-channel-id != ''\n uses: tailor-platform/actions/notify@e74173d4bdd931d036ad359cf5f7729fc6aa7067 # v1.5.1\n with:\n provider: slack\n status: failure\n workspace-name: ${{ inputs.name }}\n slack-token: ${{ inputs.slack-token }}\n slack-channel-id: ${{ inputs.slack-channel-id }}\n user-mapping: ${{ inputs.user-mapping }}\n";
3174
+ var action_default = "# __HEADER__\nname: __WORKSPACE_NAME__\ndescription: >-\n Deploy __WORKSPACE_NAME__ to Tailor Platform.\n Checkout and dependency installation are expected to be handled by the caller.\n\ninputs:\n workspace-id:\n description: Tailor Platform workspace id\n required: true\n name:\n description: Workspace name (used in Slack notifications)\n required: true\n working-directory:\n description: App directory relative to the repository root\n required: false\n default: \".\"\n config:\n description: SDK config path, or comma-separated config paths for multi-config deploys\n required: false\n default: \"tailor.config.ts\"\n deploy:\n description: Whether to run the Tailor deploy step after build steps\n required: false\n default: \"true\"\n build-site:\n description: Whether to run the static website build slot when present\n required: false\n default: \"true\"\n platform-client-id:\n description: Machine-user client id\n required: true\n platform-client-secret:\n description: Machine-user client secret\n required: true\n slack-token:\n description: Slack bot token\n required: false\n slack-channel-id:\n description: Slack channel id\n required: false\n user-mapping:\n description: JSON string mapping GitHub usernames to Slack user IDs\n required: false\n package-manager:\n description: Package manager used for dependency installation (pnpm, npm, yarn, bun)\n required: false\n default: pnpm\n\noutputs:\n app-url:\n description: Deployed application URL\n value: ${{ steps.tailor-apply.outputs.app-url }}\n\nruns:\n using: composite\n steps:\n # __STATIC_WEBSITE_BUILD_START__\n - id: build-site\n if: inputs.build-site == 'true'\n shell: bash\n run: |\n # Replace with your static website build command.\n # Example: pnpm --filter <package-name> run build:static\n # Note: this run: command is user-editable. Custom build commands are preserved across\n # reruns and are not treated as drift by setup check. Other edits to this file are flagged\n # as drift and will be overwritten if you re-run setup action with --force.\n true\n # __STATIC_WEBSITE_BUILD_END__\n - id: tailor-apply\n if: inputs.deploy == 'true'\n uses: tailor-platform/actions/deploy@e74173d4bdd931d036ad359cf5f7729fc6aa7067 # v1.5.1\n env:\n TAILOR_PLATFORM_SDK_CONFIG_PATH: ${{ inputs.config }}\n with:\n workspace-id: ${{ inputs.workspace-id }}\n working-directory: ${{ inputs.working-directory }}\n package-manager: ${{ inputs.package-manager }}\n platform-client-id: ${{ inputs.platform-client-id }}\n platform-client-secret: ${{ inputs.platform-client-secret }}\n - id: tailor-notify\n if: failure() && inputs.slack-token != '' && inputs.slack-channel-id != ''\n uses: tailor-platform/actions/notify@e74173d4bdd931d036ad359cf5f7729fc6aa7067 # v1.5.1\n with:\n provider: slack\n status: failure\n workspace-name: ${{ inputs.name }}\n slack-token: ${{ inputs.slack-token }}\n slack-channel-id: ${{ inputs.slack-channel-id }}\n user-mapping: ${{ inputs.user-mapping }}\n";
3173
3175
 
3174
3176
  //#endregion
3175
3177
  //#region src/cli/commands/setup/branch.workflow.yml
@@ -3366,7 +3368,7 @@ const ACTIONS_SHA = "e74173d4bdd931d036ad359cf5f7729fc6aa7067";
3366
3368
  * @returns Rendered YAML and the list of managed job/step ids
3367
3369
  */
3368
3370
  function renderCoordinateWorkflow(params) {
3369
- const { coordinatorName, kind, apps, environment, packageManager } = params;
3371
+ const { coordinatorName, kind, actionGroups, environment, packageManager } = params;
3370
3372
  const isTag = kind === "tag";
3371
3373
  const branch = params.branch;
3372
3374
  const tagPattern = params.tagPattern ?? "v*";
@@ -3401,29 +3403,60 @@ function renderCoordinateWorkflow(params) {
3401
3403
  ` with:`,
3402
3404
  ` package-manager: ${packageManager}`
3403
3405
  ].join("\n");
3404
- const perAppPlanSteps = apps.flatMap((app) => {
3406
+ const configPath = (app) => app.dir === "." ? "tailor.config.ts" : `${app.dir}/tailor.config.ts`;
3407
+ const groupConfigPath = (group) => group.apps.map(configPath).join(",");
3408
+ const firstApp = (group) => {
3409
+ const [app] = group.apps;
3410
+ if (!app) throw new Error("Coordinate action groups must contain at least one app.");
3411
+ return app;
3412
+ };
3413
+ const singleAppPlanStep = (group, app) => {
3405
3414
  const wd = app.dir !== "." ? app.dir : void 0;
3406
3415
  const wdLine = wd ? `\n working-directory: ${wd}` : "";
3407
3416
  return [
3408
- `- id: tailor-generate-check-${app.name}`,
3409
- ` uses: tailor-platform/actions/generate-check@${ACTIONS_SHA} # v1.5.1`,
3410
- ` with:`,
3411
- ` package-manager: ${packageManager}${wdLine}`,
3412
- `- id: tailor-plan-${app.name}`,
3417
+ `- id: tailor-plan-${group.id}`,
3413
3418
  ` if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork`,
3414
3419
  ` uses: tailor-platform/actions/plan@${ACTIONS_SHA} # v1.5.1`,
3415
3420
  ` with:`,
3416
3421
  ` workspace-id: \${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}`,
3417
3422
  ` package-manager: ${packageManager}${wdLine}`,
3418
- ` label: ${coordinatorName}/${app.name}`,
3423
+ ` label: ${coordinatorName}/${group.id}`,
3419
3424
  ` platform-client-id: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}`,
3420
3425
  ` platform-client-secret: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}`,
3421
3426
  ` github-token: \${{ secrets.GITHUB_TOKEN }}`
3422
3427
  ];
3428
+ };
3429
+ const multiConfigPlanStep = (group) => [
3430
+ `- id: tailor-plan-${group.id}`,
3431
+ ` if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork`,
3432
+ ` uses: tailor-platform/actions/plan@${ACTIONS_SHA} # v1.5.1`,
3433
+ ` env:`,
3434
+ ` TAILOR_PLATFORM_SDK_CONFIG_PATH: ${groupConfigPath(group)}`,
3435
+ ` with:`,
3436
+ ` workspace-id: \${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}`,
3437
+ ` package-manager: ${packageManager}`,
3438
+ ` label: ${coordinatorName}/${group.id}`,
3439
+ ` platform-client-id: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}`,
3440
+ ` platform-client-secret: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}`,
3441
+ ` github-token: \${{ secrets.GITHUB_TOKEN }}`
3442
+ ];
3443
+ const perAppPlanSteps = actionGroups.flatMap((group) => {
3444
+ const generateCheckSteps = group.apps.flatMap((app) => {
3445
+ const wd = app.dir !== "." ? app.dir : void 0;
3446
+ const wdLine = wd ? `\n working-directory: ${wd}` : "";
3447
+ return [
3448
+ `- id: tailor-generate-check-${app.name}`,
3449
+ ` uses: tailor-platform/actions/generate-check@${ACTIONS_SHA} # v1.5.1`,
3450
+ ` with:`,
3451
+ ` package-manager: ${packageManager}${wdLine}`
3452
+ ];
3453
+ });
3454
+ const planStep = group.apps.length === 1 ? singleAppPlanStep(group, firstApp(group)) : multiConfigPlanStep(group);
3455
+ return [...generateCheckSteps, ...planStep];
3423
3456
  }).join("\n");
3424
3457
  out = line(out, "PER_APP_PLAN_STEPS", `${driftCheckStep}\n${perAppPlanSteps}`);
3425
- const deploySteps = apps.flatMap((app) => [
3426
- `- id: tailor-deploy-${app.name}`,
3458
+ const singleAppDeployStep = (group, app) => [
3459
+ `- id: tailor-deploy-${group.id}`,
3427
3460
  ` uses: ./.github/actions/tailor-${app.name}`,
3428
3461
  ` with:`,
3429
3462
  ` workspace-id: \${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}`,
@@ -3435,7 +3468,39 @@ function renderCoordinateWorkflow(params) {
3435
3468
  ` slack-token: \${{ secrets.TAILOR_SLACK_BOT_TOKEN }}`,
3436
3469
  ` slack-channel-id: \${{ vars.TAILOR_SLACK_CHANNEL_ID }}`,
3437
3470
  ` # editable: api-url:`
3438
- ]).join("\n");
3471
+ ];
3472
+ const buildSiteStep = (app) => [
3473
+ `- id: tailor-build-site-${app.name}`,
3474
+ ` uses: ./.github/actions/tailor-${app.name}`,
3475
+ ` with:`,
3476
+ ` workspace-id: \${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}`,
3477
+ ` name: ${app.name}`,
3478
+ ` working-directory: ${app.dir}`,
3479
+ ` deploy: "false"`,
3480
+ ` package-manager: ${packageManager}`,
3481
+ ` platform-client-id: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}`,
3482
+ ` platform-client-secret: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}`,
3483
+ ` slack-token: \${{ secrets.TAILOR_SLACK_BOT_TOKEN }}`,
3484
+ ` slack-channel-id: \${{ vars.TAILOR_SLACK_CHANNEL_ID }}`
3485
+ ];
3486
+ const multiConfigDeployStep = (group) => [
3487
+ ...group.apps.filter((app) => app.hasStaticWebsites).flatMap(buildSiteStep),
3488
+ `- id: tailor-deploy-${group.id}`,
3489
+ ` uses: ./.github/actions/tailor-${firstApp(group).name}`,
3490
+ ` with:`,
3491
+ ` workspace-id: \${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}`,
3492
+ ` name: ${coordinatorName}/${group.id}`,
3493
+ ` working-directory: .`,
3494
+ ` config: ${groupConfigPath(group)}`,
3495
+ ` build-site: "false"`,
3496
+ ` package-manager: ${packageManager}`,
3497
+ ` platform-client-id: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}`,
3498
+ ` platform-client-secret: \${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}`,
3499
+ ` slack-token: \${{ secrets.TAILOR_SLACK_BOT_TOKEN }}`,
3500
+ ` slack-channel-id: \${{ vars.TAILOR_SLACK_CHANNEL_ID }}`,
3501
+ ` # editable: api-url:`
3502
+ ];
3503
+ const deploySteps = actionGroups.flatMap((group) => group.apps.length === 1 ? singleAppDeployStep(group, firstApp(group)) : multiConfigDeployStep(group)).join("\n");
3439
3504
  out = line(out, "PER_APP_DEPLOY_STEPS", deploySteps);
3440
3505
  out = out.replaceAll("__WORKSPACE_NAME__", () => coordinatorName);
3441
3506
  out = out.replaceAll("__ENVIRONMENT__", () => environment);
@@ -3444,9 +3509,15 @@ function renderCoordinateWorkflow(params) {
3444
3509
  const generatedIds = [];
3445
3510
  if (isTag && branch !== void 0) generatedIds.push("tailor-tag-guard", "tailor-tag-guard/tailor-checkout", "tailor-tag-guard/tailor-tag-guard");
3446
3511
  generatedIds.push("tailor-plan", "tailor-plan/tailor-checkout", "tailor-plan/tailor-setup", "tailor-plan/tailor-drift-check");
3447
- for (const app of apps) generatedIds.push(`tailor-plan/tailor-generate-check-${app.name}`, `tailor-plan/tailor-plan-${app.name}`);
3512
+ for (const group of actionGroups) {
3513
+ for (const app of group.apps) generatedIds.push(`tailor-plan/tailor-generate-check-${app.name}`);
3514
+ generatedIds.push(`tailor-plan/tailor-plan-${group.id}`);
3515
+ }
3448
3516
  generatedIds.push("tailor-deploy", "tailor-deploy/tailor-checkout", "tailor-deploy/tailor-setup");
3449
- for (const app of apps) generatedIds.push(`tailor-deploy/tailor-deploy-${app.name}`);
3517
+ for (const group of actionGroups) {
3518
+ for (const app of group.apps) if (group.apps.length > 1 && app.hasStaticWebsites) generatedIds.push(`tailor-deploy/tailor-build-site-${app.name}`);
3519
+ generatedIds.push(`tailor-deploy/tailor-deploy-${group.id}`);
3520
+ }
3450
3521
  return {
3451
3522
  content: out,
3452
3523
  generatedIds
@@ -3484,6 +3555,25 @@ function renderTailorSetupAction(params) {
3484
3555
 
3485
3556
  //#endregion
3486
3557
  //#region src/cli/commands/setup/generate.ts
3558
+ function actionName(input) {
3559
+ return input.startsWith("tailor-") ? input.slice(7) : input;
3560
+ }
3561
+ function splitActionGroup(input) {
3562
+ const names = input.split(",").map((entry) => actionName(entry.trim()));
3563
+ if (names.some((name) => name.length === 0)) throw new Error("--action must contain one or more non-empty action names.");
3564
+ return names;
3565
+ }
3566
+ function uniqueGroupId(names, usedIds) {
3567
+ const base = names.join("-");
3568
+ let id = base;
3569
+ let suffix = 2;
3570
+ while (usedIds.has(id)) {
3571
+ id = `${base}-${suffix}`;
3572
+ suffix += 1;
3573
+ }
3574
+ usedIds.add(id);
3575
+ return id;
3576
+ }
3487
3577
  async function defaultLoadConfigName(configPath) {
3488
3578
  const { config } = await loadConfig(configPath);
3489
3579
  return config.name;
@@ -3674,7 +3764,7 @@ async function resolve$1(options) {
3674
3764
  configPath
3675
3765
  };
3676
3766
  }
3677
- const BUILD_SITE_RUN_RE = /([ \t]*- id: build-site\n[ \t]+shell: bash\n[ \t]+run: \|)([\s\S]*?)(\n[ \t]*- |\n*$)/;
3767
+ const BUILD_SITE_RUN_RE = /([ \t]*- id: build-site\n(?:[ \t]+if: [^\n]+\n)?[ \t]+shell: bash\n[ \t]+run: \|)([\s\S]*?)(\n[ \t]*- |\n*$)/;
3678
3768
  /**
3679
3769
  * Strip the mutable run: body of the build-site step before hashing.
3680
3770
  * When hasStaticWebsites is true the step is present; users are expected to
@@ -3816,7 +3906,7 @@ async function setupTarget(options) {
3816
3906
  kind: resolved.kind,
3817
3907
  workspaceName: resolved.workspaceName,
3818
3908
  file: resolved.file,
3819
- templateVersion: 6,
3909
+ templateVersion: 7,
3820
3910
  inputs: resolved.inputs,
3821
3911
  generatedIds: resolved.render.generatedIds,
3822
3912
  ejectedIds: existing?.ejectedIds ?? [],
@@ -3874,23 +3964,33 @@ async function setupCoordinate(options) {
3874
3964
  const packageManager = detectPackageManager(outputDir);
3875
3965
  const lock = readLock(outputDir);
3876
3966
  if (!lock) throw new Error(".github/tailor.lock not found. Run `tailor setup action --name <name>` for each app before running setup coordinate.");
3967
+ const actionTargets = new Map(lock.targets.filter((t) => t.kind === "action").map((target) => [target.workspaceName, target]));
3877
3968
  const seenNames = /* @__PURE__ */ new Set();
3878
- const apps = actions.map((actionName) => {
3879
- const name = actionName.startsWith("tailor-") ? actionName.slice(7) : actionName;
3880
- if (seenNames.has(name)) throw new Error(`Duplicate --action "${name}". Each composite action can only appear once in a coordinator.`);
3881
- seenNames.add(name);
3882
- const entry = lock.targets.find((t) => t.kind === "action" && t.workspaceName === name);
3883
- if (!entry) throw new Error(`Action target "${name}" not found in .github/tailor.lock. Run \`tailor setup action --name ${name}\` first.`);
3884
- validateDir(entry.inputs.dir);
3969
+ const usedGroupIds = /* @__PURE__ */ new Set();
3970
+ const actionGroups = actions.map((actionGroup) => {
3971
+ const names = splitActionGroup(actionGroup);
3972
+ const apps = names.map((name) => {
3973
+ if (seenNames.has(name)) throw new Error(`Duplicate --action "${name}". Each composite action can only appear once in a coordinator.`);
3974
+ seenNames.add(name);
3975
+ const entry = actionTargets.get(name);
3976
+ if (!entry) throw new Error(`Action target "${name}" not found in .github/tailor.lock. Run \`tailor setup action --name ${name}\` first.`);
3977
+ if (names.length > 1 && entry.templateVersion < 7) throw new Error(`Action target "${name}" was generated with an older setup template. Run \`tailor setup action --name ${name} --force\` before grouping it in setup coordinate.`);
3978
+ validateDir(entry.inputs.dir);
3979
+ return {
3980
+ name,
3981
+ dir: entry.inputs.dir,
3982
+ hasStaticWebsites: entry.inputs.hasStaticWebsites
3983
+ };
3984
+ });
3885
3985
  return {
3886
- name,
3887
- dir: entry.inputs.dir
3986
+ id: uniqueGroupId(names, usedGroupIds),
3987
+ apps
3888
3988
  };
3889
3989
  });
3890
3990
  const render = renderCoordinateWorkflow({
3891
3991
  coordinatorName,
3892
3992
  kind: coordinateKind,
3893
- apps,
3993
+ actionGroups,
3894
3994
  branch: branch ?? void 0,
3895
3995
  tagPattern: coordinateKind === "tag" ? tagPattern : void 0,
3896
3996
  environment,
@@ -3926,7 +4026,7 @@ async function setupCoordinate(options) {
3926
4026
  kind: "coordinate",
3927
4027
  workspaceName: coordinatorName,
3928
4028
  file,
3929
- templateVersion: 6,
4029
+ templateVersion: 7,
3930
4030
  inputs: {
3931
4031
  branch,
3932
4032
  branchAutoDetected: coordinateKind === "branch" ? branchAutoDetected : branch !== null ? false : void 0,
@@ -3934,7 +4034,7 @@ async function setupCoordinate(options) {
3934
4034
  environment,
3935
4035
  dir: ".",
3936
4036
  packageManager,
3937
- actionDirs: apps.map((a) => a.dir)
4037
+ actionDirs: actionGroups.flatMap((group) => group.apps.map((a) => a.dir))
3938
4038
  },
3939
4039
  generatedIds: render.generatedIds,
3940
4040
  ejectedIds: existing?.ejectedIds ?? [],
@@ -3958,8 +4058,8 @@ async function setupCoordinate(options) {
3958
4058
  logger.log(` gh secret set TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID --env ${environment}`);
3959
4059
  logger.log(` gh secret set TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET --env ${environment}`);
3960
4060
  logger.newline();
3961
- logger.log(`2. Provision each workspace and set TAILOR_PLATFORM_WORKSPACE_ID on the "${environment}" environment:`);
3962
- logger.log(" tailor workspace create # one per app; copy the id");
4061
+ logger.log(`2. Provision the target workspace and set TAILOR_PLATFORM_WORKSPACE_ID on the "${environment}" environment:`);
4062
+ logger.log(" tailor workspace create # if it does not exist yet; copy the id");
3963
4063
  logger.log(` gh variable set TAILOR_PLATFORM_WORKSPACE_ID --env ${environment}`);
3964
4064
  logger.newline();
3965
4065
  logger.log("3. Commit the generated files:");
@@ -4114,7 +4214,7 @@ async function checkGitHub(options) {
4114
4214
  currentHash,
4115
4215
  configExists,
4116
4216
  defaultBranch,
4117
- templateVersion: 6,
4217
+ templateVersion: 7,
4118
4218
  erdNamespaces,
4119
4219
  hasMigrations,
4120
4220
  hasSeeds,
@@ -4152,7 +4252,7 @@ function resolveMatch(outputDir, targets, input) {
4152
4252
  }
4153
4253
  function warnCoordinatorReferences(allTargets, deletedKeys, match) {
4154
4254
  if (match.target.kind !== "action") return;
4155
- for (const coordinator of allTargets) if (coordinator.kind === "coordinate" && coordinator.inputs.actionDirs?.includes(match.target.inputs.dir) && !deletedKeys.has(targetKey(coordinator))) logger.warn(`Coordinator "${coordinator.workspaceName}" still references this action's directory (${match.target.inputs.dir}). Re-run \`tailor-sdk setup coordinate\` without --action ${match.target.workspaceName} to remove it there too.`);
4255
+ for (const coordinator of allTargets) if (coordinator.kind === "coordinate" && coordinator.inputs.actionDirs?.includes(match.target.inputs.dir) && !deletedKeys.has(targetKey(coordinator))) logger.warn(`Coordinator "${coordinator.workspaceName}" still references this action's directory (${match.target.inputs.dir}). Remove \`${match.target.workspaceName}\` from the relevant \`--action\` value and re-run \`tailor-sdk setup coordinate\` to update it.`);
4156
4256
  }
4157
4257
  /**
4158
4258
  * Delete managed workflow/action files and their `.github/tailor-sdk.lock` entries.
@@ -4220,7 +4320,7 @@ const coordinateCommand = defineAppCommand({
4220
4320
  alias: "n",
4221
4321
  description: "Coordinator name (used in the generated workflow file name and job names)"
4222
4322
  }),
4223
- action: arg(z.array(z.string().min(1)).min(1), { description: "Composite action to include (can be specified multiple times). tailor- prefix optional." }),
4323
+ action: arg(z.array(z.string().min(1)).min(1), { description: "Composite action to include. Repeat for separate deploy steps, or use commas to deploy actions as one multi-config group. tailor- prefix optional." }),
4224
4324
  branch: arg(z.string().min(1).optional(), { description: "Branch target: deploy trigger branch (defaults to the detected default branch)" }),
4225
4325
  tag: arg(z.boolean().default(false), { description: "Generate a tag target coordinator" }),
4226
4326
  environment: arg(z.string().min(1).optional(), { description: "GitHub Environment for the plan/deploy jobs" }),
@@ -6327,7 +6427,7 @@ async function fetchRemoteTypes(client, workspaceId, namespace) {
6327
6427
  async function assertMigrationsReproduceLocalTypes(loaded, target) {
6328
6428
  const { config, plugins } = loaded;
6329
6429
  const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
6330
- const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-D2hSK1ZL.mjs");
6430
+ const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-BO4ZF8wP.mjs");
6331
6431
  const application = defineApplication({
6332
6432
  config,
6333
6433
  pluginManager