@uniformdev/cli 20.50.2-alpha.149 → 20.50.2-alpha.180
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-7P2U2VCH.mjs → chunk-YUQPI3H4.mjs} +42 -56
- package/dist/defaultConfig.mjs +1 -1
- package/dist/index.mjs +720 -903
- package/package.json +30 -30
|
@@ -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();
|
|
@@ -17,12 +17,11 @@ import { ApiClientError } from "@uniformdev/canvas";
|
|
|
17
17
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
18
18
|
import { dump, load } from "js-yaml";
|
|
19
19
|
import { dirname, extname, isAbsolute, resolve, sep } from "path";
|
|
20
|
-
import { fetch as undiciFetch, ProxyAgent } from "undici";
|
|
21
20
|
|
|
22
21
|
// package.json
|
|
23
22
|
var package_default = {
|
|
24
23
|
name: "@uniformdev/cli",
|
|
25
|
-
version: "20.
|
|
24
|
+
version: "20.71.1",
|
|
26
25
|
description: "Uniform command line interface tool",
|
|
27
26
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
28
27
|
main: "./cli.js",
|
|
@@ -47,10 +46,9 @@ var package_default = {
|
|
|
47
46
|
format: 'prettier --write "src/**/*.{js,ts,tsx}"'
|
|
48
47
|
},
|
|
49
48
|
dependencies: {
|
|
50
|
-
"@inquirer/prompts": "^
|
|
49
|
+
"@inquirer/prompts": "^8.5.2",
|
|
51
50
|
"@thi.ng/mime": "^2.2.23",
|
|
52
51
|
"@uniformdev/assets": "workspace:*",
|
|
53
|
-
"@uniformdev/automations-sdk": "workspace:*",
|
|
54
52
|
"@uniformdev/canvas": "workspace:*",
|
|
55
53
|
"@uniformdev/context": "workspace:*",
|
|
56
54
|
"@uniformdev/files": "workspace:*",
|
|
@@ -59,38 +57,39 @@ var package_default = {
|
|
|
59
57
|
"@uniformdev/richtext": "workspace:*",
|
|
60
58
|
"call-bind": "^1.0.2",
|
|
61
59
|
colorette: "2.0.20",
|
|
62
|
-
cosmiconfig: "9.0.
|
|
60
|
+
cosmiconfig: "9.0.2",
|
|
63
61
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
64
|
-
diff: "^
|
|
65
|
-
dotenv: "^
|
|
66
|
-
esbuild: "0.
|
|
62
|
+
diff: "^9.0.0",
|
|
63
|
+
dotenv: "^17.4.2",
|
|
64
|
+
esbuild: "0.28.1",
|
|
67
65
|
execa: "5.1.1",
|
|
68
|
-
"file-type": "^
|
|
66
|
+
"file-type": "^22.0.1",
|
|
69
67
|
"fs-jetpack": "5.1.0",
|
|
68
|
+
graphql: "17.0.1",
|
|
69
|
+
"graphql-request": "7.4.0",
|
|
70
70
|
"image-size": "2.0.2",
|
|
71
|
-
"isomorphic-git": "1.
|
|
72
|
-
"js-yaml": "^4.
|
|
71
|
+
"isomorphic-git": "1.38.5",
|
|
72
|
+
"js-yaml": "^4.2.0",
|
|
73
73
|
jsonwebtoken: "9.0.3",
|
|
74
74
|
mitt: "^3.0.1",
|
|
75
75
|
"normalize-newline": "^4.1.0",
|
|
76
|
-
open: "
|
|
77
|
-
ora: "
|
|
76
|
+
open: "11.0.0",
|
|
77
|
+
ora: "9.4.0",
|
|
78
78
|
"p-queue": "7.3.4",
|
|
79
|
-
"posthog-node": "5.
|
|
79
|
+
"posthog-node": "5.38.2",
|
|
80
80
|
"registry-auth-token": "^5.0.0",
|
|
81
81
|
"registry-url": "^6.0.0",
|
|
82
|
-
slugify: "1.6.
|
|
83
|
-
svix: "^1.
|
|
84
|
-
undici: "^7.
|
|
85
|
-
yargs: "^
|
|
86
|
-
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"
|
|
87
87
|
},
|
|
88
88
|
devDependencies: {
|
|
89
|
-
"@types/diff": "^8.0.0",
|
|
90
89
|
"@types/js-yaml": "4.0.9",
|
|
91
|
-
"@types/jsonwebtoken": "9.0.
|
|
92
|
-
"@types/node": "
|
|
93
|
-
"@types/yargs": "17.0.
|
|
90
|
+
"@types/jsonwebtoken": "9.0.10",
|
|
91
|
+
"@types/node": "26.0.0",
|
|
92
|
+
"@types/yargs": "17.0.35"
|
|
94
93
|
},
|
|
95
94
|
bin: {
|
|
96
95
|
uniform: "./cli.js"
|
|
@@ -162,20 +161,12 @@ function withConfiguration(yargs) {
|
|
|
162
161
|
hidden: true
|
|
163
162
|
});
|
|
164
163
|
}
|
|
165
|
-
function maskApiKey(apiKey) {
|
|
166
|
-
const separatorIndex = apiKey.indexOf("1");
|
|
167
|
-
const prefix = separatorIndex > 0 ? apiKey.slice(0, separatorIndex) : apiKey.slice(0, 3);
|
|
168
|
-
return `${prefix}...${apiKey.slice(-4)}`;
|
|
169
|
-
}
|
|
170
164
|
function withApiOptions(yargs) {
|
|
171
|
-
const resolvedApiKey = process.env.UNIFORM_CLI_API_KEY ?? // deprecated
|
|
172
|
-
process.env.CANVAS_CLI_API_KEY ?? // deprecated
|
|
173
|
-
process.env.UPM_CLI_API_KEY ?? process.env.UNIFORM_API_KEY;
|
|
174
165
|
return yargs.option("apiKey", {
|
|
175
166
|
describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
|
|
176
|
-
default:
|
|
177
|
-
|
|
178
|
-
|
|
167
|
+
default: process.env.UNIFORM_CLI_API_KEY ?? // deprecated
|
|
168
|
+
process.env.CANVAS_CLI_API_KEY ?? // deprecated
|
|
169
|
+
process.env.UPM_CLI_API_KEY ?? process.env.UNIFORM_API_KEY,
|
|
179
170
|
demandOption: true,
|
|
180
171
|
type: "string"
|
|
181
172
|
}).option("apiHost", {
|
|
@@ -207,6 +198,13 @@ function withDebugOptions(yargs) {
|
|
|
207
198
|
});
|
|
208
199
|
}
|
|
209
200
|
var fetchIndex = 0;
|
|
201
|
+
var undiciModulePromise;
|
|
202
|
+
function loadUndici() {
|
|
203
|
+
if (!undiciModulePromise) {
|
|
204
|
+
undiciModulePromise = import("undici");
|
|
205
|
+
}
|
|
206
|
+
return undiciModulePromise;
|
|
207
|
+
}
|
|
210
208
|
function nodeFetchProxy(proxy, verbose) {
|
|
211
209
|
if (proxy) {
|
|
212
210
|
console.log(`\u{1F991} Using proxy ${proxy}`);
|
|
@@ -232,15 +230,15 @@ ${e.message}`;
|
|
|
232
230
|
throw e;
|
|
233
231
|
};
|
|
234
232
|
if (proxy) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
233
|
+
return loadUndici().then(({ fetch: undiciFetch, ProxyAgent }) => {
|
|
234
|
+
const wrappedInit = {
|
|
235
|
+
...init,
|
|
236
|
+
dispatcher: new ProxyAgent(proxy)
|
|
237
|
+
};
|
|
238
|
+
return undiciFetch(input, wrappedInit).catch(handleFetchError);
|
|
239
|
+
});
|
|
240
240
|
}
|
|
241
|
-
return
|
|
242
|
-
handleFetchError
|
|
243
|
-
);
|
|
241
|
+
return globalThis.fetch(input, init).catch(handleFetchError);
|
|
244
242
|
};
|
|
245
243
|
const wrappedFetch = createFetchWithRetry(baseFetch, verbose);
|
|
246
244
|
if (verbose) {
|
|
@@ -284,16 +282,6 @@ ${e.message}`;
|
|
|
284
282
|
}
|
|
285
283
|
return wrappedFetch;
|
|
286
284
|
}
|
|
287
|
-
function exitOnCliError(error) {
|
|
288
|
-
if (error instanceof ApiClientError) {
|
|
289
|
-
console.error(error.message);
|
|
290
|
-
} else if (error instanceof Error) {
|
|
291
|
-
console.error(error.message);
|
|
292
|
-
} else {
|
|
293
|
-
console.error(String(error));
|
|
294
|
-
}
|
|
295
|
-
process.exit(1);
|
|
296
|
-
}
|
|
297
285
|
function withProjectOptions(yargs) {
|
|
298
286
|
return yargs.option("project", {
|
|
299
287
|
describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
|
|
@@ -551,11 +539,9 @@ export {
|
|
|
551
539
|
package_default,
|
|
552
540
|
CLI_USER_AGENT,
|
|
553
541
|
withConfiguration,
|
|
554
|
-
maskApiKey,
|
|
555
542
|
withApiOptions,
|
|
556
543
|
withDebugOptions,
|
|
557
544
|
nodeFetchProxy,
|
|
558
|
-
exitOnCliError,
|
|
559
545
|
withProjectOptions,
|
|
560
546
|
withTeamOptions,
|
|
561
547
|
withFormatOptions,
|
package/dist/defaultConfig.mjs
CHANGED