windmill-cli 1.507.2 → 1.509.0
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/esm/apps.js +2 -1
- package/esm/auth.js +40 -0
- package/esm/conf.js +13 -0
- package/esm/context.js +2 -32
- package/esm/dev.js +2 -1
- package/esm/flow.js +7 -4
- package/esm/folder.js +2 -1
- package/esm/gen/core/OpenAPI.js +1 -1
- package/esm/gen/services.gen.js +42 -1
- package/esm/gitsync-settings.js +216 -44
- package/esm/hub.js +2 -1
- package/esm/main.js +4 -2
- package/esm/metadata.js +79 -56
- package/esm/resource-type.js +2 -1
- package/esm/resource.js +2 -1
- package/esm/schedule.js +2 -1
- package/esm/script.js +15 -23
- package/esm/script_common.js +6 -1
- package/esm/sync.js +9 -60
- package/esm/trigger.js +2 -3
- package/esm/user.js +1 -1
- package/esm/utils.js +2 -2
- package/esm/variable.js +2 -1
- package/esm/workspace.js +1 -1
- package/package.json +1 -1
- package/types/apps.d.ts.map +1 -1
- package/types/auth.d.ts +8 -0
- package/types/auth.d.ts.map +1 -0
- package/types/conf.d.ts.map +1 -1
- package/types/context.d.ts +0 -2
- package/types/context.d.ts.map +1 -1
- package/types/dev.d.ts.map +1 -1
- package/types/flow.d.ts.map +1 -1
- package/types/folder.d.ts.map +1 -1
- package/types/gen/services.gen.d.ts +21 -1
- package/types/gen/services.gen.d.ts.map +1 -1
- package/types/gen/types.gen.d.ts +29 -5
- package/types/gen/types.gen.d.ts.map +1 -1
- package/types/gitsync-settings.d.ts +4 -0
- package/types/gitsync-settings.d.ts.map +1 -1
- package/types/hub.d.ts.map +1 -1
- package/types/main.d.ts +1 -1
- package/types/metadata.d.ts +5 -2
- package/types/metadata.d.ts.map +1 -1
- package/types/resource-type.d.ts.map +1 -1
- package/types/resource.d.ts.map +1 -1
- package/types/schedule.d.ts.map +1 -1
- package/types/script.d.ts +2 -7
- package/types/script.d.ts.map +1 -1
- package/types/script_common.d.ts +14 -0
- package/types/script_common.d.ts.map +1 -1
- package/types/sync.d.ts.map +1 -1
- package/types/trigger.d.ts.map +1 -1
- package/types/variable.d.ts.map +1 -1
package/esm/main.js
CHANGED
|
@@ -36,7 +36,7 @@ export { flow, app, script, workspace, resource, user, variable, hub, folder, sc
|
|
|
36
36
|
// console.error(JSON.stringify(event.error, null, 4));
|
|
37
37
|
// }
|
|
38
38
|
// });
|
|
39
|
-
export const VERSION = "1.
|
|
39
|
+
export const VERSION = "1.509.0";
|
|
40
40
|
const command = new Command()
|
|
41
41
|
.name("wmill")
|
|
42
42
|
.action(() => log.info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`))
|
|
@@ -76,6 +76,7 @@ const command = new Command()
|
|
|
76
76
|
skipFolders: DEFAULT_SYNC_OPTIONS.skipFolders,
|
|
77
77
|
includeSchedules: DEFAULT_SYNC_OPTIONS.includeSchedules,
|
|
78
78
|
includeTriggers: DEFAULT_SYNC_OPTIONS.includeTriggers,
|
|
79
|
+
overrides: {},
|
|
79
80
|
};
|
|
80
81
|
await dntShim.Deno.writeTextFile("wmill.yaml", yamlStringify(initialConfig));
|
|
81
82
|
log.info(colors.green("wmill.yaml created with default settings"));
|
|
@@ -84,7 +85,8 @@ const command = new Command()
|
|
|
84
85
|
// Check for backend git-sync settings unless --use-default is specified
|
|
85
86
|
if (!opts.useDefault) {
|
|
86
87
|
try {
|
|
87
|
-
const { requireLogin
|
|
88
|
+
const { requireLogin } = await import("./auth.js");
|
|
89
|
+
const { resolveWorkspace } = await import("./context.js");
|
|
88
90
|
// Check if user has workspace configured
|
|
89
91
|
const { getActiveWorkspace } = await import("./workspace.js");
|
|
90
92
|
const activeWorkspace = await getActiveWorkspace(opts);
|
package/esm/metadata.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
3
|
import { SEP, colors, log, path, yamlParseFile, yamlStringify, } from "./deps.js";
|
|
4
4
|
import { defaultScriptMetadata, } from "./bootstrap/script_bootstrap.js";
|
|
5
|
+
import { languagesWithRawReqsSupport } from "./script_common.js";
|
|
5
6
|
import { inferContentTypeFromFilePath } from "./script_common.js";
|
|
6
|
-
import { exts } from "./script.js";
|
|
7
|
+
import { exts, findGlobalDeps } from "./script.js";
|
|
7
8
|
import { FSFSElement, extractInlineScriptsForFlows, findCodebase, newPathAssigner, yamlOptions, } from "./sync.js";
|
|
8
9
|
import { generateHash, readInlinePathSync } from "./utils.js";
|
|
9
10
|
import { replaceInlineScripts } from "./flow.js";
|
|
@@ -17,32 +18,8 @@ export class LockfileGenerationError extends Error {
|
|
|
17
18
|
export async function generateAllMetadata() { }
|
|
18
19
|
function findClosestRawReqs(lang, remotePath, globalDeps) {
|
|
19
20
|
let bestCandidate = undefined;
|
|
20
|
-
if (lang
|
|
21
|
-
Object.entries(globalDeps.
|
|
22
|
-
if (remotePath.startsWith(k) &&
|
|
23
|
-
k.length >= (bestCandidate?.k ?? "").length) {
|
|
24
|
-
bestCandidate = { k, v };
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
else if (lang == "python3") {
|
|
29
|
-
Object.entries(globalDeps.reqs).forEach(([k, v]) => {
|
|
30
|
-
if (remotePath.startsWith(k) &&
|
|
31
|
-
k.length >= (bestCandidate?.k ?? "").length) {
|
|
32
|
-
bestCandidate = { k, v };
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
else if (lang == "php") {
|
|
37
|
-
Object.entries(globalDeps.composers).forEach(([k, v]) => {
|
|
38
|
-
if (remotePath.startsWith(k) &&
|
|
39
|
-
k.length >= (bestCandidate?.k ?? "").length) {
|
|
40
|
-
bestCandidate = { k, v };
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
else if (lang == "go") {
|
|
45
|
-
Object.entries(globalDeps.goMods).forEach(([k, v]) => {
|
|
21
|
+
if (lang) {
|
|
22
|
+
Object.entries(globalDeps.get(lang) ?? {}).forEach(([k, v]) => {
|
|
46
23
|
if (remotePath.startsWith(k) &&
|
|
47
24
|
k.length >= (bestCandidate?.k ?? "").length) {
|
|
48
25
|
bestCandidate = { k, v };
|
|
@@ -53,17 +30,25 @@ function findClosestRawReqs(lang, remotePath, globalDeps) {
|
|
|
53
30
|
return bestCandidate?.v;
|
|
54
31
|
}
|
|
55
32
|
const TOP_HASH = "__flow_hash";
|
|
56
|
-
async function generateFlowHash(folder) {
|
|
33
|
+
async function generateFlowHash(rawReqs, folder, defaultTs) {
|
|
57
34
|
const elems = await FSFSElement(path.join(dntShim.Deno.cwd(), folder), [], true);
|
|
58
35
|
const hashes = {};
|
|
59
36
|
for await (const f of elems.getChildren()) {
|
|
60
37
|
if (exts.some((e) => f.path.endsWith(e))) {
|
|
61
|
-
|
|
38
|
+
let reqs;
|
|
39
|
+
if (rawReqs) {
|
|
40
|
+
// Get language name from path
|
|
41
|
+
const lang = inferContentTypeFromFilePath(f.path, defaultTs);
|
|
42
|
+
// Get lock for that language
|
|
43
|
+
[, reqs] = Object.entries(rawReqs).find(([lang2, _]) => lang == lang2) ?? [];
|
|
44
|
+
}
|
|
45
|
+
// Embed lock into hash
|
|
46
|
+
hashes[f.path] = await generateHash(await f.getContentText() + (reqs ?? ""));
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
49
|
return { ...hashes, [TOP_HASH]: await generateHash(JSON.stringify(hashes)) };
|
|
65
50
|
}
|
|
66
|
-
export async function generateFlowLockInternal(folder, dryRun, workspace, justUpdateMetadataLock, noStaleMessage) {
|
|
51
|
+
export async function generateFlowLockInternal(folder, dryRun, workspace, opts, justUpdateMetadataLock, noStaleMessage, useRawReqs) {
|
|
67
52
|
if (folder.endsWith(SEP)) {
|
|
68
53
|
folder = folder.substring(0, folder.length - 1);
|
|
69
54
|
}
|
|
@@ -73,7 +58,22 @@ export async function generateFlowLockInternal(folder, dryRun, workspace, justUp
|
|
|
73
58
|
if (!justUpdateMetadataLock && !noStaleMessage) {
|
|
74
59
|
log.info(`Generating lock for flow ${folder} at ${remote_path}`);
|
|
75
60
|
}
|
|
76
|
-
let
|
|
61
|
+
let rawReqs = undefined;
|
|
62
|
+
if (useRawReqs) {
|
|
63
|
+
// Find all dependency files in the workspace
|
|
64
|
+
const globalDeps = await findGlobalDeps();
|
|
65
|
+
// Find closest dependency files for this flow
|
|
66
|
+
rawReqs = {};
|
|
67
|
+
// TODO: PERF: Only include raw reqs for the languages that are in the flow
|
|
68
|
+
languagesWithRawReqsSupport.map((lang) => {
|
|
69
|
+
const dep = findClosestRawReqs(lang, folder, globalDeps);
|
|
70
|
+
if (dep) {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
rawReqs[lang.language] = dep;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
let hashes = await generateFlowHash(rawReqs, folder, opts.defaultTs);
|
|
77
77
|
const conf = await readLockfile();
|
|
78
78
|
if (await checkifMetadataUptodate(folder, hashes[TOP_HASH], conf, TOP_HASH)) {
|
|
79
79
|
if (!noStaleMessage) {
|
|
@@ -84,6 +84,10 @@ export async function generateFlowLockInternal(folder, dryRun, workspace, justUp
|
|
|
84
84
|
else if (dryRun) {
|
|
85
85
|
return remote_path;
|
|
86
86
|
}
|
|
87
|
+
if (useRawReqs) {
|
|
88
|
+
log.warn("If using local lockfiles, following redeployments from Web App will inevitably override generated lockfiles by CLI. To maintain your script's lockfiles you will need to redeploy only from CLI. (Behavior is subject to change)");
|
|
89
|
+
log.info((await blueColor())(`Found raw requirements (${languagesWithRawReqsSupport.map((l) => l.rrFilename).join("/")}) for ${folder}, using it`));
|
|
90
|
+
}
|
|
87
91
|
const flowValue = (await yamlParseFile(folder + SEP + "flow.yaml"));
|
|
88
92
|
if (!justUpdateMetadataLock) {
|
|
89
93
|
const changedScripts = [];
|
|
@@ -99,22 +103,24 @@ export async function generateFlowLockInternal(folder, dryRun, workspace, justUp
|
|
|
99
103
|
log.info(`Recomputing locks of ${changedScripts.join(", ")} in ${folder}`);
|
|
100
104
|
replaceInlineScripts(flowValue.value.modules, folder + SEP, changedScripts);
|
|
101
105
|
//removeChangedLocks
|
|
102
|
-
flowValue.value = await updateFlow(workspace, flowValue.value, remote_path);
|
|
103
|
-
const inlineScripts = extractInlineScriptsForFlows(flowValue.value.modules, newPathAssigner("bun"));
|
|
106
|
+
flowValue.value = await updateFlow(workspace, flowValue.value, remote_path, rawReqs);
|
|
107
|
+
const inlineScripts = extractInlineScriptsForFlows(flowValue.value.modules, newPathAssigner(opts.defaultTs ?? "bun"));
|
|
104
108
|
inlineScripts
|
|
105
109
|
.filter((s) => s.path.endsWith(".lock"))
|
|
106
110
|
.forEach((s) => {
|
|
107
111
|
dntShim.Deno.writeTextFileSync(dntShim.Deno.cwd() + SEP + folder + SEP + s.path, s.content);
|
|
108
112
|
});
|
|
113
|
+
// Overwrite `flow.yaml` with the new lockfile references
|
|
114
|
+
await dntShim.Deno.writeTextFile(dntShim.Deno.cwd() + SEP + folder + SEP + "flow.yaml", yamlStringify(flowValue));
|
|
109
115
|
}
|
|
110
|
-
hashes = await generateFlowHash(folder);
|
|
116
|
+
hashes = await generateFlowHash(rawReqs, folder, opts.defaultTs);
|
|
111
117
|
for (const [path, hash] of Object.entries(hashes)) {
|
|
112
118
|
await updateMetadataGlobalLock(folder, hash, path);
|
|
113
119
|
}
|
|
114
120
|
log.info(colors.green(`Flow ${remote_path} lockfiles updated`));
|
|
115
121
|
}
|
|
116
122
|
// on windows, when using powershell, blue is not readable
|
|
117
|
-
async function blueColor() {
|
|
123
|
+
export async function blueColor() {
|
|
118
124
|
const isWin = await getIsWin();
|
|
119
125
|
return isWin ? colors.black : colors.blue;
|
|
120
126
|
}
|
|
@@ -123,9 +129,10 @@ export async function generateScriptMetadataInternal(scriptPath, workspace, opts
|
|
|
123
129
|
.substring(0, scriptPath.indexOf("."))
|
|
124
130
|
.replaceAll(SEP, "/");
|
|
125
131
|
const language = inferContentTypeFromFilePath(scriptPath, opts.defaultTs);
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
const rrLang = languagesWithRawReqsSupport.find((l) => language == l.language);
|
|
133
|
+
const rawReqs = findClosestRawReqs(rrLang, scriptPath, globalDeps);
|
|
134
|
+
if (rawReqs && rrLang) {
|
|
135
|
+
log.info((await blueColor())(`Found raw requirements (${rrLang.rrFilename}) for ${scriptPath}, using it`));
|
|
129
136
|
}
|
|
130
137
|
const metadataWithType = await parseMetadataFile(remotePath, undefined, globalDeps, codebases);
|
|
131
138
|
// read script content
|
|
@@ -193,11 +200,8 @@ export async function updateScriptSchema(scriptContent, language, metadataConten
|
|
|
193
200
|
}
|
|
194
201
|
}
|
|
195
202
|
async function updateScriptLock(workspace, scriptContent, language, remotePath, metadataContent, rawDeps) {
|
|
196
|
-
if (!(language ==
|
|
197
|
-
language == "python3" ||
|
|
198
|
-
language == "go" ||
|
|
203
|
+
if (!(languagesWithRawReqsSupport.some((l) => l.language == language) ||
|
|
199
204
|
language == "deno" ||
|
|
200
|
-
language == "php" ||
|
|
201
205
|
language == "rust" ||
|
|
202
206
|
language == "ansible")) {
|
|
203
207
|
return;
|
|
@@ -255,20 +259,39 @@ async function updateScriptLock(workspace, scriptContent, language, remotePath,
|
|
|
255
259
|
throw new LockfileGenerationError(`Failed to generate lockfile:${rawResponse.statusText}, ${responseText}, ${e}`);
|
|
256
260
|
}
|
|
257
261
|
}
|
|
258
|
-
export async function updateFlow(workspace, flow_value, remotePath) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
262
|
+
export async function updateFlow(workspace, flow_value, remotePath, rawDeps) {
|
|
263
|
+
let rawResponse;
|
|
264
|
+
if (rawDeps != undefined) {
|
|
265
|
+
log.info(colors.blue("Using raw requirements for flow dependencies"));
|
|
266
|
+
// generate the script lock running a dependency job in Windmill and update it inplace
|
|
267
|
+
rawResponse = await fetch(`${workspace.remote}api/w/${workspace.workspaceId}/jobs/run/flow_dependencies`, {
|
|
268
|
+
method: "POST",
|
|
269
|
+
headers: {
|
|
270
|
+
Cookie: `token=${workspace.token}`,
|
|
271
|
+
"Content-Type": "application/json",
|
|
272
|
+
},
|
|
273
|
+
body: JSON.stringify({
|
|
274
|
+
flow_value,
|
|
275
|
+
path: remotePath,
|
|
276
|
+
use_local_lockfiles: true,
|
|
277
|
+
raw_deps: rawDeps,
|
|
278
|
+
}),
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
// Standard dependency resolution on the server
|
|
283
|
+
rawResponse = await fetch(`${workspace.remote}api/w/${workspace.workspaceId}/jobs/run/flow_dependencies`, {
|
|
284
|
+
method: "POST",
|
|
285
|
+
headers: {
|
|
286
|
+
Cookie: `token=${workspace.token}`,
|
|
287
|
+
"Content-Type": "application/json",
|
|
288
|
+
},
|
|
289
|
+
body: JSON.stringify({
|
|
290
|
+
flow_value,
|
|
291
|
+
path: remotePath,
|
|
292
|
+
}),
|
|
293
|
+
});
|
|
294
|
+
}
|
|
272
295
|
let responseText = "reading response failed";
|
|
273
296
|
try {
|
|
274
297
|
const res = (await rawResponse.json());
|
package/esm/resource-type.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-explicit-any
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
3
|
import { isSuperset, parseFromFile, removeType, } from "./types.js";
|
|
4
|
-
import { requireLogin
|
|
4
|
+
import { requireLogin } from "./auth.js";
|
|
5
|
+
import { resolveWorkspace } from "./context.js";
|
|
5
6
|
import { colors, Command, log, Table } from "./deps.js";
|
|
6
7
|
import * as wmill from "./gen/services.gen.js";
|
|
7
8
|
export async function pushResourceType(workspace, remotePath, resource, localResource) {
|
package/esm/resource.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-explicit-any
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
3
|
import { isSuperset, parseFromFile, removeType, } from "./types.js";
|
|
4
|
-
import { requireLogin
|
|
4
|
+
import { requireLogin } from "./auth.js";
|
|
5
|
+
import { resolveWorkspace, validatePath } from "./context.js";
|
|
5
6
|
import { colors, Command, log, SEP, Table } from "./deps.js";
|
|
6
7
|
import * as wmill from "./gen/services.gen.js";
|
|
7
8
|
import { readInlinePathSync } from "./utils.js";
|
package/esm/schedule.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-explicit-any
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
3
|
import { colors, Command, log, SEP, Table } from "./deps.js";
|
|
4
|
-
import { requireLogin
|
|
4
|
+
import { requireLogin } from "./auth.js";
|
|
5
|
+
import { resolveWorkspace, validatePath } from "./context.js";
|
|
5
6
|
import * as wmill from "./gen/services.gen.js";
|
|
6
7
|
import { isSuperset, parseFromFile, removeType, } from "./types.js";
|
|
7
8
|
async function list(opts) {
|
package/esm/script.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-explicit-any
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
|
-
import { requireLogin
|
|
3
|
+
import { requireLogin } from "./auth.js";
|
|
4
|
+
import { resolveWorkspace, validatePath } from "./context.js";
|
|
4
5
|
import { colors, Command, Confirm, log, readAll, SEP, Table, writeAllSync, yamlStringify, } from "./deps.js";
|
|
5
6
|
import { deepEqual } from "./utils.js";
|
|
6
7
|
import * as wmill from "./gen/services.gen.js";
|
|
7
8
|
import { defaultScriptMetadata, scriptBootstrapCode, } from "./bootstrap/script_bootstrap.js";
|
|
8
9
|
import { generateScriptMetadataInternal, parseMetadataFile, } from "./metadata.js";
|
|
9
|
-
import { inferContentTypeFromFilePath, } from "./script_common.js";
|
|
10
|
+
import { inferContentTypeFromFilePath, languagesWithRawReqsSupport, } from "./script_common.js";
|
|
10
11
|
import { elementsToMap, findCodebase, readDirRecursiveWithIgnore, yamlOptions, } from "./sync.js";
|
|
11
12
|
import { ignoreF } from "./sync.js";
|
|
12
13
|
import { FSFSElement } from "./sync.js";
|
|
@@ -642,36 +643,27 @@ async function bootstrap(opts, scriptPath, language) {
|
|
|
642
643
|
});
|
|
643
644
|
}
|
|
644
645
|
export async function findGlobalDeps() {
|
|
645
|
-
|
|
646
|
-
const reqs = {};
|
|
647
|
-
const composers = {};
|
|
648
|
-
const goMods = {};
|
|
646
|
+
var globalDeps = new Map();
|
|
649
647
|
const els = await FSFSElement(dntShim.Deno.cwd(), [], false);
|
|
650
648
|
for await (const entry of readDirRecursiveWithIgnore((p, isDir) => {
|
|
651
649
|
p = SEP + p;
|
|
652
650
|
return (!isDir &&
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
p.endsWith(SEP + "composer.json") ||
|
|
656
|
-
p.endsWith(SEP + "go.mod")));
|
|
651
|
+
// Skip if the filename is not one of lockfile names
|
|
652
|
+
!(languagesWithRawReqsSupport.some(lockfile => p.endsWith(SEP + lockfile.rrFilename))));
|
|
657
653
|
}, els)) {
|
|
658
654
|
if (entry.isDirectory || entry.ignored)
|
|
659
655
|
continue;
|
|
660
656
|
const content = await entry.getContentText();
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
else if (entry.path.endsWith("go.mod")) {
|
|
671
|
-
goMods[entry.path.substring(0, entry.path.length - "go.mod".length)] = content;
|
|
672
|
-
}
|
|
657
|
+
// Iterate over available languages to find which lockfile
|
|
658
|
+
languagesWithRawReqsSupport.map((lock) => {
|
|
659
|
+
if (entry.path.endsWith(lock.rrFilename)) {
|
|
660
|
+
const current = globalDeps.get(lock) ?? {};
|
|
661
|
+
current[entry.path.substring(0, entry.path.length - lock.rrFilename.length)] = content;
|
|
662
|
+
globalDeps.set(lock, current);
|
|
663
|
+
}
|
|
664
|
+
});
|
|
673
665
|
}
|
|
674
|
-
return
|
|
666
|
+
return globalDeps;
|
|
675
667
|
}
|
|
676
668
|
async function generateMetadata(opts, scriptPath) {
|
|
677
669
|
log.info("This command only works for workspace scripts, for flows inline scripts use `wmill flow generate - locks`");
|
package/esm/script_common.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
export const languagesWithRawReqsSupport = [
|
|
2
|
+
{ language: "bun", rrFilename: "package.json" },
|
|
3
|
+
{ language: "python3", rrFilename: "requirements.txt" },
|
|
4
|
+
{ language: "php", rrFilename: "composer.json" },
|
|
5
|
+
{ language: "go", rrFilename: "go.mod" },
|
|
6
|
+
];
|
|
2
7
|
export function inferContentTypeFromFilePath(contentPath, defaultTs) {
|
|
3
8
|
if (contentPath.endsWith(".py")) {
|
|
4
9
|
return "python3";
|
package/esm/sync.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as dntShim from "./_dnt.shims.js";
|
|
2
|
-
import {
|
|
2
|
+
import { requireLogin } from "./auth.js";
|
|
3
|
+
import { fetchVersion, resolveWorkspace } from "./context.js";
|
|
3
4
|
import { colors, Command, Confirm, Select, ensureDir, minimatch, path, log, yamlStringify, yamlParseContent, SEP, } from "./deps.js";
|
|
4
5
|
import * as wmill from "./gen/services.gen.js";
|
|
5
6
|
import { getTypeStrFromPath, parseFromPath, pushObj, showConflict, showDiff, } from "./types.js";
|
|
@@ -14,62 +15,8 @@ import { generateFlowLockInternal, generateScriptMetadataInternal, readLockfile,
|
|
|
14
15
|
import { pushResource } from "./resource.js";
|
|
15
16
|
// Merge CLI options with effective settings, preserving CLI flags as overrides
|
|
16
17
|
function mergeCliWithEffectiveOptions(cliOpts, effectiveOpts) {
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// Always preserve these operational CLI flags
|
|
20
|
-
if (cliOpts.dryRun !== undefined)
|
|
21
|
-
mergedOpts.dryRun = cliOpts.dryRun;
|
|
22
|
-
if (cliOpts.yes !== undefined)
|
|
23
|
-
mergedOpts.yes = cliOpts.yes;
|
|
24
|
-
if (cliOpts.stateful !== undefined)
|
|
25
|
-
mergedOpts.stateful = cliOpts.stateful;
|
|
26
|
-
if (cliOpts.skipPull !== undefined)
|
|
27
|
-
mergedOpts.skipPull = cliOpts.skipPull;
|
|
28
|
-
if (cliOpts.failConflicts !== undefined)
|
|
29
|
-
mergedOpts.failConflicts = cliOpts.failConflicts;
|
|
30
|
-
if (cliOpts.plainSecrets !== undefined)
|
|
31
|
-
mergedOpts.plainSecrets = cliOpts.plainSecrets;
|
|
32
|
-
if (cliOpts.json !== undefined)
|
|
33
|
-
mergedOpts.json = cliOpts.json;
|
|
34
|
-
if (cliOpts.message !== undefined)
|
|
35
|
-
mergedOpts.message = cliOpts.message;
|
|
36
|
-
if (cliOpts.parallel !== undefined)
|
|
37
|
-
mergedOpts.parallel = cliOpts.parallel;
|
|
38
|
-
if (cliOpts.jsonOutput !== undefined)
|
|
39
|
-
mergedOpts.jsonOutput = cliOpts.jsonOutput;
|
|
40
|
-
if (cliOpts.repository !== undefined)
|
|
41
|
-
mergedOpts.repository = cliOpts.repository;
|
|
42
|
-
// Always preserve CLI include flags (they should override config file settings)
|
|
43
|
-
if (cliOpts.includeUsers !== undefined)
|
|
44
|
-
mergedOpts.includeUsers = cliOpts.includeUsers;
|
|
45
|
-
if (cliOpts.includeGroups !== undefined)
|
|
46
|
-
mergedOpts.includeGroups = cliOpts.includeGroups;
|
|
47
|
-
if (cliOpts.includeSettings !== undefined)
|
|
48
|
-
mergedOpts.includeSettings = cliOpts.includeSettings;
|
|
49
|
-
if (cliOpts.includeKey !== undefined)
|
|
50
|
-
mergedOpts.includeKey = cliOpts.includeKey;
|
|
51
|
-
if (cliOpts.includeSchedules !== undefined)
|
|
52
|
-
mergedOpts.includeSchedules = cliOpts.includeSchedules;
|
|
53
|
-
if (cliOpts.includeTriggers !== undefined)
|
|
54
|
-
mergedOpts.includeTriggers = cliOpts.includeTriggers;
|
|
55
|
-
// Always preserve CLI skip flags (they should override config file settings)
|
|
56
|
-
if (cliOpts.skipScripts !== undefined)
|
|
57
|
-
mergedOpts.skipScripts = cliOpts.skipScripts;
|
|
58
|
-
if (cliOpts.skipFolders !== undefined)
|
|
59
|
-
mergedOpts.skipFolders = cliOpts.skipFolders;
|
|
60
|
-
if (cliOpts.skipVariables !== undefined)
|
|
61
|
-
mergedOpts.skipVariables = cliOpts.skipVariables;
|
|
62
|
-
if (cliOpts.skipResources !== undefined)
|
|
63
|
-
mergedOpts.skipResources = cliOpts.skipResources;
|
|
64
|
-
if (cliOpts.skipResourceTypes !== undefined)
|
|
65
|
-
mergedOpts.skipResourceTypes = cliOpts.skipResourceTypes;
|
|
66
|
-
if (cliOpts.skipSecrets !== undefined)
|
|
67
|
-
mergedOpts.skipSecrets = cliOpts.skipSecrets;
|
|
68
|
-
if (cliOpts.skipFlows !== undefined)
|
|
69
|
-
mergedOpts.skipFlows = cliOpts.skipFlows;
|
|
70
|
-
if (cliOpts.skipApps !== undefined)
|
|
71
|
-
mergedOpts.skipApps = cliOpts.skipApps;
|
|
72
|
-
return mergedOpts;
|
|
18
|
+
// overlay CLI options on top (undefined cliOpts won't override effectiveOpts)
|
|
19
|
+
return Object.assign({}, effectiveOpts, cliOpts);
|
|
73
20
|
}
|
|
74
21
|
// Resolve effective sync options with smart repository detection
|
|
75
22
|
async function resolveEffectiveSyncOptions(workspace, repositoryPath) {
|
|
@@ -116,11 +63,13 @@ async function resolveEffectiveSyncOptions(workspace, repositoryPath) {
|
|
|
116
63
|
else {
|
|
117
64
|
// Non-interactive mode - list options and use top-level
|
|
118
65
|
log.warn(`Multiple repository overrides found: ${applicableRepos.join(', ')}`);
|
|
119
|
-
log.warn(`Use --repository flag to specify which one to use
|
|
66
|
+
log.warn(`Running in non-interactive mode. Use --repository flag to specify which one to use.`);
|
|
67
|
+
log.info(`Falling back to top-level settings (no repository-specific overrides applied)`);
|
|
120
68
|
}
|
|
121
69
|
}
|
|
122
70
|
}
|
|
123
71
|
// No repository overrides found or selected - use top-level settings
|
|
72
|
+
log.info(`No repository overrides found, using top-level settings`);
|
|
124
73
|
return getEffectiveSettings(localConfig, workspace.remote, workspace.workspaceId, "");
|
|
125
74
|
}
|
|
126
75
|
export function findCodebase(path, codebases) {
|
|
@@ -1219,7 +1168,7 @@ export async function pull(opts) {
|
|
|
1219
1168
|
}
|
|
1220
1169
|
for (const change of tracker.flows) {
|
|
1221
1170
|
log.info(`Updating lock for flow ${change}`);
|
|
1222
|
-
await generateFlowLockInternal(change, false, workspace, true);
|
|
1171
|
+
await generateFlowLockInternal(change, false, workspace, opts, true);
|
|
1223
1172
|
}
|
|
1224
1173
|
if (tracker.apps.length > 0) {
|
|
1225
1174
|
log.info(`Apps ${tracker.apps.join(", ")} scripts were changed but ignoring for now`);
|
|
@@ -1338,7 +1287,7 @@ export async function push(opts) {
|
|
|
1338
1287
|
log.info("");
|
|
1339
1288
|
}
|
|
1340
1289
|
for (const change of tracker.flows) {
|
|
1341
|
-
const stale = await generateFlowLockInternal(change, true, workspace, false, true);
|
|
1290
|
+
const stale = await generateFlowLockInternal(change, true, workspace, opts, false, true);
|
|
1342
1291
|
if (stale) {
|
|
1343
1292
|
staleFlows.push(stale);
|
|
1344
1293
|
}
|
package/esm/trigger.js
CHANGED
|
@@ -2,9 +2,8 @@ import * as dntShim from "./_dnt.shims.js";
|
|
|
2
2
|
import * as wmill from "./gen/services.gen.js";
|
|
3
3
|
import { colors, Command, log, SEP, Table } from "./deps.js";
|
|
4
4
|
import { isSuperset, parseFromFile, removeType, } from "./types.js";
|
|
5
|
-
import { requireLogin } from "./
|
|
6
|
-
import { validatePath } from "./context.js";
|
|
7
|
-
import { resolveWorkspace } from "./context.js";
|
|
5
|
+
import { requireLogin } from "./auth.js";
|
|
6
|
+
import { validatePath, resolveWorkspace } from "./context.js";
|
|
8
7
|
async function getTrigger(triggerType, workspace, path) {
|
|
9
8
|
const triggerFunctions = {
|
|
10
9
|
http: wmill.getHttpTrigger,
|
package/esm/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-explicit-any
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
|
-
import { requireLogin } from "./
|
|
3
|
+
import { requireLogin } from "./auth.js";
|
|
4
4
|
import { isSuperset, removeType, removePathPrefix, } from "./types.js";
|
|
5
5
|
import { compareInstanceObjects } from "./instance.js";
|
|
6
6
|
import { colors, Command, log, Table, yamlStringify, yamlParseFile, } from "./deps.js";
|
package/esm/utils.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3
3
|
import * as dntShim from "./_dnt.shims.js";
|
|
4
4
|
// @ts-nocheck This file is copied from a JS project, so it's not type-safe.
|
|
5
|
-
import { log, encodeHex, SEP } from "./deps.js";
|
|
5
|
+
import { colors, log, encodeHex, SEP } from "./deps.js";
|
|
6
6
|
import crypto from "node:crypto";
|
|
7
7
|
export function deepEqual(a, b) {
|
|
8
8
|
if (a === b)
|
|
@@ -142,7 +142,7 @@ export async function selectRepository(repositories, operation) {
|
|
|
142
142
|
}
|
|
143
143
|
if (repositories.length === 1) {
|
|
144
144
|
const repoPath = repositories[0].git_repo_resource_path.replace(/^\$res:/, "");
|
|
145
|
-
log.info(`
|
|
145
|
+
log.info(colors.cyan(`Auto-selected repository: ${colors.bold(repoPath)}`));
|
|
146
146
|
return repositories[0];
|
|
147
147
|
}
|
|
148
148
|
// Check if we're in a non-interactive environment
|
package/esm/variable.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-explicit-any
|
|
2
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
3
|
-
import { requireLogin
|
|
3
|
+
import { requireLogin } from "./auth.js";
|
|
4
|
+
import { resolveWorkspace, validatePath } from "./context.js";
|
|
4
5
|
import { isSuperset, parseFromFile, removeType, } from "./types.js";
|
|
5
6
|
import { colors, Command, Confirm, log, SEP, Table } from "./deps.js";
|
|
6
7
|
import * as wmill from "./gen/services.gen.js";
|
package/esm/workspace.js
CHANGED
|
@@ -3,8 +3,8 @@ import * as dntShim from "./_dnt.shims.js";
|
|
|
3
3
|
import { getRootStore } from "./store.js";
|
|
4
4
|
import { loginInteractive, tryGetLoginInfo } from "./login.js";
|
|
5
5
|
import { colors, Command, Confirm, Input, log, setClient, Table } from "./deps.js";
|
|
6
|
+
import { requireLogin } from "./auth.js";
|
|
6
7
|
import * as wmill from "./gen/services.gen.js";
|
|
7
|
-
import { requireLogin } from "./context.js";
|
|
8
8
|
export async function allWorkspaces(configDirOverride) {
|
|
9
9
|
try {
|
|
10
10
|
const file = (await getRootStore(configDirOverride)) + "remotes.ndjson";
|
package/package.json
CHANGED
package/types/apps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,OAAO,EAAkC,MAAM,WAAW,CAAC;AAE5E,OAAO,EAAe,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAKzD,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,wBAAsB,OAAO,CAC3B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CA2Ef;AA0CD,QAAA,MAAM,OAAO;;;;;;oBAKS,CAAC;AAEvB,eAAe,OAAO,CAAC"}
|
package/types/auth.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GlobalUserInfo } from "./gen/types.gen.js";
|
|
2
|
+
import { GlobalOptions } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Main authentication function - moved from context.ts to break circular dependencies
|
|
5
|
+
* This function maintains the original API signature from context.ts
|
|
6
|
+
*/
|
|
7
|
+
export declare function requireLogin(opts: GlobalOptions): Promise<GlobalUserInfo>;
|
|
8
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAO3C;;;GAGG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,cAAc,CAAC,CAyCzB"}
|
package/types/conf.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conf.d.ts","sourceRoot":"","sources":["../src/conf.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,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,QAAQ,CAAC,IAAI,CAAC,WAAW,EACnE,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,eAAe,GAAG,eAAe,GACvF,mBAAmB,GAAG,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,GAC5E,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,GACxD,cAAc,GAAG,eAAe,GAAG,iBAAiB,GAAG,YAAY,CACpE,CAAC,CAmBQ,CAAC;AAEX,wBAAsB,yBAAyB,CAAC,CAAC,EAC/C,IAAI,EAAE,CAAC,GACN,OAAO,CAAC,CAAC,GAAG,WAAW,CAAC,CAG1B;AAGD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,WAAW,CA4Cb"}
|
package/types/context.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GlobalUserInfo } from "./gen/types.gen.js";
|
|
2
1
|
import { GlobalOptions } from "./types.js";
|
|
3
2
|
import { Workspace } from "./workspace.js";
|
|
4
3
|
export type Context = {
|
|
@@ -8,7 +7,6 @@ export type Context = {
|
|
|
8
7
|
token: string;
|
|
9
8
|
};
|
|
10
9
|
export declare function resolveWorkspace(opts: GlobalOptions): Promise<Workspace>;
|
|
11
|
-
export declare function requireLogin(opts: GlobalOptions): Promise<GlobalUserInfo>;
|
|
12
10
|
export declare function fetchVersion(baseUrl: string): Promise<string>;
|
|
13
11
|
export declare function tryResolveVersion(opts: GlobalOptions): Promise<number | undefined>;
|
|
14
12
|
export declare function validatePath(path: string): boolean;
|
package/types/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAKL,SAAS,EACV,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAiCF,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,SAAS,CAAC,CAiEpB;AAGD,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBnE;AACD,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgB7B;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWlD"}
|
package/types/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EAUR,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EAUR,MAAM,WAAW,CAAC;AAoMnB,QAAA,MAAM,OAAO;;;;;;;;mBAOQ,CAAC;AAEtB,eAAe,OAAO,CAAC"}
|
package/types/flow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAc,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAU,OAAO,EAAwB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAc,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAU,OAAO,EAAwB,MAAM,WAAW,CAAC;AAWlE,OAAO,EAAQ,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAID,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,UAAU,EAAE,EACrB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,QA4ClC;AAED,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAwDf;AAqKD,wBAAgB,SAAS,CACvB,IAAI,EAAE,aAAa,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAC9D,QAAQ,EAAE,MAAM,QAuBjB;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;oBA4Cc,CAAC;AAE5B,eAAe,OAAO,CAAC"}
|
package/types/folder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../src/folder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,OAAO,EAAmB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../src/folder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,OAAO,EAAmB,MAAM,WAAW,CAAC;AAM7D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IACvD,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAwBD,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,EACvC,WAAW,EAAE,UAAU,GACtB,OAAO,CAAC,IAAI,CAAC,CAqDf;AA0BD,QAAA,MAAM,OAAO;;;;;;oBAQS,CAAC;AAEvB,eAAe,OAAO,CAAC"}
|