windmill-cli 1.704.0 → 1.704.2
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/main.js +309 -9
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16752,7 +16752,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16752
16752
|
PASSWORD: undefined,
|
|
16753
16753
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16754
16754
|
USERNAME: undefined,
|
|
16755
|
-
VERSION: "1.704.
|
|
16755
|
+
VERSION: "1.704.1",
|
|
16756
16756
|
WITH_CREDENTIALS: true,
|
|
16757
16757
|
interceptors: {
|
|
16758
16758
|
request: new Interceptors,
|
|
@@ -17518,6 +17518,7 @@ __export(exports_services_gen, {
|
|
|
17518
17518
|
getCaptureConfigs: () => getCaptureConfigs,
|
|
17519
17519
|
getCapture: () => getCapture,
|
|
17520
17520
|
getAzureTrigger: () => getAzureTrigger,
|
|
17521
|
+
getAuditLogsS3Status: () => getAuditLogsS3Status,
|
|
17521
17522
|
getAuditLog: () => getAuditLog,
|
|
17522
17523
|
getArgsFromHistoryOrSavedInput: () => getArgsFromHistoryOrSavedInput,
|
|
17523
17524
|
getApprovalInfo: () => getApprovalInfo,
|
|
@@ -18255,6 +18256,11 @@ var backendVersion = () => {
|
|
|
18255
18256
|
method: "GET",
|
|
18256
18257
|
url: "/settings/log_cleanup_status"
|
|
18257
18258
|
});
|
|
18259
|
+
}, getAuditLogsS3Status = () => {
|
|
18260
|
+
return request(OpenAPI, {
|
|
18261
|
+
method: "GET",
|
|
18262
|
+
url: "/settings/audit_logs_s3_status"
|
|
18263
|
+
});
|
|
18258
18264
|
}, sendStats = () => {
|
|
18259
18265
|
return request(OpenAPI, {
|
|
18260
18266
|
method: "POST",
|
|
@@ -25226,11 +25232,20 @@ var WM_FORK_PREFIX = "wm-fork";
|
|
|
25226
25232
|
var exports_git = {};
|
|
25227
25233
|
__export(exports_git, {
|
|
25228
25234
|
isGitRepository: () => isGitRepository,
|
|
25235
|
+
isForkWorkspace: () => isForkWorkspace,
|
|
25236
|
+
gitSyncIncludePattern: () => gitSyncIncludePattern,
|
|
25237
|
+
gitSyncDeployPush: () => gitSyncDeployPush,
|
|
25238
|
+
gitSyncCommitMessage: () => gitSyncCommitMessage,
|
|
25229
25239
|
getWorkspaceIdForWorkspaceForkFromBranchName: () => getWorkspaceIdForWorkspaceForkFromBranchName,
|
|
25230
25240
|
getOriginalBranchForWorkspaceForks: () => getOriginalBranchForWorkspaceForks,
|
|
25231
|
-
getCurrentGitBranch: () => getCurrentGitBranch
|
|
25232
|
-
|
|
25233
|
-
|
|
25241
|
+
getCurrentGitBranch: () => getCurrentGitBranch,
|
|
25242
|
+
forkBranchName: () => forkBranchName,
|
|
25243
|
+
deriveGitSyncDeployIncludes: () => deriveGitSyncDeployIncludes,
|
|
25244
|
+
computeGitSyncDeployBranch: () => computeGitSyncDeployBranch,
|
|
25245
|
+
composeGitSyncCommitHeader: () => composeGitSyncCommitHeader,
|
|
25246
|
+
checkoutGitSyncDeployBranch: () => checkoutGitSyncDeployBranch
|
|
25247
|
+
});
|
|
25248
|
+
import { execSync, spawnSync } from "node:child_process";
|
|
25234
25249
|
function getCurrentGitBranch() {
|
|
25235
25250
|
try {
|
|
25236
25251
|
const result = execSync("git rev-parse --abbrev-ref HEAD", {
|
|
@@ -25277,8 +25292,205 @@ function isGitRepository() {
|
|
|
25277
25292
|
return false;
|
|
25278
25293
|
}
|
|
25279
25294
|
}
|
|
25295
|
+
function isForkWorkspace(workspaceId) {
|
|
25296
|
+
return workspaceId.startsWith(FORK_WORKSPACE_PREFIX);
|
|
25297
|
+
}
|
|
25298
|
+
function forkBranchName(workspaceId, originalBranch) {
|
|
25299
|
+
return workspaceId.replace(FORK_WORKSPACE_PREFIX, `${WM_FORK_PREFIX}/${originalBranch}/`);
|
|
25300
|
+
}
|
|
25301
|
+
function computeGitSyncDeployBranch(params) {
|
|
25302
|
+
const {
|
|
25303
|
+
workspaceId,
|
|
25304
|
+
items,
|
|
25305
|
+
useIndividualBranch,
|
|
25306
|
+
groupByFolder,
|
|
25307
|
+
clonedBranchName
|
|
25308
|
+
} = params;
|
|
25309
|
+
if (workspaceId.startsWith(FORK_WORKSPACE_PREFIX)) {
|
|
25310
|
+
return forkBranchName(workspaceId, clonedBranchName);
|
|
25311
|
+
}
|
|
25312
|
+
if (items.length === 0)
|
|
25313
|
+
return null;
|
|
25314
|
+
const first = items[0];
|
|
25315
|
+
if (!useIndividualBranch || first.path_type === "user" || first.path_type === "group") {
|
|
25316
|
+
return null;
|
|
25317
|
+
}
|
|
25318
|
+
const ref = first.path ?? first.parent_path;
|
|
25319
|
+
if (!ref)
|
|
25320
|
+
return null;
|
|
25321
|
+
return groupByFolder ? `wm_deploy/${workspaceId}/${ref.split("/").slice(0, 2).join("__")}` : `wm_deploy/${workspaceId}/${first.path_type}/${ref.replaceAll("/", "__")}`;
|
|
25322
|
+
}
|
|
25323
|
+
function composeGitSyncCommitHeader(items) {
|
|
25324
|
+
const typeCounts = new Map;
|
|
25325
|
+
for (const item of items) {
|
|
25326
|
+
typeCounts.set(item.path_type, (typeCounts.get(item.path_type) ?? 0) + 1);
|
|
25327
|
+
}
|
|
25328
|
+
const sorted = Array.from(typeCounts.entries()).sort((a, b) => b[1] - a[1]);
|
|
25329
|
+
const parts = [];
|
|
25330
|
+
let othersCount = 0;
|
|
25331
|
+
for (let i = 0;i < sorted.length; i++) {
|
|
25332
|
+
const [pathType, count] = sorted[i];
|
|
25333
|
+
if (i < 3) {
|
|
25334
|
+
const label = count > 1 ? `${pathType}s` : pathType;
|
|
25335
|
+
if (i === 2 && sorted.length === 3) {
|
|
25336
|
+
parts.push(`and ${count} ${label}`);
|
|
25337
|
+
} else {
|
|
25338
|
+
parts.push(`${count} ${label}`);
|
|
25339
|
+
}
|
|
25340
|
+
} else {
|
|
25341
|
+
othersCount += count;
|
|
25342
|
+
}
|
|
25343
|
+
}
|
|
25344
|
+
let header = `[WM]: Deployed ${parts.join(", ")}`;
|
|
25345
|
+
if (othersCount > 0) {
|
|
25346
|
+
header += ` and ${othersCount} other object${othersCount > 1 ? "s" : ""}`;
|
|
25347
|
+
}
|
|
25348
|
+
return header;
|
|
25349
|
+
}
|
|
25350
|
+
function gitSyncCommitMessage(items) {
|
|
25351
|
+
const descs = items.map((i) => i.commit_msg);
|
|
25352
|
+
const [h, d] = descs.length === 1 ? [descs[0], ""] : [composeGitSyncCommitHeader(items), descs.join(`
|
|
25353
|
+
`)];
|
|
25354
|
+
return {
|
|
25355
|
+
header: h === undefined || h === "" ? "no commit msg" : h,
|
|
25356
|
+
description: d ?? ""
|
|
25357
|
+
};
|
|
25358
|
+
}
|
|
25359
|
+
function gitSyncIncludePattern(pathType, path2) {
|
|
25360
|
+
switch (pathType) {
|
|
25361
|
+
case "flow":
|
|
25362
|
+
return `${path2}.flow/*,${path2}__flow/*`;
|
|
25363
|
+
case "app":
|
|
25364
|
+
return `${path2}.app/*,${path2}__app/*`;
|
|
25365
|
+
case "raw_app":
|
|
25366
|
+
return `${path2}.raw_app/**,${path2}__raw_app/**`;
|
|
25367
|
+
case "folder":
|
|
25368
|
+
return `${path2}/folder.meta.*`;
|
|
25369
|
+
case "resourcetype":
|
|
25370
|
+
return `${path2}.resource-type.*`;
|
|
25371
|
+
case "resource":
|
|
25372
|
+
return `${path2}.resource.*`;
|
|
25373
|
+
case "variable":
|
|
25374
|
+
return `${path2}.variable.*`;
|
|
25375
|
+
case "schedule":
|
|
25376
|
+
return `${path2}.schedule.*`;
|
|
25377
|
+
case "user":
|
|
25378
|
+
return `${path2}.user.*`;
|
|
25379
|
+
case "group":
|
|
25380
|
+
return `${path2}.group.*`;
|
|
25381
|
+
case "httptrigger":
|
|
25382
|
+
return `${path2}.http_trigger.*`;
|
|
25383
|
+
case "websockettrigger":
|
|
25384
|
+
return `${path2}.websocket_trigger.*`;
|
|
25385
|
+
case "kafkatrigger":
|
|
25386
|
+
return `${path2}.kafka_trigger.*`;
|
|
25387
|
+
case "natstrigger":
|
|
25388
|
+
return `${path2}.nats_trigger.*`;
|
|
25389
|
+
case "postgrestrigger":
|
|
25390
|
+
return `${path2}.postgres_trigger.*`;
|
|
25391
|
+
case "mqtttrigger":
|
|
25392
|
+
return `${path2}.mqtt_trigger.*`;
|
|
25393
|
+
case "sqstrigger":
|
|
25394
|
+
return `${path2}.sqs_trigger.*`;
|
|
25395
|
+
case "gcptrigger":
|
|
25396
|
+
return `${path2}.gcp_trigger.*`;
|
|
25397
|
+
case "azuretrigger":
|
|
25398
|
+
return `${path2}.azure_trigger.*`;
|
|
25399
|
+
case "emailtrigger":
|
|
25400
|
+
return `${path2}.email_trigger.*`;
|
|
25401
|
+
default:
|
|
25402
|
+
return `${path2}.*`;
|
|
25403
|
+
}
|
|
25404
|
+
}
|
|
25405
|
+
function deriveGitSyncDeployIncludes(items, useIndividualBranch) {
|
|
25406
|
+
const extraIncludes = [];
|
|
25407
|
+
for (const { path_type, path: path2, parent_path } of items) {
|
|
25408
|
+
if (path2) {
|
|
25409
|
+
extraIncludes.push(...gitSyncIncludePattern(path_type, path2).split(","));
|
|
25410
|
+
}
|
|
25411
|
+
if (parent_path) {
|
|
25412
|
+
extraIncludes.push(...gitSyncIncludePattern(path_type, parent_path).split(","));
|
|
25413
|
+
}
|
|
25414
|
+
}
|
|
25415
|
+
const has = (pred) => !useIndividualBranch && items.some((i) => pred(i.path_type));
|
|
25416
|
+
return {
|
|
25417
|
+
extraIncludes,
|
|
25418
|
+
includeSchedules: has((t) => t === "schedule"),
|
|
25419
|
+
includeGroups: has((t) => t === "group"),
|
|
25420
|
+
includeUsers: has((t) => t === "user"),
|
|
25421
|
+
includeTriggers: has((t) => t.includes("trigger")),
|
|
25422
|
+
includeSettings: has((t) => t === "settings"),
|
|
25423
|
+
includeKey: has((t) => t === "key")
|
|
25424
|
+
};
|
|
25425
|
+
}
|
|
25426
|
+
function git(args, opts) {
|
|
25427
|
+
const r = spawnSync("git", args, { encoding: "utf8", stdio: "pipe" });
|
|
25428
|
+
const status = r.status ?? 1;
|
|
25429
|
+
if (r.error) {
|
|
25430
|
+
if (opts?.allowFail)
|
|
25431
|
+
return { status, stdout: "", stderr: String(r.error) };
|
|
25432
|
+
throw r.error;
|
|
25433
|
+
}
|
|
25434
|
+
if (status !== 0 && !opts?.allowFail) {
|
|
25435
|
+
throw new Error(`git ${args.join(" ")} failed (exit ${status}): ${r.stderr ?? ""}`);
|
|
25436
|
+
}
|
|
25437
|
+
return { status, stdout: r.stdout ?? "", stderr: r.stderr ?? "" };
|
|
25438
|
+
}
|
|
25439
|
+
function checkoutGitSyncDeployBranch(branch) {
|
|
25440
|
+
const existing = git(["checkout", branch], { allowFail: true });
|
|
25441
|
+
if (existing.status === 0) {
|
|
25442
|
+
info(`Switched to existing branch ${branch}`);
|
|
25443
|
+
return;
|
|
25444
|
+
}
|
|
25445
|
+
git(["checkout", "-b", branch]);
|
|
25446
|
+
git(["config", "--add", "--bool", "push.autoSetupRemote", "true"]);
|
|
25447
|
+
info(`Created and switched to branch ${branch}`);
|
|
25448
|
+
}
|
|
25449
|
+
function gitSyncDeployPush(params) {
|
|
25450
|
+
const { items, authorName, authorEmail, onlyCreateBranch } = params;
|
|
25451
|
+
const committerName = params.committerName ?? authorName;
|
|
25452
|
+
const committerEmail = params.committerEmail ?? authorEmail;
|
|
25453
|
+
git(["config", "user.email", committerEmail]);
|
|
25454
|
+
git(["config", "user.name", committerName]);
|
|
25455
|
+
if (onlyCreateBranch) {
|
|
25456
|
+
git(["push", "--porcelain"]);
|
|
25457
|
+
return { pushed: true };
|
|
25458
|
+
}
|
|
25459
|
+
for (const { path: path2, parent_path } of items) {
|
|
25460
|
+
if (path2) {
|
|
25461
|
+
git(["add", "wmill-lock.yaml", `${path2}**`], { allowFail: true });
|
|
25462
|
+
}
|
|
25463
|
+
if (parent_path) {
|
|
25464
|
+
git(["add", "wmill-lock.yaml", `${parent_path}**`], { allowFail: true });
|
|
25465
|
+
}
|
|
25466
|
+
}
|
|
25467
|
+
const staged = git(["diff", "--cached", "--quiet"], { allowFail: true });
|
|
25468
|
+
if (staged.status === 0) {
|
|
25469
|
+
info("No changes detected, nothing to commit.");
|
|
25470
|
+
return { pushed: false };
|
|
25471
|
+
}
|
|
25472
|
+
const { header, description } = gitSyncCommitMessage(items);
|
|
25473
|
+
git([
|
|
25474
|
+
"commit",
|
|
25475
|
+
"--author",
|
|
25476
|
+
`${authorName} <${authorEmail}>`,
|
|
25477
|
+
"-m",
|
|
25478
|
+
header,
|
|
25479
|
+
"-m",
|
|
25480
|
+
description
|
|
25481
|
+
]);
|
|
25482
|
+
const push = git(["push", "--porcelain"], { allowFail: true });
|
|
25483
|
+
if (push.status !== 0) {
|
|
25484
|
+
info(`Push failed, rebasing and retrying: ${push.stderr}`);
|
|
25485
|
+
git(["pull", "--rebase"]);
|
|
25486
|
+
git(["push", "--porcelain"]);
|
|
25487
|
+
}
|
|
25488
|
+
return { pushed: true };
|
|
25489
|
+
}
|
|
25490
|
+
var FORK_WORKSPACE_PREFIX;
|
|
25280
25491
|
var init_git = __esm(() => {
|
|
25281
25492
|
init_log();
|
|
25493
|
+
FORK_WORKSPACE_PREFIX = `${WM_FORK_PREFIX}-`;
|
|
25282
25494
|
});
|
|
25283
25495
|
|
|
25284
25496
|
// src/commands/workspace/fork.ts
|
|
@@ -44417,7 +44629,7 @@ var require_zipEntries = __commonJS((exports, module) => {
|
|
|
44417
44629
|
if (this.centralDirRecords !== this.files.length) {
|
|
44418
44630
|
if (this.centralDirRecords !== 0 && this.files.length === 0) {
|
|
44419
44631
|
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
44420
|
-
}
|
|
44632
|
+
} else {}
|
|
44421
44633
|
}
|
|
44422
44634
|
},
|
|
44423
44635
|
readEndOfCentral: function() {
|
|
@@ -55347,7 +55559,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
55347
55559
|
var error2 = generateError(state, message);
|
|
55348
55560
|
if (state.onWarning) {
|
|
55349
55561
|
state.onWarning.call(null, error2);
|
|
55350
|
-
}
|
|
55562
|
+
} else {}
|
|
55351
55563
|
}
|
|
55352
55564
|
var directiveHandlers = {
|
|
55353
55565
|
YAML: function handleYamlDirective(state, name, args) {
|
|
@@ -55885,7 +56097,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
55885
56097
|
} else if (detectedIndent) {
|
|
55886
56098
|
sc.value += common3.repeat(`
|
|
55887
56099
|
`, emptyLines + 1);
|
|
55888
|
-
}
|
|
56100
|
+
} else {}
|
|
55889
56101
|
detectedIndent = true;
|
|
55890
56102
|
emptyLines = 0;
|
|
55891
56103
|
captureStart = state.position;
|
|
@@ -65485,6 +65697,7 @@ __export(exports_sync, {
|
|
|
65485
65697
|
pull: () => pull,
|
|
65486
65698
|
isWhitelisted: () => isWhitelisted,
|
|
65487
65699
|
ignoreF: () => ignoreF,
|
|
65700
|
+
gitDeploy: () => gitDeploy,
|
|
65488
65701
|
generateDatatablesDocumentation: () => generateDatatablesDocumentation,
|
|
65489
65702
|
generateAgentsDocumentation: () => generateAgentsDocumentation,
|
|
65490
65703
|
findCodebase: () => findCodebase,
|
|
@@ -67030,6 +67243,52 @@ async function pull(opts) {
|
|
|
67030
67243
|
}
|
|
67031
67244
|
const workspace = await resolveWorkspace(opts, wsNameForConfig);
|
|
67032
67245
|
await requireLogin(opts);
|
|
67246
|
+
if (opts.gitDeployItems !== undefined) {
|
|
67247
|
+
let deployItems;
|
|
67248
|
+
try {
|
|
67249
|
+
deployItems = JSON.parse(opts.gitDeployItems);
|
|
67250
|
+
} catch (e) {
|
|
67251
|
+
error(`Invalid --git-deploy-items JSON: ${e}`);
|
|
67252
|
+
process.exit(1);
|
|
67253
|
+
}
|
|
67254
|
+
const clonedBranchName = getCurrentGitBranch() ?? "main";
|
|
67255
|
+
const targetIsFork = isForkWorkspace(workspace.workspaceId);
|
|
67256
|
+
const useIndividualBranch = targetIsFork ? false : !!opts.useIndividualBranch;
|
|
67257
|
+
const groupByFolder = targetIsFork ? false : !!opts.groupByFolder;
|
|
67258
|
+
if (opts.parentWorkspaceId && isForkWorkspace(opts.parentWorkspaceId)) {
|
|
67259
|
+
const parentBranch = computeGitSyncDeployBranch({
|
|
67260
|
+
workspaceId: opts.parentWorkspaceId,
|
|
67261
|
+
items: deployItems,
|
|
67262
|
+
useIndividualBranch,
|
|
67263
|
+
groupByFolder,
|
|
67264
|
+
clonedBranchName
|
|
67265
|
+
});
|
|
67266
|
+
if (parentBranch && parentBranch !== clonedBranchName) {
|
|
67267
|
+
checkoutGitSyncDeployBranch(parentBranch);
|
|
67268
|
+
}
|
|
67269
|
+
}
|
|
67270
|
+
const deployBranch = computeGitSyncDeployBranch({
|
|
67271
|
+
workspaceId: workspace.workspaceId,
|
|
67272
|
+
items: deployItems,
|
|
67273
|
+
useIndividualBranch,
|
|
67274
|
+
groupByFolder,
|
|
67275
|
+
clonedBranchName
|
|
67276
|
+
});
|
|
67277
|
+
if (deployBranch && deployBranch !== clonedBranchName) {
|
|
67278
|
+
checkoutGitSyncDeployBranch(deployBranch);
|
|
67279
|
+
}
|
|
67280
|
+
if (opts.onlyCreateBranch) {
|
|
67281
|
+
gitSyncDeployPush({
|
|
67282
|
+
items: deployItems,
|
|
67283
|
+
authorName: process.env["WM_USERNAME"] || "windmill",
|
|
67284
|
+
authorEmail: process.env["WM_EMAIL"] || "windmill@windmill.dev",
|
|
67285
|
+
committerName: opts.gitCommitterName,
|
|
67286
|
+
committerEmail: opts.gitCommitterEmail,
|
|
67287
|
+
onlyCreateBranch: true
|
|
67288
|
+
});
|
|
67289
|
+
return;
|
|
67290
|
+
}
|
|
67291
|
+
}
|
|
67033
67292
|
if (!wsNameForConfig) {
|
|
67034
67293
|
wsNameForConfig = inferWsNameFromProfile(opts, workspace);
|
|
67035
67294
|
}
|
|
@@ -67260,6 +67519,47 @@ Done! All ${changes.length} changes applied locally and wmill-lock.yaml updated.
|
|
|
67260
67519
|
} catch (e) {
|
|
67261
67520
|
warn(`Failed to pull shared UI folder: ${e}`);
|
|
67262
67521
|
}
|
|
67522
|
+
if (opts.gitDeployItems !== undefined && !opts.onlyCreateBranch) {
|
|
67523
|
+
const deployItems = JSON.parse(opts.gitDeployItems);
|
|
67524
|
+
gitSyncDeployPush({
|
|
67525
|
+
items: deployItems,
|
|
67526
|
+
authorName: process.env["WM_USERNAME"] || "windmill",
|
|
67527
|
+
authorEmail: process.env["WM_EMAIL"] || "windmill@windmill.dev",
|
|
67528
|
+
committerName: opts.gitCommitterName,
|
|
67529
|
+
committerEmail: opts.gitCommitterEmail
|
|
67530
|
+
});
|
|
67531
|
+
}
|
|
67532
|
+
}
|
|
67533
|
+
async function gitDeploy(opts) {
|
|
67534
|
+
let items = [];
|
|
67535
|
+
if (opts.gitDeployItems !== undefined) {
|
|
67536
|
+
try {
|
|
67537
|
+
items = JSON.parse(opts.gitDeployItems);
|
|
67538
|
+
} catch (e) {
|
|
67539
|
+
error(`Invalid --git-deploy-items JSON: ${e}`);
|
|
67540
|
+
process.exit(1);
|
|
67541
|
+
}
|
|
67542
|
+
}
|
|
67543
|
+
const isFork = isForkWorkspace(opts.workspace ?? "");
|
|
67544
|
+
const useIndividualBranch = isFork ? false : !!opts.useIndividualBranch;
|
|
67545
|
+
const includes = deriveGitSyncDeployIncludes(items, useIndividualBranch);
|
|
67546
|
+
const promotion = useIndividualBranch && !opts.promotion ? getCurrentGitBranch() ?? undefined : opts.promotion;
|
|
67547
|
+
await pull({
|
|
67548
|
+
...opts,
|
|
67549
|
+
yes: true,
|
|
67550
|
+
skipBranchValidation: true,
|
|
67551
|
+
extraIncludes: [
|
|
67552
|
+
...opts.extraIncludes ?? [],
|
|
67553
|
+
...includes.extraIncludes
|
|
67554
|
+
],
|
|
67555
|
+
includeSchedules: opts.includeSchedules || includes.includeSchedules,
|
|
67556
|
+
includeGroups: opts.includeGroups || includes.includeGroups,
|
|
67557
|
+
includeUsers: opts.includeUsers || includes.includeUsers,
|
|
67558
|
+
includeTriggers: opts.includeTriggers || includes.includeTriggers,
|
|
67559
|
+
includeSettings: opts.includeSettings || includes.includeSettings,
|
|
67560
|
+
includeKey: opts.includeKey || includes.includeKey,
|
|
67561
|
+
promotion
|
|
67562
|
+
});
|
|
67263
67563
|
}
|
|
67264
67564
|
function prettyChanges(changes, specificItems, branchOverride, folderDefaultAnnotations) {
|
|
67265
67565
|
for (const change of changes) {
|
|
@@ -68237,7 +68537,7 @@ var init_sync = __esm(async () => {
|
|
|
68237
68537
|
aliasDuplicateObjects: false,
|
|
68238
68538
|
singleQuote: true
|
|
68239
68539
|
};
|
|
68240
|
-
command8 = new Command().description("sync local with a remote workspaces or the opposite (push or pull)").action(() => info("2 actions available, pull and push. Use -h to display help.")).command("pull").description("Pull any remote changes and apply them locally.").option("--yes", "Pull without needing confirmation").option("--dry-run", "Show changes that would be pulled without actually pushing").option("--plain-secrets", "Pull secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--promotion <branch:string>", "Use promotionOverrides from the specified branch instead of regular overrides").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").action(pull).command("push").description("Push any local changes and apply them remotely.").option("--yes", "Push without needing confirmation").option("--dry-run", "Show changes that would be pushed without actually pushing").option("--plain-secrets", "Push secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--message <message:string>", "Include a message that will be added to all scripts/flows/apps updated during this push").option("--parallel <number>", "Number of changes to process in parallel").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").option("--lint", "Run lint validation before pushing").option("--locks-required", "Fail if scripts or flow inline scripts that need locks have no locks").option("--auto-metadata", "Automatically regenerate stale metadata (locks and schemas) before pushing").option("--accept-overriding-permissioned-as-with-self", "Accept that items with a different permissioned_as will be updated with your own user").action(push4);
|
|
68540
|
+
command8 = new Command().description("sync local with a remote workspaces or the opposite (push or pull)").action(() => info("2 actions available, pull and push. Use -h to display help.")).command("pull").description("Pull any remote changes and apply them locally.").option("--yes", "Pull without needing confirmation").option("--dry-run", "Show changes that would be pulled without actually pushing").option("--plain-secrets", "Pull secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--promotion <branch:string>", "Use promotionOverrides from the specified branch instead of regular overrides").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").action(pull).command("push").description("Push any local changes and apply them remotely.").option("--yes", "Push without needing confirmation").option("--dry-run", "Show changes that would be pushed without actually pushing").option("--plain-secrets", "Push secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--message <message:string>", "Include a message that will be added to all scripts/flows/apps updated during this push").option("--parallel <number>", "Number of changes to process in parallel").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").option("--lint", "Run lint validation before pushing").option("--locks-required", "Fail if scripts or flow inline scripts that need locks have no locks").option("--auto-metadata", "Automatically regenerate stale metadata (locks and schemas) before pushing").option("--accept-overriding-permissioned-as-with-self", "Accept that items with a different permissioned_as will be updated with your own user").action(push4).command("git-deploy").hidden().description("Internal git-sync deployment-callback step (used by the git-sync hub script). Runs inside an existing clone: switches to the wm_deploy/fork branch when applicable, pulls workspace content, then commits and pushes.").option("--repository <repo:string>", "Repository resource path (e.g. u/user/repo)").option("--git-deploy-items <json:string>", "JSON array of {path_type,path,parent_path,commit_msg} being deployed").option("--use-individual-branch", "Push each deployed object to its own wm_deploy/<workspace>/<...> branch").option("--group-by-folder", "With --use-individual-branch, group deployed objects per folder branch").option("--only-create-branch", "Only create/push the deploy branch, skip pulling and committing files").option("--parent-workspace-id <id:string>", "Parent workspace id, used to root a fork-of-a-fork branch").option("--skip-secrets", "Skip syncing only secrets variables").option("--git-committer-email <email:string>", "Committer email for the deploy commit (GPG-signed repos pass the GPG key email; defaults to WM_EMAIL)").option("--git-committer-name <name:string>", "Committer name for the deploy commit (defaults to WM_USERNAME)").action(gitDeploy);
|
|
68241
68541
|
sync_default = command8;
|
|
68242
68542
|
});
|
|
68243
68543
|
|
|
@@ -89801,7 +90101,7 @@ var config_default = command35;
|
|
|
89801
90101
|
|
|
89802
90102
|
// src/main.ts
|
|
89803
90103
|
await init_context();
|
|
89804
|
-
var VERSION = "1.704.
|
|
90104
|
+
var VERSION = "1.704.1";
|
|
89805
90105
|
async function checkVersionSafe(cmd) {
|
|
89806
90106
|
const mainCommand = cmd.getMainCommand();
|
|
89807
90107
|
const upgradeCommand = mainCommand.getCommand("upgrade");
|