@uniformdev/cli 20.7.1-alpha.12 → 20.7.1-alpha.120
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/LICENSE.txt +1 -1
- package/dist/{chunk-3T7NQ5TX.mjs → chunk-SRP5OQEZ.mjs} +55 -3
- package/dist/defaultConfig.d.mts +1 -1
- package/dist/defaultConfig.mjs +2 -1
- package/dist/{index-qioN1Bsz.d.mts → index-C1Ypkg3A.d.mts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3856 -2086
- package/package.json +20 -18
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2025 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
|
@@ -5,7 +5,7 @@ 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.3.0_@microsoft+api-extractor@7.43.2_postcss@8.
|
|
8
|
+
// ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.2_postcss@8.5.3_tsx@4.20.5_typescript@5.9.2/node_modules/tsup/assets/esm_shims.js
|
|
9
9
|
import { fileURLToPath } from "url";
|
|
10
10
|
import path from "path";
|
|
11
11
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -18,6 +18,57 @@ 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
20
|
import { fetch as undiciFetch, ProxyAgent } from "undici";
|
|
21
|
+
|
|
22
|
+
// src/sync/windowsRetry.ts
|
|
23
|
+
var RETRIABLE_ERRORS = [
|
|
24
|
+
"ECONNRESET",
|
|
25
|
+
"ECONNREFUSED",
|
|
26
|
+
"ENOTFOUND",
|
|
27
|
+
"ETIMEDOUT",
|
|
28
|
+
"ESOCKETTIMEDOUT",
|
|
29
|
+
"read ECONNRESET",
|
|
30
|
+
"write ECONNRESET",
|
|
31
|
+
"socket hang up",
|
|
32
|
+
"fetch failed"
|
|
33
|
+
];
|
|
34
|
+
var isWindows = process.platform === "win32";
|
|
35
|
+
var isRetriableError = (error) => {
|
|
36
|
+
if (!(error instanceof Error)) return false;
|
|
37
|
+
const errorMessage = error.message.toLowerCase();
|
|
38
|
+
const errorCode = error.code?.toLowerCase();
|
|
39
|
+
return RETRIABLE_ERRORS.some(
|
|
40
|
+
(pattern) => errorMessage.includes(pattern.toLowerCase()) || errorCode?.includes(pattern.toLowerCase())
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
var retryWithBackoff = async (operation, maxRetries = isWindows ? 5 : 3, baseDelay = isWindows ? 2e3 : 1e3, verbose = false) => {
|
|
44
|
+
let lastError;
|
|
45
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
46
|
+
try {
|
|
47
|
+
return await operation();
|
|
48
|
+
} catch (error) {
|
|
49
|
+
lastError = error;
|
|
50
|
+
if (!isRetriableError(error) || attempt === maxRetries) {
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
const delay = baseDelay * Math.pow(2, attempt - 1) + Math.random() * 1e3;
|
|
54
|
+
if (verbose) {
|
|
55
|
+
console.log(
|
|
56
|
+
`\u{1F504} Retrying operation (attempt ${attempt}/${maxRetries}) after ${Math.round(delay)}ms due to: ${error.message}`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
throw lastError;
|
|
63
|
+
};
|
|
64
|
+
var createFetchWithRetry = (baseFetch, verbose = false) => {
|
|
65
|
+
return async (input, init) => {
|
|
66
|
+
const fetchOperation = () => baseFetch(input, init);
|
|
67
|
+
return retryWithBackoff(fetchOperation, 5, 2e3, verbose);
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/sync/util.ts
|
|
21
72
|
function withConfiguration(yargs) {
|
|
22
73
|
return yargs.option("serialization", {
|
|
23
74
|
skipValidation: true,
|
|
@@ -65,7 +116,7 @@ function nodeFetchProxy(proxy, verbose) {
|
|
|
65
116
|
if (proxy) {
|
|
66
117
|
console.log(`\u{1F991} Using proxy ${proxy}`);
|
|
67
118
|
}
|
|
68
|
-
const
|
|
119
|
+
const baseFetch = (input, init) => {
|
|
69
120
|
const handleFetchError = (e) => {
|
|
70
121
|
if (e instanceof Error) {
|
|
71
122
|
e.message = `Error fetching ${input.toString()}
|
|
@@ -91,6 +142,7 @@ ${e.message}`;
|
|
|
91
142
|
handleFetchError
|
|
92
143
|
);
|
|
93
144
|
};
|
|
145
|
+
const wrappedFetch = createFetchWithRetry(baseFetch, verbose);
|
|
94
146
|
if (verbose) {
|
|
95
147
|
return async function fetchWithVerboseLogging(input, init) {
|
|
96
148
|
const method = init?.method ?? "GET";
|
|
@@ -197,7 +249,7 @@ function emitWithFormat(object, format, filename) {
|
|
|
197
249
|
case "yaml":
|
|
198
250
|
content = dump(object);
|
|
199
251
|
if ("$schema" in object) {
|
|
200
|
-
content = `# yaml-language-server: $schema
|
|
252
|
+
content = `# yaml-language-server: $schema=${object["$schema"]}
|
|
201
253
|
${content}`;
|
|
202
254
|
}
|
|
203
255
|
break;
|
package/dist/defaultConfig.d.mts
CHANGED
package/dist/defaultConfig.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-SRP5OQEZ.mjs";
|
|
2
2
|
|
|
3
3
|
// src/sync/allSerializableEntitiesConfig.ts
|
|
4
4
|
var allSerializableEntitiesConfig = {
|
|
@@ -17,6 +17,7 @@ var allSerializableEntitiesConfig = {
|
|
|
17
17
|
compositionPattern: { publish: true },
|
|
18
18
|
asset: {},
|
|
19
19
|
workflow: {},
|
|
20
|
+
webhook: {},
|
|
20
21
|
aggregate: {},
|
|
21
22
|
enrichment: {},
|
|
22
23
|
prompt: {},
|
|
@@ -4,7 +4,7 @@ type StateArgs = {
|
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
type SyncMode = 'mirror' | 'createOrUpdate' | 'create';
|
|
7
|
-
type EntityTypes = 'aggregate' | 'asset' | 'category' | 'workflow' | 'component' | 'composition' | 'contentType' | 'dataType' | 'enrichment' | 'entry' | 'entryPattern' | 'locale' | 'componentPattern' | 'compositionPattern' | 'projectMapDefinition' | 'projectMapNode' | 'previewUrl' | 'previewViewport' | 'prompt' | 'quirk' | 'redirect' | 'signal' | 'test';
|
|
7
|
+
type EntityTypes = 'aggregate' | 'asset' | 'category' | 'workflow' | 'webhook' | 'component' | 'composition' | 'contentType' | 'dataType' | 'enrichment' | 'entry' | 'entryPattern' | 'locale' | 'componentPattern' | 'compositionPattern' | '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-C1Ypkg3A.mjs';
|