@uniformdev/cli 20.50.1 → 20.50.2-alpha.109
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.
|
@@ -19,6 +19,95 @@ import { dump, load } from "js-yaml";
|
|
|
19
19
|
import { dirname, extname, isAbsolute, resolve, sep } from "path";
|
|
20
20
|
import { fetch as undiciFetch, ProxyAgent } from "undici";
|
|
21
21
|
|
|
22
|
+
// package.json
|
|
23
|
+
var package_default = {
|
|
24
|
+
name: "@uniformdev/cli",
|
|
25
|
+
version: "20.66.5",
|
|
26
|
+
description: "Uniform command line interface tool",
|
|
27
|
+
license: "SEE LICENSE IN LICENSE.txt",
|
|
28
|
+
main: "./cli.js",
|
|
29
|
+
exports: {
|
|
30
|
+
".": {
|
|
31
|
+
types: "./dist/index.d.mts",
|
|
32
|
+
default: "./cli.js"
|
|
33
|
+
},
|
|
34
|
+
"./config": {
|
|
35
|
+
types: "./dist/defaultConfig.d.mts",
|
|
36
|
+
default: "./dist/defaultConfig.mjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
types: "./dist/index.d.mts",
|
|
40
|
+
sideEffects: false,
|
|
41
|
+
scripts: {
|
|
42
|
+
uniform: "node ./cli.js",
|
|
43
|
+
build: "tsc --noEmit && tsup",
|
|
44
|
+
dev: "tsup --watch",
|
|
45
|
+
clean: "rimraf dist",
|
|
46
|
+
test: "vitest run",
|
|
47
|
+
format: 'prettier --write "src/**/*.{js,ts,tsx}"'
|
|
48
|
+
},
|
|
49
|
+
dependencies: {
|
|
50
|
+
"@inquirer/prompts": "^7.10.1",
|
|
51
|
+
"@thi.ng/mime": "^2.2.23",
|
|
52
|
+
"@uniformdev/assets": "workspace:*",
|
|
53
|
+
"@uniformdev/automations-sdk": "workspace:*",
|
|
54
|
+
"@uniformdev/canvas": "workspace:*",
|
|
55
|
+
"@uniformdev/context": "workspace:*",
|
|
56
|
+
"@uniformdev/files": "workspace:*",
|
|
57
|
+
"@uniformdev/project-map": "workspace:*",
|
|
58
|
+
"@uniformdev/redirect": "workspace:*",
|
|
59
|
+
"@uniformdev/richtext": "workspace:*",
|
|
60
|
+
"call-bind": "^1.0.2",
|
|
61
|
+
colorette: "2.0.20",
|
|
62
|
+
cosmiconfig: "9.0.0",
|
|
63
|
+
"cosmiconfig-typescript-loader": "5.0.0",
|
|
64
|
+
diff: "^8.0.3",
|
|
65
|
+
dotenv: "^16.4.7",
|
|
66
|
+
esbuild: "0.25.0",
|
|
67
|
+
execa: "5.1.1",
|
|
68
|
+
"file-type": "^21.3.2",
|
|
69
|
+
"fs-jetpack": "5.1.0",
|
|
70
|
+
graphql: "16.9.0",
|
|
71
|
+
"graphql-request": "6.1.0",
|
|
72
|
+
"image-size": "2.0.2",
|
|
73
|
+
"isomorphic-git": "1.35.0",
|
|
74
|
+
"js-yaml": "^4.1.0",
|
|
75
|
+
jsonwebtoken: "9.0.3",
|
|
76
|
+
mitt: "^3.0.1",
|
|
77
|
+
"normalize-newline": "^4.1.0",
|
|
78
|
+
open: "10.2.0",
|
|
79
|
+
ora: "8.0.1",
|
|
80
|
+
"p-queue": "7.3.4",
|
|
81
|
+
"posthog-node": "5.28.5",
|
|
82
|
+
"registry-auth-token": "^5.0.0",
|
|
83
|
+
"registry-url": "^6.0.0",
|
|
84
|
+
slugify: "1.6.6",
|
|
85
|
+
svix: "^1.71.0",
|
|
86
|
+
undici: "^7.24.0",
|
|
87
|
+
yargs: "^17.6.2",
|
|
88
|
+
zod: "4.3.6"
|
|
89
|
+
},
|
|
90
|
+
devDependencies: {
|
|
91
|
+
"@types/diff": "^8.0.0",
|
|
92
|
+
"@types/js-yaml": "4.0.9",
|
|
93
|
+
"@types/jsonwebtoken": "9.0.5",
|
|
94
|
+
"@types/node": "24.3.1",
|
|
95
|
+
"@types/yargs": "17.0.32"
|
|
96
|
+
},
|
|
97
|
+
bin: {
|
|
98
|
+
uniform: "./cli.js"
|
|
99
|
+
},
|
|
100
|
+
files: [
|
|
101
|
+
"/dist"
|
|
102
|
+
],
|
|
103
|
+
publishConfig: {
|
|
104
|
+
access: "public"
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// src/constants.ts
|
|
109
|
+
var CLI_USER_AGENT = `uniform-cli/${package_default.version}`;
|
|
110
|
+
|
|
22
111
|
// src/sync/windowsRetry.ts
|
|
23
112
|
var RETRIABLE_ERRORS = [
|
|
24
113
|
"ECONNRESET",
|
|
@@ -117,6 +206,11 @@ function nodeFetchProxy(proxy, verbose) {
|
|
|
117
206
|
console.log(`\u{1F991} Using proxy ${proxy}`);
|
|
118
207
|
}
|
|
119
208
|
const baseFetch = (input, init) => {
|
|
209
|
+
const initWithUserAgent = {
|
|
210
|
+
...init,
|
|
211
|
+
headers: { "User-Agent": CLI_USER_AGENT, ...init?.headers }
|
|
212
|
+
};
|
|
213
|
+
init = initWithUserAgent;
|
|
120
214
|
const handleFetchError = (e) => {
|
|
121
215
|
if (e instanceof Error) {
|
|
122
216
|
e.message = `Error fetching ${input.toString()}
|
|
@@ -184,6 +278,16 @@ ${e.message}`;
|
|
|
184
278
|
}
|
|
185
279
|
return wrappedFetch;
|
|
186
280
|
}
|
|
281
|
+
function exitOnCliError(error) {
|
|
282
|
+
if (error instanceof ApiClientError) {
|
|
283
|
+
console.error(error.errorMessage);
|
|
284
|
+
} else if (error instanceof Error) {
|
|
285
|
+
console.error(error.message);
|
|
286
|
+
} else {
|
|
287
|
+
console.error(String(error));
|
|
288
|
+
}
|
|
289
|
+
process.exit(1);
|
|
290
|
+
}
|
|
187
291
|
function withProjectOptions(yargs) {
|
|
188
292
|
return yargs.option("project", {
|
|
189
293
|
describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
|
|
@@ -370,10 +474,13 @@ var getDirectoryOrFilename = ({
|
|
|
370
474
|
|
|
371
475
|
export {
|
|
372
476
|
__require,
|
|
477
|
+
package_default,
|
|
478
|
+
CLI_USER_AGENT,
|
|
373
479
|
withConfiguration,
|
|
374
480
|
withApiOptions,
|
|
375
481
|
withDebugOptions,
|
|
376
482
|
nodeFetchProxy,
|
|
483
|
+
exitOnCliError,
|
|
377
484
|
withProjectOptions,
|
|
378
485
|
withTeamOptions,
|
|
379
486
|
withFormatOptions,
|
package/dist/defaultConfig.d.mts
CHANGED
package/dist/defaultConfig.mjs
CHANGED
|
@@ -4,7 +4,7 @@ type StateArgs = {
|
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
type SyncMode = 'mirror' | 'createOrUpdate' | 'create';
|
|
7
|
-
type EntityTypes = 'aggregate' | 'asset' | 'category' | 'workflow' | 'webhook' | 'component' | 'composition' | 'contentType' | 'dataType' | 'enrichment' | 'entry' | 'entryPattern' | 'locale' | 'componentPattern' | 'compositionPattern' | 'policyDocument' | 'projectMapDefinition' | 'projectMapNode' | 'previewUrl' | 'previewViewport' | 'prompt' | 'quirk' | 'redirect' | 'signal' | 'test';
|
|
7
|
+
type EntityTypes = 'aggregate' | 'asset' | 'category' | 'workflow' | 'webhook' | 'component' | 'composition' | 'contentType' | 'dataType' | 'enrichment' | 'entry' | 'entryPattern' | 'label' | 'locale' | 'componentPattern' | 'compositionPattern' | 'policyDocument' | 'projectMapDefinition' | 'projectMapNode' | 'previewUrl' | 'previewViewport' | 'prompt' | 'quirk' | 'redirect' | 'signal' | 'test';
|
|
8
8
|
type SyncFileFormat = 'yaml' | 'json';
|
|
9
9
|
type EntityConfiguration = {
|
|
10
10
|
mode?: SyncMode;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { C as CLIConfiguration } from './index-
|
|
2
|
+
export { C as CLIConfiguration } from './index-BurxbjCD.mjs';
|