@tailor-platform/sdk 1.66.1 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/application-Djeezk3m.mjs +4 -0
- package/dist/{client-F0a4cWUM.mjs → application-WpWwTyk9.mjs} +5734 -20
- package/dist/application-WpWwTyk9.mjs.map +1 -0
- package/dist/{authconnection-D8SJGMpj.mjs → authconnection-Ds2Ahpum.mjs} +2 -2
- package/dist/{authconnection-D8SJGMpj.mjs.map → authconnection-Ds2Ahpum.mjs.map} +1 -1
- package/dist/cli/index.mjs +18 -64
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +7 -7
- package/dist/cli/lib.mjs +3 -4
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +2 -2
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{context-s0lxhu8_.mjs → context-CDQqIv4u.mjs} +2 -2
- package/dist/{context-s0lxhu8_.mjs.map → context-CDQqIv4u.mjs.map} +1 -1
- package/dist/{crashreport-Bf6uT6mf.mjs → crashreport-6jpCceOF.mjs} +1 -1
- package/dist/{crashreport-0EHy-ayY.mjs → crashreport-u9y2npiy.mjs} +5 -7
- package/dist/{crashreport-0EHy-ayY.mjs.map → crashreport-u9y2npiy.mjs.map} +1 -1
- package/dist/enum-constants-C7DaWeQo.mjs.map +1 -1
- package/dist/field-C4zdJLW5.mjs.map +1 -1
- package/dist/{file-B58Dm-2P.mjs → file-BkxupbYP.mjs} +2 -2
- package/dist/{file-B58Dm-2P.mjs.map → file-BkxupbYP.mjs.map} +1 -1
- package/dist/file-utils-BHPxPXmn.mjs.map +1 -1
- package/dist/{iconv-DreIffeM.mjs → iconv-D1zmPjvi.mjs} +2 -2
- package/dist/{iconv-DreIffeM.mjs.map → iconv-D1zmPjvi.mjs.map} +1 -1
- package/dist/{idp-Ch95ag8h.mjs → idp-BZPqpcYY.mjs} +2 -2
- package/dist/{idp-Ch95ag8h.mjs.map → idp-BZPqpcYY.mjs.map} +1 -1
- package/dist/{index-Db2RvnEH.d.mts → index-CklcVeMG.d.mts} +2 -2
- package/dist/{index-CZ2r3qiO.d.mts → index-DYhnxXYR.d.mts} +2 -2
- package/dist/{index-QpC0TNbH.d.mts → index-DlDRSzFZ.d.mts} +2 -2
- package/dist/{index-BdLqzJDu.d.mts → index-DvEUb3pX.d.mts} +15 -9
- package/dist/{index-Bhjep8cS.d.mts → index-hXoO-AOC.d.mts} +2 -2
- package/dist/job-BpsFXPbi.mjs.map +1 -1
- package/dist/kysely-type-D1e0Vwkd.mjs.map +1 -1
- package/dist/mock-DMgIygjE.mjs.map +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -3
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/registry-D0uB0OrK.mjs.map +1 -1
- package/dist/runtime/authconnection.mjs +1 -1
- package/dist/runtime/context.mjs +1 -1
- package/dist/runtime/file.mjs +1 -1
- package/dist/runtime/iconv.mjs +1 -1
- package/dist/runtime/idp.mjs +1 -1
- package/dist/runtime/index.mjs +7 -7
- package/dist/runtime/secretmanager.mjs +1 -1
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/{runtime-2nzOZCUb.mjs → runtime-BU6KtCvk.mjs} +9 -35
- package/dist/runtime-BU6KtCvk.mjs.map +1 -0
- package/dist/schema-1msIhXwA.mjs.map +1 -1
- package/dist/{secret-file-CWzF8rry.mjs → secret-file-eB3R3Fil.mjs} +27 -2
- package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-eB3R3Fil.mjs.map} +1 -1
- package/dist/{secretmanager-B9h-U_8U.mjs → secretmanager-h3tBJV8f.mjs} +2 -2
- package/dist/{secretmanager-B9h-U_8U.mjs.map → secretmanager-h3tBJV8f.mjs.map} +1 -1
- package/dist/{seed-BH2FbrPV.mjs → seed-YAbtMy65.mjs} +2 -2
- package/dist/seed-YAbtMy65.mjs.map +1 -0
- package/dist/{service-DMohAx8a2.mjs → service-DMohAx8a.mjs} +1 -1
- package/dist/service-DMohAx8a.mjs.map +1 -0
- package/dist/service-wI3Hvrgx.mjs.map +1 -1
- package/dist/{plugin-DylAsA4Z.d.mts → types-Bzr0RQME.d.mts} +342 -36
- package/dist/types-CmzfQP_m.mjs.map +1 -1
- package/dist/types-DTcZ2Yax.d.mts +74 -0
- package/dist/{tailordb-C-ar4XCX.d.mts → types-DZrtN6-H.d.mts} +89 -239
- package/dist/utils/test/index.d.mts +3 -3
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/index.d.mts +1 -1
- package/dist/{workflow--aPbA8Uq.mjs → workflow-C8I7shjM.mjs} +2 -2
- package/dist/{workflow--aPbA8Uq.mjs.map → workflow-C8I7shjM.mjs.map} +1 -1
- package/dist/{workflow.generated--1Qc15Et.d.mts → workflow.generated-1S50BhEb.d.mts} +17 -241
- package/docs/cli-reference.md +18 -17
- package/docs/github-actions.md +2 -2
- package/package.json +11 -9
- package/dist/actor-D_2aJjYO.d.mts +0 -24
- package/dist/application-DGDmL8i_.mjs +0 -5620
- package/dist/application-DGDmL8i_.mjs.map +0 -1
- package/dist/application-nTydHJm8.mjs +0 -4
- package/dist/client-F0a4cWUM.mjs.map +0 -1
- package/dist/client-boxXYevx.mjs +0 -4
- package/dist/env-B-g-qgE4.d.mts +0 -7
- package/dist/runtime-2nzOZCUb.mjs.map +0 -1
- package/dist/seed-BH2FbrPV.mjs.map +0 -1
- package/dist/service-DMohAx8a2.mjs.map +0 -1
- /package/dist/{chunk-BkoGK1jX.mjs → rolldown-runtime-BkoGK1jX.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { t as __exportAll } from "./
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BkoGK1jX.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/authconnection.ts
|
|
5
5
|
var authconnection_exports = /* @__PURE__ */ __exportAll({ getConnectionToken: () => getConnectionToken });
|
|
@@ -13,4 +13,4 @@ const getConnectionToken = (...args) => api().getConnectionToken(...args);
|
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
export { getConnectionToken as n, authconnection_exports as t };
|
|
16
|
-
//# sourceMappingURL=authconnection-
|
|
16
|
+
//# sourceMappingURL=authconnection-Ds2Ahpum.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authconnection-
|
|
1
|
+
{"version":3,"file":"authconnection-Ds2Ahpum.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 * @example\n * import { authconnection } from \"@tailor-platform/sdk/runtime\";\n *\n * const token = await authconnection.getConnectionToken(\"my-connection\");\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Platform API surface for `tailor.authconnection`. Describes the shape the\n * platform runtime injects on `globalThis.tailor.authconnection`.\n *\n * Each method below is also re-exported as a top-level named export from this\n * module so callers can either `import * as authconnection from\n * \"@tailor-platform/sdk/runtime/authconnection\"` or pick individual methods.\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 (provider-specific shape)\n */\n getConnectionToken(connectionName: string): Promise<any>;\n}\n\nconst api = (): TailorAuthconnectionAPI =>\n (globalThis as { tailor: { authconnection: TailorAuthconnectionAPI } }).tailor.authconnection;\n\n/**\n * See {@link TailorAuthconnectionAPI.getConnectionToken}.\n * @param args - Forwarded to {@link TailorAuthconnectionAPI.getConnectionToken}\n * @returns Token payload (provider-specific shape)\n */\nexport const getConnectionToken: TailorAuthconnectionAPI[\"getConnectionToken\"] = (...args) =>\n api().getConnectionToken(...args);\n"],"mappings":";;;;;AA+BA,MAAM,YACH,WAAuE,OAAO;;;;;;AAOjF,MAAa,sBAAqE,GAAG,SACnF,IAAI,CAAC,CAAC,mBAAmB,GAAG,IAAI"}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { A as loadMachineUserName, B as fetchPlatformMachineUserToken, C as hashContent$1, D as fetchLatestToken, Dt as FunctionExecution_Type, E as deleteUserTokens, F as writePlatformConfig, H as initOAuth2Client, I as closeConnectionPool, L as fetchAll, M as readPlatformConfig, N as resolveTokens, O as loadAccessToken, P as saveUserTokens, S as getDistDir, T as loadConfig, U as initOperatorClient, V as fetchUserInfo, _ as createLogLevelTreeshakeOptions, a as WorkflowJobSchema, c as INVOKER_EXPR, cn as PATScope, ft as CustomDomainStatus, g as composeFunctionTreeshakeOptions, h as platformBundleDefinePlugin, i as resolveInlineSourcemap, j as loadWorkspaceId, o as ResolverSchema, t as defineApplication, tn as AuthInvokerSchema, v as resolveBundleLogLevel, z as fetchPaged } from "../application-WpWwTyk9.mjs";
|
|
4
4
|
import { t as assertDefined } from "../assert-CKfwrmCV.mjs";
|
|
5
5
|
import { n as logger, r as styles } from "../logger-DpJyJvNz.mjs";
|
|
6
|
-
import { $ as listCommand$10, $t as INITIAL_SCHEMA_NUMBER, An as commonArgs, At as startCommand, B as logBetaWarning, C as listCommand$13, Cn as PluginManager, Dt as jobsCommand, E as resumeCommand, En as apiCommand, F as writeDbTypesFile, Fn as pagedLogArgs, Gt as MIGRATION_LABEL_KEY, H as removeCommand$1, Ht as executeScript, I as getConfiguredEditorCommand, In as paginationArgs, Jt as compareSnapshotWithRemote, K as treeCommand, Kt as handleOptionalToRequiredError, L as openInConfiguredEditor, Ln as toPageDirection, Lt as functionExecutionStatusToString, Mn as confirmationArgs, Mt as getCommand$6, N as generateCommand$1, Nn as deploymentArgs, O as listCommand$12, On as assertWritable, P as generateMigrationScript, Pn as isVerbose, Pt as executionsCommand, Rn as workspaceArgs, Rt as formatKeyValueTable, Sn as sdkNameLabelKey, St as triggerCommand, T as healthCommand, Tn as prompt, U as updateCommand$3, Vt as deploy, Xt as protoGqlPermission, Y as getCommand$5, Yt as generateAllTypeManifestsFromSnapshot, Z as updateCommand$2, _n as formatMigrationDiff, an as createSnapshotFromLocalTypes, at as createCommand$3, b as createCommand$4, bn as ensureConfigId, c as listCommand$14, cn as getMigrationFilePath, dn as isValidMigrationNumber, f as restoreCommand, fn as loadDiff, ft as tokenCommand, g as getCommand$7, gt as listCommand$7, hn as parseMigrationNumberArg, ht as generate, i as updateCommand$4, j as truncateCommand, jn as configArg, kn as defineAppCommand, ln as getMigrationFiles, lt as getCommand$3, m as listCommand$15, mn as formatMigrationNumber, nn as assertValidMigrationFiles, o as removeCommand, on as getLatestMigrationNumber, pn as reconstructSnapshotFromMigrations, pt as listCommand$8, q as listCommand$11, qt as parseMigrationLabelNumber, r as queryCommand, rn as compareLocalTypesWithSnapshot, rt as deleteCommand$3, st as listCommand$9, t as isNativeTypeScriptRuntime, tt as getCommand$4, u as inviteCommand, v as deleteCommand$4, vn as hasChanges, vt as getCommand$2, wn as generateUserTypes, wt as listCommand$6, xn as resourceTrn, xt as webhookCommand, yn as getNamespacesWithMigrations, z as showCommand, zt as getCommand$1 } from "../runtime-
|
|
7
|
-
import { A as readPlatformConfig, C as loadConfig, E as loadAccessToken, M as saveUserTokens, N as writePlatformConfig, O as loadMachineUserName, T as fetchLatestToken, _ as createLogLevelTreeshakeOptions, a as WorkflowJobSchema, b as getDistDir, c as INVOKER_EXPR, g as composeFunctionTreeshakeOptions, h as platformBundleDefinePlugin, i as resolveInlineSourcemap, j as resolveTokens, k as loadWorkspaceId, o as ResolverSchema, t as defineApplication, v as resolveBundleLogLevel, w as deleteUserTokens, x as hashContent$1 } from "../application-DGDmL8i_.mjs";
|
|
6
|
+
import { $ as listCommand$10, $t as INITIAL_SCHEMA_NUMBER, An as commonArgs, At as startCommand, B as logBetaWarning, C as listCommand$13, Cn as PluginManager, Dt as jobsCommand, E as resumeCommand, En as apiCommand, F as writeDbTypesFile, Fn as pagedLogArgs, Gt as MIGRATION_LABEL_KEY, H as removeCommand$1, Ht as executeScript, I as getConfiguredEditorCommand, In as paginationArgs, Jt as compareSnapshotWithRemote, K as treeCommand, Kt as handleOptionalToRequiredError, L as openInConfiguredEditor, Ln as toPageDirection, Lt as functionExecutionStatusToString, Mn as confirmationArgs, Mt as getCommand$6, N as generateCommand$1, Nn as deploymentArgs, O as listCommand$12, On as assertWritable, P as generateMigrationScript, Pn as isVerbose, Pt as executionsCommand, Rn as workspaceArgs, Rt as formatKeyValueTable, Sn as sdkNameLabelKey, St as triggerCommand, T as healthCommand, Tn as prompt, U as updateCommand$3, Vt as deploy, Xt as protoGqlPermission, Y as getCommand$5, Yt as generateAllTypeManifestsFromSnapshot, Z as updateCommand$2, _n as formatMigrationDiff, an as createSnapshotFromLocalTypes, at as createCommand$3, b as createCommand$4, bn as ensureConfigId, c as listCommand$14, cn as getMigrationFilePath, dn as isValidMigrationNumber, f as restoreCommand, fn as loadDiff, ft as tokenCommand, g as getCommand$7, gt as listCommand$7, hn as parseMigrationNumberArg, ht as generate, i as updateCommand$4, j as truncateCommand, jn as configArg, kn as defineAppCommand, ln as getMigrationFiles, lt as getCommand$3, m as listCommand$15, mn as formatMigrationNumber, nn as assertValidMigrationFiles, o as removeCommand, on as getLatestMigrationNumber, pn as reconstructSnapshotFromMigrations, pt as listCommand$8, q as listCommand$11, qt as parseMigrationLabelNumber, r as queryCommand, rn as compareLocalTypesWithSnapshot, rt as deleteCommand$3, st as listCommand$9, t as isNativeTypeScriptRuntime, tt as getCommand$4, u as inviteCommand, v as deleteCommand$4, vn as hasChanges, vt as getCommand$2, wn as generateUserTypes, wt as listCommand$6, xn as resourceTrn, xt as webhookCommand, yn as getNamespacesWithMigrations, z as showCommand, zt as getCommand$1 } from "../runtime-BU6KtCvk.mjs";
|
|
8
7
|
import { n as ExecutorSchema } from "../service-wI3Hvrgx.mjs";
|
|
9
8
|
import { t as multiline } from "../multiline-Cf9ODpr1.mjs";
|
|
10
|
-
import { r as isPluginGeneratedType } from "../seed-
|
|
9
|
+
import { r as isPluginGeneratedType } from "../seed-YAbtMy65.mjs";
|
|
11
10
|
import { t as readPackageJson } from "../package-json-DcQApfPQ.mjs";
|
|
11
|
+
import { i as userAgent } from "../secret-file-eB3R3Fil.mjs";
|
|
12
12
|
import { n as isCLIError } from "../errors-EsY4XO6O.mjs";
|
|
13
|
-
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crashreport-
|
|
13
|
+
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crashreport-u9y2npiy.mjs";
|
|
14
14
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
15
15
|
import { withCompletionCommand } from "politty/completion";
|
|
16
16
|
import { z } from "zod";
|
|
@@ -22,6 +22,7 @@ import { dirname, resolve } from "pathe";
|
|
|
22
22
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
23
23
|
import { generateCodeVerifier } from "@badgateway/oauth2-client";
|
|
24
24
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
25
|
+
import pLimit from "p-limit";
|
|
25
26
|
import { resolvePackageJSON, resolveTSConfig } from "pkg-types";
|
|
26
27
|
import * as crypto from "node:crypto";
|
|
27
28
|
import { createHash } from "node:crypto";
|
|
@@ -30,7 +31,6 @@ import open from "open";
|
|
|
30
31
|
import * as rolldown from "rolldown";
|
|
31
32
|
import * as fsPromises from "node:fs/promises";
|
|
32
33
|
import { glob } from "node:fs/promises";
|
|
33
|
-
import pLimit from "p-limit";
|
|
34
34
|
import { TraceMap, generatedPositionFor, originalPositionFor } from "@jridgewell/trace-mapping";
|
|
35
35
|
import { spawn, spawnSync } from "node:child_process";
|
|
36
36
|
import { watch } from "chokidar";
|
|
@@ -2707,52 +2707,14 @@ function findTarget(lock, kind, workspaceName) {
|
|
|
2707
2707
|
|
|
2708
2708
|
//#endregion
|
|
2709
2709
|
//#region src/cli/commands/setup/github/branch.workflow.yml
|
|
2710
|
-
var branch_workflow_default = "# __HEADER__\nname: Tailor (__WORKSPACE_NAME__)\n\non:\n # __PULL_REQUEST_START__\n pull_request:\n branches: [\"__BRANCH__\"]\n # __PATHS__\n # __PULL_REQUEST_END__\n push:\n branches: [\"__BRANCH__\"]\n # __PATHS__\n workflow_dispatch:\n # __DISPATCH_INPUTS_START__\n inputs:\n dry-run:\n description: Preview changes without deploying\n type: boolean\n default: false\n # __DISPATCH_INPUTS_END__\n\npermissions:\n contents: read\n\njobs:\n # __PLAN_JOB_START__\n tailor-plan:\n if: >-\n github.event_name == 'pull_request' ||\n (github.event_name == 'workflow_dispatch' && inputs['dry-run'])\n runs-on: ubuntu-latest\n timeout-minutes: 30\n environment: __ENVIRONMENT__\n permissions:\n contents: read\n pull-requests: write\n concurrency:\n group: tailor-plan-__WORKSPACE_NAME__-${{ github.event.pull_request.number || github.run_id }}\n cancel-in-progress: true\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n
|
|
2711
|
-
|
|
2712
|
-
//#endregion
|
|
2713
|
-
//#region src/cli/commands/setup/github/setup-bun.yml
|
|
2714
|
-
var setup_bun_default = "- id: tailor-setup-bun\n uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0\n- id: tailor-install\n run: bun install --frozen-lockfile\n";
|
|
2715
|
-
|
|
2716
|
-
//#endregion
|
|
2717
|
-
//#region src/cli/commands/setup/github/setup-npm.yml
|
|
2718
|
-
var setup_npm_default = "- id: tailor-setup-node\n uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0\n with:\n node-version-file: package.json\n cache: npm\n- id: tailor-install\n run: npm ci\n";
|
|
2719
|
-
|
|
2720
|
-
//#endregion
|
|
2721
|
-
//#region src/cli/commands/setup/github/setup-pnpm.yml
|
|
2722
|
-
var setup_pnpm_default = "- id: tailor-setup-pnpm\n uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9\n- id: tailor-setup-node\n uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0\n with:\n node-version-file: package.json\n cache: pnpm\n- id: tailor-install\n run: pnpm install --frozen-lockfile\n";
|
|
2723
|
-
|
|
2724
|
-
//#endregion
|
|
2725
|
-
//#region src/cli/commands/setup/github/setup-yarn.yml
|
|
2726
|
-
var setup_yarn_default = "- id: tailor-setup-node\n uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0\n with:\n node-version-file: package.json\n cache: yarn\n- id: tailor-install\n run: yarn install --frozen-lockfile\n";
|
|
2710
|
+
var branch_workflow_default = "# __HEADER__\nname: Tailor (__WORKSPACE_NAME__)\n\non:\n # __PULL_REQUEST_START__\n pull_request:\n branches: [\"__BRANCH__\"]\n # __PATHS__\n # __PULL_REQUEST_END__\n push:\n branches: [\"__BRANCH__\"]\n # __PATHS__\n workflow_dispatch:\n # __DISPATCH_INPUTS_START__\n inputs:\n dry-run:\n description: Preview changes without deploying\n type: boolean\n default: false\n # __DISPATCH_INPUTS_END__\n\npermissions:\n contents: read\n\njobs:\n # __PLAN_JOB_START__\n tailor-plan:\n if: >-\n github.event_name == 'pull_request' ||\n (github.event_name == 'workflow_dispatch' && inputs['dry-run'])\n runs-on: ubuntu-latest\n timeout-minutes: 30\n environment: __ENVIRONMENT__\n permissions:\n contents: read\n pull-requests: write\n concurrency:\n group: tailor-plan-__WORKSPACE_NAME__-${{ github.event.pull_request.number || github.run_id }}\n cancel-in-progress: true\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n - id: tailor-setup\n uses: tailor-platform/actions/setup@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n package-manager: __PACKAGE_MANAGER__\n - id: tailor-generate-check\n uses: tailor-platform/actions/generate-check@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n package-manager: __PACKAGE_MANAGER__\n # __WORKING_DIRECTORY__\n - id: tailor-plan\n # Fork PRs cannot read secrets; the checks above still run for them.\n if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork\n uses: tailor-platform/actions/plan@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n workspace-id: ${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}\n package-manager: __PACKAGE_MANAGER__\n label: __WORKSPACE_NAME__\n # __WORKING_DIRECTORY__\n platform-client-id: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}\n platform-client-secret: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}\n github-token: ${{ secrets.GITHUB_TOKEN }}\n # __PLAN_JOB_END__\n tailor-deploy:\n # __DEPLOY_IF__\n runs-on: ubuntu-latest\n timeout-minutes: 30\n permissions:\n contents: read\n environment: __ENVIRONMENT__\n concurrency:\n group: tailor-deploy-__WORKSPACE_NAME__\n cancel-in-progress: false\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n - id: tailor-setup\n uses: tailor-platform/actions/setup@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n package-manager: __PACKAGE_MANAGER__\n - id: tailor-apply\n uses: tailor-platform/actions/deploy@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n workspace-id: ${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}\n package-manager: __PACKAGE_MANAGER__\n # __WORKING_DIRECTORY__\n platform-client-id: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}\n platform-client-secret: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}\n";
|
|
2727
2711
|
|
|
2728
2712
|
//#endregion
|
|
2729
2713
|
//#region src/cli/commands/setup/github/tag.workflow.yml
|
|
2730
|
-
var tag_workflow_default = "# __HEADER__\nname: Tailor (__WORKSPACE_NAME__)\n\non:\n push:\n tags: [\"__TAG_PATTERN__\"]\n workflow_dispatch:\n inputs:\n dry-run:\n description: Preview changes without deploying\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n # __TAG_GUARD_JOB_START__\n tailor-tag-guard:\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n outputs:\n on-branch: ${{ steps.tailor-tag-guard.outputs.on-branch }}\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n with:\n fetch-depth: 0\n - id: tailor-tag-guard\n
|
|
2714
|
+
var tag_workflow_default = "# __HEADER__\nname: Tailor (__WORKSPACE_NAME__)\n\non:\n push:\n tags: [\"__TAG_PATTERN__\"]\n workflow_dispatch:\n inputs:\n dry-run:\n description: Preview changes without deploying\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n # __TAG_GUARD_JOB_START__\n tailor-tag-guard:\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n outputs:\n on-branch: ${{ steps.tailor-tag-guard.outputs.on-branch }}\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n with:\n fetch-depth: 0\n - id: tailor-tag-guard\n uses: tailor-platform/actions/tag-guard@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n target-branch: \"__BRANCH__\"\n # __TAG_GUARD_JOB_END__\n tailor-plan:\n # __PLAN_NEEDS__\n # __PLAN_IF__\n runs-on: ubuntu-latest\n timeout-minutes: 30\n environment: __ENVIRONMENT__\n permissions:\n contents: read\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n - id: tailor-setup\n uses: tailor-platform/actions/setup@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n package-manager: __PACKAGE_MANAGER__\n - id: tailor-generate-check\n uses: tailor-platform/actions/generate-check@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n package-manager: __PACKAGE_MANAGER__\n # __WORKING_DIRECTORY__\n - id: tailor-plan\n uses: tailor-platform/actions/plan@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n workspace-id: ${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}\n package-manager: __PACKAGE_MANAGER__\n label: __WORKSPACE_NAME__\n # __WORKING_DIRECTORY__\n platform-client-id: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}\n platform-client-secret: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}\n\n tailor-deploy:\n needs: tailor-plan\n if: ${{ !(github.event_name == 'workflow_dispatch' && inputs['dry-run']) }}\n environment: __ENVIRONMENT__\n runs-on: ubuntu-latest\n timeout-minutes: 30\n permissions:\n contents: read\n concurrency:\n group: tailor-deploy-__WORKSPACE_NAME__\n cancel-in-progress: false\n steps:\n - id: tailor-checkout\n uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3\n - id: tailor-setup\n uses: tailor-platform/actions/setup@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n package-manager: __PACKAGE_MANAGER__\n - id: tailor-apply\n uses: tailor-platform/actions/deploy@7817f37adf2891fbb2ebbe0a3b222a5fa2ed0c1f # v1.3.0\n with:\n workspace-id: ${{ vars.TAILOR_PLATFORM_WORKSPACE_ID }}\n package-manager: __PACKAGE_MANAGER__\n # __WORKING_DIRECTORY__\n platform-client-id: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID }}\n platform-client-secret: ${{ secrets.TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET }}\n";
|
|
2731
2715
|
|
|
2732
2716
|
//#endregion
|
|
2733
2717
|
//#region src/cli/commands/setup/github/templates.ts
|
|
2734
|
-
const setupStepIds = {
|
|
2735
|
-
pnpm: [
|
|
2736
|
-
"tailor-setup-pnpm",
|
|
2737
|
-
"tailor-setup-node",
|
|
2738
|
-
"tailor-install"
|
|
2739
|
-
],
|
|
2740
|
-
yarn: ["tailor-setup-node", "tailor-install"],
|
|
2741
|
-
npm: ["tailor-setup-node", "tailor-install"],
|
|
2742
|
-
bun: ["tailor-setup-bun", "tailor-install"]
|
|
2743
|
-
};
|
|
2744
|
-
const setupSteps = {
|
|
2745
|
-
pnpm: setup_pnpm_default,
|
|
2746
|
-
yarn: setup_yarn_default,
|
|
2747
|
-
npm: setup_npm_default,
|
|
2748
|
-
bun: setup_bun_default
|
|
2749
|
-
};
|
|
2750
|
-
const execPrefix = {
|
|
2751
|
-
npm: "npx",
|
|
2752
|
-
pnpm: "pnpm exec",
|
|
2753
|
-
yarn: "yarn",
|
|
2754
|
-
bun: "bunx"
|
|
2755
|
-
};
|
|
2756
2718
|
const HEADER = `# Generated by \`tailor-sdk setup github\` — managed by the Tailor SDK.
|
|
2757
2719
|
#
|
|
2758
2720
|
# - Jobs and steps whose id starts with \`tailor-\` are managed by the SDK.
|
|
@@ -2762,10 +2724,6 @@ const HEADER = `# Generated by \`tailor-sdk setup github\` — managed by the Ta
|
|
|
2762
2724
|
# edited it by hand, regeneration stops and asks for --force (which discards
|
|
2763
2725
|
# your edits), so prefer keeping customizations in your own jobs/steps and
|
|
2764
2726
|
# re-running setup after SDK updates.`;
|
|
2765
|
-
function indentSnippet(snippet, spaces) {
|
|
2766
|
-
const indent = " ".repeat(spaces);
|
|
2767
|
-
return snippet.trimEnd().split("\n").map((line) => line ? indent + line : line).join("\n");
|
|
2768
|
-
}
|
|
2769
2727
|
/**
|
|
2770
2728
|
* Detect the package manager used in a project directory by checking for lockfiles.
|
|
2771
2729
|
* @param dir - Project directory to inspect
|
|
@@ -2793,11 +2751,7 @@ function applyCommon(content, params) {
|
|
|
2793
2751
|
const { workingDirectory, environment, packageManager } = params;
|
|
2794
2752
|
let out = line(content, "HEADER", HEADER);
|
|
2795
2753
|
out = line(out, "WORKING_DIRECTORY", workingDirectory ? `working-directory: ${workingDirectory}` : void 0);
|
|
2796
|
-
|
|
2797
|
-
return out.replaceAll("__WORKSPACE_NAME__", () => params.workspaceName).replaceAll("__ENVIRONMENT__", () => environment).replaceAll("__PM_EXEC__", () => execPrefix[packageManager]);
|
|
2798
|
-
}
|
|
2799
|
-
function setupIds(job, packageManager) {
|
|
2800
|
-
return setupStepIds[packageManager].map((id) => `${job}/${id}`);
|
|
2754
|
+
return out.replaceAll("__WORKSPACE_NAME__", () => params.workspaceName).replaceAll("__ENVIRONMENT__", () => environment).replaceAll("__PACKAGE_MANAGER__", () => packageManager);
|
|
2801
2755
|
}
|
|
2802
2756
|
/**
|
|
2803
2757
|
* Render the branch-target deploy workflow.
|
|
@@ -2809,7 +2763,7 @@ function setupIds(job, packageManager) {
|
|
|
2809
2763
|
* @returns Rendered YAML and the list of managed job/step ids
|
|
2810
2764
|
*/
|
|
2811
2765
|
function renderBranchWorkflow(params) {
|
|
2812
|
-
const { branch, plan
|
|
2766
|
+
const { branch, plan } = params;
|
|
2813
2767
|
let out = branch_workflow_default;
|
|
2814
2768
|
out = block(out, "PLAN_JOB", plan);
|
|
2815
2769
|
out = block(out, "PULL_REQUEST", plan);
|
|
@@ -2818,8 +2772,8 @@ function renderBranchWorkflow(params) {
|
|
|
2818
2772
|
out = line(out, "PATHS", params.workingDirectory ? `paths: ["${params.workingDirectory}/**"]` : void 0);
|
|
2819
2773
|
out = applyCommon(out, params).replaceAll("__BRANCH__", () => branch);
|
|
2820
2774
|
const generatedIds = [];
|
|
2821
|
-
if (plan) generatedIds.push("tailor-plan", "tailor-plan/tailor-checkout",
|
|
2822
|
-
generatedIds.push("tailor-deploy", "tailor-deploy/tailor-checkout",
|
|
2775
|
+
if (plan) generatedIds.push("tailor-plan", "tailor-plan/tailor-checkout", "tailor-plan/tailor-setup", "tailor-plan/tailor-generate-check", "tailor-plan/tailor-plan");
|
|
2776
|
+
generatedIds.push("tailor-deploy", "tailor-deploy/tailor-checkout", "tailor-deploy/tailor-setup", "tailor-deploy/tailor-apply");
|
|
2823
2777
|
return {
|
|
2824
2778
|
content: out,
|
|
2825
2779
|
generatedIds
|
|
@@ -2834,7 +2788,7 @@ function renderBranchWorkflow(params) {
|
|
|
2834
2788
|
* @returns Rendered YAML and the list of managed job/step ids
|
|
2835
2789
|
*/
|
|
2836
2790
|
function renderTagWorkflow(params) {
|
|
2837
|
-
const { tagPattern, branch
|
|
2791
|
+
const { tagPattern, branch } = params;
|
|
2838
2792
|
const hasGuard = branch !== void 0;
|
|
2839
2793
|
let out = tag_workflow_default;
|
|
2840
2794
|
out = block(out, "TAG_GUARD_JOB", hasGuard);
|
|
@@ -2844,7 +2798,7 @@ function renderTagWorkflow(params) {
|
|
|
2844
2798
|
if (hasGuard) out = out.replaceAll("__BRANCH__", () => branch);
|
|
2845
2799
|
const generatedIds = [];
|
|
2846
2800
|
if (hasGuard) generatedIds.push("tailor-tag-guard", "tailor-tag-guard/tailor-checkout", "tailor-tag-guard/tailor-tag-guard");
|
|
2847
|
-
generatedIds.push("tailor-plan", "tailor-plan/tailor-checkout",
|
|
2801
|
+
generatedIds.push("tailor-plan", "tailor-plan/tailor-checkout", "tailor-plan/tailor-setup", "tailor-plan/tailor-generate-check", "tailor-plan/tailor-plan", "tailor-deploy", "tailor-deploy/tailor-checkout", "tailor-deploy/tailor-setup", "tailor-deploy/tailor-apply");
|
|
2848
2802
|
return {
|
|
2849
2803
|
content: out,
|
|
2850
2804
|
generatedIds
|
|
@@ -3067,7 +3021,7 @@ async function setupGitHub(options) {
|
|
|
3067
3021
|
kind: resolved.kind,
|
|
3068
3022
|
workspaceName: resolved.workspaceName,
|
|
3069
3023
|
file: resolved.file,
|
|
3070
|
-
templateVersion:
|
|
3024
|
+
templateVersion: 2,
|
|
3071
3025
|
inputs: resolved.inputs,
|
|
3072
3026
|
generatedIds: resolved.render.generatedIds,
|
|
3073
3027
|
ejectedIds: existing?.ejectedIds ?? [],
|
|
@@ -4807,7 +4761,7 @@ async function fetchRemoteTypes(client, workspaceId, namespace) {
|
|
|
4807
4761
|
async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
4808
4762
|
const { config, plugins } = loaded;
|
|
4809
4763
|
const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
|
|
4810
|
-
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-
|
|
4764
|
+
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-Djeezk3m.mjs");
|
|
4811
4765
|
const application = defineApplication({
|
|
4812
4766
|
config,
|
|
4813
4767
|
pluginManager
|
|
@@ -5096,7 +5050,7 @@ const upgradeCommand = defineAppCommand({
|
|
|
5096
5050
|
run: async (args) => {
|
|
5097
5051
|
const { initTelemetry } = await import("../telemetry-w92bvGdC.mjs");
|
|
5098
5052
|
await initTelemetry();
|
|
5099
|
-
const { upgrade } = await import("../service-
|
|
5053
|
+
const { upgrade } = await import("../service-DMohAx8a.mjs");
|
|
5100
5054
|
await upgrade({
|
|
5101
5055
|
from: args.from,
|
|
5102
5056
|
dryRun: args["dry-run"],
|
|
@@ -5522,7 +5476,7 @@ runMain(mainCommand, {
|
|
|
5522
5476
|
if (isVerbose() && error.stack) logger.debug(`\nStack trace:\n${error.stack}`);
|
|
5523
5477
|
} else logger.error(`Unknown error: ${error}`);
|
|
5524
5478
|
if (!isCLIError(error) && (!(error instanceof Error) || error instanceof TypeError || error instanceof RangeError)) {
|
|
5525
|
-
const { reportCrash } = await import("../crashreport-
|
|
5479
|
+
const { reportCrash } = await import("../crashreport-6jpCceOF.mjs");
|
|
5526
5480
|
await reportCrash(error, "handledError");
|
|
5527
5481
|
}
|
|
5528
5482
|
}
|