@uniformdev/cli 20.57.2-alpha.25 → 20.58.1-alpha.4
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.58.0",
|
|
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
|
+
lint: 'eslint "src/**/*.{js,ts,tsx}"',
|
|
48
|
+
format: 'prettier --write "src/**/*.{js,ts,tsx}"'
|
|
49
|
+
},
|
|
50
|
+
dependencies: {
|
|
51
|
+
"@inquirer/prompts": "^7.10.1",
|
|
52
|
+
"@thi.ng/mime": "^2.2.23",
|
|
53
|
+
"@uniformdev/assets": "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: "^5.0.0",
|
|
65
|
+
dotenv: "^16.4.7",
|
|
66
|
+
esbuild: "0.25.0",
|
|
67
|
+
execa: "5.1.1",
|
|
68
|
+
"file-type": "^20.0.0",
|
|
69
|
+
"fs-jetpack": "5.1.0",
|
|
70
|
+
graphql: "16.9.0",
|
|
71
|
+
"graphql-request": "6.1.0",
|
|
72
|
+
"image-size": "^1.2.1",
|
|
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.16.0",
|
|
87
|
+
yargs: "^17.6.2",
|
|
88
|
+
zod: "3.25.76"
|
|
89
|
+
},
|
|
90
|
+
devDependencies: {
|
|
91
|
+
"@types/diff": "5.0.9",
|
|
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()}
|
|
@@ -370,6 +464,8 @@ var getDirectoryOrFilename = ({
|
|
|
370
464
|
|
|
371
465
|
export {
|
|
372
466
|
__require,
|
|
467
|
+
package_default,
|
|
468
|
+
CLI_USER_AGENT,
|
|
373
469
|
withConfiguration,
|
|
374
470
|
withApiOptions,
|
|
375
471
|
withDebugOptions,
|
package/dist/defaultConfig.d.mts
CHANGED
package/dist/defaultConfig.mjs
CHANGED
|
@@ -6,38 +6,12 @@ type StateArgs = {
|
|
|
6
6
|
type SyncMode = 'mirror' | 'createOrUpdate' | 'create';
|
|
7
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
|
-
type
|
|
9
|
+
type EntityConfiguration = {
|
|
10
10
|
mode?: SyncMode;
|
|
11
11
|
directory?: string;
|
|
12
12
|
format?: SyncFileFormat;
|
|
13
13
|
disabled?: true;
|
|
14
14
|
};
|
|
15
|
-
type EntityFilterCriteriaConfig = {
|
|
16
|
-
type: 'ids';
|
|
17
|
-
match: string[];
|
|
18
|
-
} | {
|
|
19
|
-
type: 'nameContains';
|
|
20
|
-
match: string;
|
|
21
|
-
};
|
|
22
|
-
type EntityFilterInclude = {
|
|
23
|
-
/** If set, only entities matching the criteria will be synced. Cannot be combined with `exclude`. */
|
|
24
|
-
include: {
|
|
25
|
-
filters: EntityFilterCriteriaConfig;
|
|
26
|
-
};
|
|
27
|
-
exclude?: never;
|
|
28
|
-
};
|
|
29
|
-
type EntityFilterExclude = {
|
|
30
|
-
include?: never;
|
|
31
|
-
/** If set, entities matching the criteria will be excluded from sync. Cannot be combined with `include`. */
|
|
32
|
-
exclude: {
|
|
33
|
-
filters: EntityFilterCriteriaConfig;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
type EntityFilterNone = {
|
|
37
|
-
include?: never;
|
|
38
|
-
exclude?: never;
|
|
39
|
-
};
|
|
40
|
-
type EntityConfiguration = EntityConfigurationBase & (EntityFilterInclude | EntityFilterExclude | EntityFilterNone);
|
|
41
15
|
type EntityWithStateConfiguration = EntityConfiguration & Partial<StateArgs>;
|
|
42
16
|
type PublishableEntitiesConfiguration = EntityWithStateConfiguration & {
|
|
43
17
|
publish?: boolean;
|
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';
|