@tailor-platform/sdk 1.11.0 → 1.12.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 +34 -0
- package/dist/application-DM4zTgXU.mjs +4 -0
- package/dist/{application-BKBo5tGD.mjs → application-DnWZVbDO.mjs} +164 -26
- package/dist/application-DnWZVbDO.mjs.map +1 -0
- package/dist/cli/index.mjs +13 -19
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +149 -17
- package/dist/cli/lib.mjs +132 -4
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +4 -3
- package/dist/configure/index.mjs +16 -757
- package/dist/configure/index.mjs.map +1 -1
- package/dist/env-4RO7szrH.d.mts +66 -0
- package/dist/{index-D8zIUsWi.d.mts → index-BBr_q3vB.d.mts} +20 -11
- package/dist/{index-DcOTucF6.d.mts → index-Bid18Opo.d.mts} +473 -84
- package/dist/{jiti-ygK9KoRA.mjs → jiti-DuCiUfMj.mjs} +2 -2
- package/dist/{jiti-ygK9KoRA.mjs.map → jiti-DuCiUfMj.mjs.map} +1 -1
- package/dist/{job-l-pIR9IY.mjs → job-zGAXCidt.mjs} +1 -1
- package/dist/{job-l-pIR9IY.mjs.map → job-zGAXCidt.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +25 -0
- package/dist/kysely/index.mjs +27 -0
- package/dist/kysely/index.mjs.map +1 -0
- package/dist/plugin/index.d.mts +105 -0
- package/dist/plugin/index.mjs +45 -0
- package/dist/plugin/index.mjs.map +1 -0
- package/dist/schema-BmKdDzr1.mjs +784 -0
- package/dist/schema-BmKdDzr1.mjs.map +1 -0
- package/dist/{src-CG8kJBI9.mjs → src-QNTCsO6J.mjs} +2 -2
- package/dist/{src-CG8kJBI9.mjs.map → src-QNTCsO6J.mjs.map} +1 -1
- package/dist/types-r-ZratAg.mjs +13 -0
- package/dist/types-r-ZratAg.mjs.map +1 -0
- package/dist/{update-D0muqqOP.mjs → update-B_W-UQnS.mjs} +1626 -390
- package/dist/update-B_W-UQnS.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +1 -1
- package/docs/cli/tailordb.md +0 -12
- package/docs/generator/builtin.md +2 -2
- package/docs/plugin/custom.md +389 -0
- package/docs/plugin/index.md +112 -0
- package/docs/services/workflow.md +28 -0
- package/package.json +16 -23
- package/dist/application-BKBo5tGD.mjs.map +0 -1
- package/dist/application-a12-7TT3.mjs +0 -4
- package/dist/update-D0muqqOP.mjs.map +0 -1
- /package/dist/{chunk-CIV_ash9.mjs → chunk-C3Kl5s5P.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunk-
|
|
3
|
-
import
|
|
4
|
-
import { d as
|
|
2
|
+
import "../chunk-C3Kl5s5P.mjs";
|
|
3
|
+
import "../schema-BmKdDzr1.mjs";
|
|
4
|
+
import { $ as jobsCommand, $t as initOperatorClient, A as generateCommand, At as getMigrationFiles, C as resumeCommand, Et as formatMigrationNumber, F as removeCommand$1, G as generateCommand$1, Gt as fetchLatestToken, H as listCommand$6, I as listCommand$7, J as triggerCommand, Jt as readPlatformConfig, Kt as loadAccessToken, Mt as isValidMigrationNumber, N as showCommand, Nt as loadDiff, O as truncateCommand, Qt as initOAuth2Client, R as getCommand$2, Rt as getNamespacesWithMigrations, S as healthCommand, T as listCommand$8, V as tokenCommand, Vt as loadConfig, Wt as apiCommand, X as listCommand$5, Xt as fetchAll, Yt as writePlatformConfig, Zt as fetchUserInfo, _ as createCommand$3, a as listCommand$10, an as jsonArgs, b as listCommand$9, d as listCommand$11, en as readPackageJson, ft as applyCommand, gt as parseMigrationLabelNumber, h as deleteCommand$3, in as deploymentArgs, it as getCommand$3, j as logBetaWarning, kt as getMigrationFilePath, l as restoreCommand, lt as getCommand$1, nn as commonArgs, nt as startCommand, on as withCommonArgs, ot as executionsCommand, p as getCommand$4, q as webhookCommand, qt as loadWorkspaceId, r as removeCommand, rn as confirmationArgs, s as inviteCommand, sn as workspaceArgs, t as updateCommand$2, tn as PATScope, zt as trnPrefix } from "../update-B_W-UQnS.mjs";
|
|
5
|
+
import { d as logger, f as styles } from "../application-DnWZVbDO.mjs";
|
|
5
6
|
import { createRequire, register } from "node:module";
|
|
6
7
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
7
8
|
import { z } from "zod";
|
|
@@ -10,7 +11,6 @@ import * as path from "pathe";
|
|
|
10
11
|
import { generateCodeVerifier } from "@badgateway/oauth2-client";
|
|
11
12
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
12
13
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
13
|
-
import { findUpSync } from "find-up-simple";
|
|
14
14
|
import ml from "multiline-ts";
|
|
15
15
|
import * as fs$2 from "fs";
|
|
16
16
|
import pLimit from "p-limit";
|
|
@@ -1084,20 +1084,18 @@ const staticwebsiteCommand = defineCommand({
|
|
|
1084
1084
|
//#endregion
|
|
1085
1085
|
//#region src/cli/utils/resolve-cli-bin.ts
|
|
1086
1086
|
/**
|
|
1087
|
-
* Resolve a CLI binary path from the
|
|
1087
|
+
* Resolve a CLI binary path from the SDK's dependencies.
|
|
1088
1088
|
* @param options - Resolution options for locating the CLI binary.
|
|
1089
1089
|
* @returns Absolute path to the CLI binary entry.
|
|
1090
1090
|
*/
|
|
1091
1091
|
function resolveCliBinPath(options) {
|
|
1092
|
-
const {
|
|
1093
|
-
const
|
|
1094
|
-
if (!projectPackageJsonPath) throw new Error(`Failed to locate package.json from ${cwd}.`);
|
|
1095
|
-
const requireFromProject = createRequire(projectPackageJsonPath);
|
|
1092
|
+
const { packageName, binName } = options;
|
|
1093
|
+
const requireFromSdk = createRequire(import.meta.url);
|
|
1096
1094
|
let pkgJsonPath;
|
|
1097
1095
|
try {
|
|
1098
|
-
pkgJsonPath =
|
|
1096
|
+
pkgJsonPath = requireFromSdk.resolve(`${packageName}/package.json`);
|
|
1099
1097
|
} catch {
|
|
1100
|
-
throw new Error(`
|
|
1098
|
+
throw new Error(`Failed to resolve \`${packageName}\`.`);
|
|
1101
1099
|
}
|
|
1102
1100
|
const binRelativePath = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf8")).bin?.[binName];
|
|
1103
1101
|
if (!binRelativePath) throw new Error(`\`${packageName}\` does not expose a \`${binName}\` binary entry.`);
|
|
@@ -1323,10 +1321,8 @@ async function runLiamBuild(schemaPath, cwd) {
|
|
|
1323
1321
|
let liamBinPath;
|
|
1324
1322
|
try {
|
|
1325
1323
|
liamBinPath = resolveCliBinPath({
|
|
1326
|
-
cwd,
|
|
1327
1324
|
packageName: "@liam-hq/cli",
|
|
1328
|
-
binName: "liam"
|
|
1329
|
-
installHint: "npm i -D @liam-hq/cli"
|
|
1325
|
+
binName: "liam"
|
|
1330
1326
|
});
|
|
1331
1327
|
} catch (error) {
|
|
1332
1328
|
logger.error(String(error));
|
|
@@ -1354,7 +1350,7 @@ async function runLiamBuild(schemaPath, cwd) {
|
|
|
1354
1350
|
stderrOutput += data.toString();
|
|
1355
1351
|
});
|
|
1356
1352
|
child.on("error", (error) => {
|
|
1357
|
-
logger.error("Failed to run `@liam-hq/cli`.
|
|
1353
|
+
logger.error("Failed to run `@liam-hq/cli`.");
|
|
1358
1354
|
reject(error);
|
|
1359
1355
|
});
|
|
1360
1356
|
child.on("close", (code) => {
|
|
@@ -1525,10 +1521,8 @@ async function runServeDist(results) {
|
|
|
1525
1521
|
let serveBinPath;
|
|
1526
1522
|
try {
|
|
1527
1523
|
serveBinPath = resolveCliBinPath({
|
|
1528
|
-
cwd: primary.erdDir,
|
|
1529
1524
|
packageName: "serve",
|
|
1530
|
-
binName: "serve"
|
|
1531
|
-
installHint: "npm i -D serve"
|
|
1525
|
+
binName: "serve"
|
|
1532
1526
|
});
|
|
1533
1527
|
} catch (error) {
|
|
1534
1528
|
logger.error(String(error));
|
|
@@ -1540,7 +1534,7 @@ async function runServeDist(results) {
|
|
|
1540
1534
|
cwd: primary.erdDir
|
|
1541
1535
|
});
|
|
1542
1536
|
child.on("error", (error) => {
|
|
1543
|
-
logger.error("Failed to run `serve dist`.
|
|
1537
|
+
logger.error("Failed to run `serve dist`.");
|
|
1544
1538
|
reject(error);
|
|
1545
1539
|
});
|
|
1546
1540
|
child.on("exit", (code) => {
|