@uniformdev/cli 20.50.2-alpha.146 → 20.50.2-alpha.167
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/dist/{chunk-4FGQETP3.mjs → chunk-6GYRC5EF.mjs} +58 -36
- package/dist/defaultConfig.mjs +1 -1
- package/dist/index.mjs +1244 -879
- package/package.json +29 -31
|
@@ -5,9 +5,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
5
5
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
9
|
-
import { fileURLToPath } from "url";
|
|
8
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.58.9_@types+node@26.0.0__jiti@2.7.0_postcss@8.5.1_7017c7d2ba4cec51f3116591eb787c26/node_modules/tsup/assets/esm_shims.js
|
|
10
9
|
import path from "path";
|
|
10
|
+
import { fileURLToPath } from "url";
|
|
11
11
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
12
12
|
var getDirname = () => path.dirname(getFilename());
|
|
13
13
|
var __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -22,7 +22,7 @@ import { fetch as undiciFetch, ProxyAgent } from "undici";
|
|
|
22
22
|
// package.json
|
|
23
23
|
var package_default = {
|
|
24
24
|
name: "@uniformdev/cli",
|
|
25
|
-
version: "20.
|
|
25
|
+
version: "20.71.0",
|
|
26
26
|
description: "Uniform command line interface tool",
|
|
27
27
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
28
28
|
main: "./cli.js",
|
|
@@ -47,9 +47,10 @@ var package_default = {
|
|
|
47
47
|
format: 'prettier --write "src/**/*.{js,ts,tsx}"'
|
|
48
48
|
},
|
|
49
49
|
dependencies: {
|
|
50
|
-
"@inquirer/prompts": "^
|
|
50
|
+
"@inquirer/prompts": "^8.5.2",
|
|
51
51
|
"@thi.ng/mime": "^2.2.23",
|
|
52
52
|
"@uniformdev/assets": "workspace:*",
|
|
53
|
+
"@uniformdev/automations-sdk": "workspace:*",
|
|
53
54
|
"@uniformdev/canvas": "workspace:*",
|
|
54
55
|
"@uniformdev/context": "workspace:*",
|
|
55
56
|
"@uniformdev/files": "workspace:*",
|
|
@@ -58,40 +59,37 @@ var package_default = {
|
|
|
58
59
|
"@uniformdev/richtext": "workspace:*",
|
|
59
60
|
"call-bind": "^1.0.2",
|
|
60
61
|
colorette: "2.0.20",
|
|
61
|
-
cosmiconfig: "9.0.
|
|
62
|
+
cosmiconfig: "9.0.2",
|
|
62
63
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
63
|
-
diff: "^
|
|
64
|
-
dotenv: "^
|
|
65
|
-
esbuild: "0.
|
|
64
|
+
diff: "^9.0.0",
|
|
65
|
+
dotenv: "^17.4.2",
|
|
66
|
+
esbuild: "0.28.1",
|
|
66
67
|
execa: "5.1.1",
|
|
67
|
-
"file-type": "^
|
|
68
|
+
"file-type": "^22.0.1",
|
|
68
69
|
"fs-jetpack": "5.1.0",
|
|
69
|
-
graphql: "16.9.0",
|
|
70
|
-
"graphql-request": "6.1.0",
|
|
71
70
|
"image-size": "2.0.2",
|
|
72
|
-
"isomorphic-git": "1.
|
|
73
|
-
"js-yaml": "^4.
|
|
71
|
+
"isomorphic-git": "1.38.5",
|
|
72
|
+
"js-yaml": "^4.2.0",
|
|
74
73
|
jsonwebtoken: "9.0.3",
|
|
75
74
|
mitt: "^3.0.1",
|
|
76
75
|
"normalize-newline": "^4.1.0",
|
|
77
|
-
open: "
|
|
78
|
-
ora: "
|
|
76
|
+
open: "11.0.0",
|
|
77
|
+
ora: "9.4.0",
|
|
79
78
|
"p-queue": "7.3.4",
|
|
80
|
-
"posthog-node": "5.
|
|
79
|
+
"posthog-node": "5.38.2",
|
|
81
80
|
"registry-auth-token": "^5.0.0",
|
|
82
81
|
"registry-url": "^6.0.0",
|
|
83
|
-
slugify: "1.6.
|
|
84
|
-
svix: "^1.
|
|
85
|
-
undici: "^7.
|
|
86
|
-
yargs: "^
|
|
87
|
-
zod: "4.3
|
|
82
|
+
slugify: "1.6.9",
|
|
83
|
+
svix: "^1.96.0",
|
|
84
|
+
undici: "^7.28.0",
|
|
85
|
+
yargs: "^18.0.0",
|
|
86
|
+
zod: "4.4.3"
|
|
88
87
|
},
|
|
89
88
|
devDependencies: {
|
|
90
|
-
"@types/diff": "^8.0.0",
|
|
91
89
|
"@types/js-yaml": "4.0.9",
|
|
92
|
-
"@types/jsonwebtoken": "9.0.
|
|
93
|
-
"@types/node": "
|
|
94
|
-
"@types/yargs": "17.0.
|
|
90
|
+
"@types/jsonwebtoken": "9.0.10",
|
|
91
|
+
"@types/node": "26.0.0",
|
|
92
|
+
"@types/yargs": "17.0.35"
|
|
95
93
|
},
|
|
96
94
|
bin: {
|
|
97
95
|
uniform: "./cli.js"
|
|
@@ -163,12 +161,20 @@ function withConfiguration(yargs) {
|
|
|
163
161
|
hidden: true
|
|
164
162
|
});
|
|
165
163
|
}
|
|
166
|
-
function
|
|
167
|
-
|
|
164
|
+
function maskApiKey(apiKey) {
|
|
165
|
+
const separatorIndex = apiKey.indexOf("1");
|
|
166
|
+
const prefix = separatorIndex > 0 ? apiKey.slice(0, separatorIndex) : apiKey.slice(0, 3);
|
|
167
|
+
return `${prefix}...${apiKey.slice(-4)}`;
|
|
168
|
+
}
|
|
169
|
+
function withApiOptions(yargs, { includeEdgeApiHost = false } = {}) {
|
|
170
|
+
const resolvedApiKey = process.env.UNIFORM_CLI_API_KEY ?? // deprecated
|
|
171
|
+
process.env.CANVAS_CLI_API_KEY ?? // deprecated
|
|
172
|
+
process.env.UPM_CLI_API_KEY ?? process.env.UNIFORM_API_KEY;
|
|
173
|
+
let result = yargs.option("apiKey", {
|
|
168
174
|
describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
|
|
169
|
-
default:
|
|
170
|
-
|
|
171
|
-
|
|
175
|
+
default: resolvedApiKey,
|
|
176
|
+
// Mask the resolved key in --help output so the secret is never printed verbatim.
|
|
177
|
+
defaultDescription: resolvedApiKey ? maskApiKey(resolvedApiKey) : void 0,
|
|
172
178
|
demandOption: true,
|
|
173
179
|
type: "string"
|
|
174
180
|
}).option("apiHost", {
|
|
@@ -176,12 +182,16 @@ function withApiOptions(yargs) {
|
|
|
176
182
|
default: process.env.UNIFORM_CLI_BASE_URL || "https://uniform.app",
|
|
177
183
|
demandOption: true,
|
|
178
184
|
type: "string"
|
|
179
|
-
})
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
});
|
|
186
|
+
if (includeEdgeApiHost) {
|
|
187
|
+
result = result.option("edgeApiHost", {
|
|
188
|
+
describe: "Uniform edge host. Defaults to UNIFORM_CLI_BASE_EDGE_URL env var or https://uniform.global. Supports dotenv.",
|
|
189
|
+
default: process.env.UNIFORM_CLI_BASE_EDGE_URL || "https://uniform.global",
|
|
190
|
+
demandOption: true,
|
|
191
|
+
type: "string"
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return result.option("proxy", {
|
|
185
195
|
describe: "HTTPS proxy to use for Uniform API calls. Defaults to HTTPS_PROXY, https_proxy, ALL_PROXY, or all_proxy env vars (in that order). Supports dotenv.",
|
|
186
196
|
default: process.env.HTTPS_PROXY || process.env.https_proxy || process.env.ALL_PROXY || process.env.all_proxy,
|
|
187
197
|
type: "string"
|
|
@@ -277,6 +287,16 @@ ${e.message}`;
|
|
|
277
287
|
}
|
|
278
288
|
return wrappedFetch;
|
|
279
289
|
}
|
|
290
|
+
function exitOnCliError(error) {
|
|
291
|
+
if (error instanceof ApiClientError) {
|
|
292
|
+
console.error(error.message);
|
|
293
|
+
} else if (error instanceof Error) {
|
|
294
|
+
console.error(error.message);
|
|
295
|
+
} else {
|
|
296
|
+
console.error(String(error));
|
|
297
|
+
}
|
|
298
|
+
process.exit(1);
|
|
299
|
+
}
|
|
280
300
|
function withProjectOptions(yargs) {
|
|
281
301
|
return yargs.option("project", {
|
|
282
302
|
describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
|
|
@@ -534,9 +554,11 @@ export {
|
|
|
534
554
|
package_default,
|
|
535
555
|
CLI_USER_AGENT,
|
|
536
556
|
withConfiguration,
|
|
557
|
+
maskApiKey,
|
|
537
558
|
withApiOptions,
|
|
538
559
|
withDebugOptions,
|
|
539
560
|
nodeFetchProxy,
|
|
561
|
+
exitOnCliError,
|
|
540
562
|
withProjectOptions,
|
|
541
563
|
withTeamOptions,
|
|
542
564
|
withFormatOptions,
|
package/dist/defaultConfig.mjs
CHANGED