windmill-cli 1.752.0 → 1.753.1-gitsync.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/main.js +76 -56
- package/package.json +2 -2
package/esm/main.js
CHANGED
|
@@ -16784,7 +16784,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16784
16784
|
PASSWORD: undefined,
|
|
16785
16785
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16786
16786
|
USERNAME: undefined,
|
|
16787
|
-
VERSION: "1.
|
|
16787
|
+
VERSION: "1.753.0",
|
|
16788
16788
|
WITH_CREDENTIALS: true,
|
|
16789
16789
|
interceptors: {
|
|
16790
16790
|
request: new Interceptors,
|
|
@@ -17152,7 +17152,6 @@ __export(exports_services_gen, {
|
|
|
17152
17152
|
setFlowUserState: () => setFlowUserState,
|
|
17153
17153
|
setEnvironmentVariable: () => setEnvironmentVariable,
|
|
17154
17154
|
setEmailTriggerMode: () => setEmailTriggerMode,
|
|
17155
|
-
setDevWorkspaceLabel: () => setDevWorkspaceLabel,
|
|
17156
17155
|
setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
|
|
17157
17156
|
setCaptureConfig: () => setCaptureConfig,
|
|
17158
17157
|
setAzureTriggerMode: () => setAzureTriggerMode,
|
|
@@ -18233,16 +18232,6 @@ var backendVersion = () => {
|
|
|
18233
18232
|
workspace: data3.workspace
|
|
18234
18233
|
}
|
|
18235
18234
|
});
|
|
18236
|
-
}, setDevWorkspaceLabel = (data3) => {
|
|
18237
|
-
return request(OpenAPI, {
|
|
18238
|
-
method: "POST",
|
|
18239
|
-
url: "/w/{workspace}/workspaces/set_dev_workspace_label",
|
|
18240
|
-
path: {
|
|
18241
|
-
workspace: data3.workspace
|
|
18242
|
-
},
|
|
18243
|
-
body: data3.requestBody,
|
|
18244
|
-
mediaType: "application/json"
|
|
18245
|
-
});
|
|
18246
18235
|
}, existsWorkspace = (data3) => {
|
|
18247
18236
|
return request(OpenAPI, {
|
|
18248
18237
|
method: "POST",
|
|
@@ -25772,7 +25761,6 @@ __export(exports_gen, {
|
|
|
25772
25761
|
setFlowUserState: () => setFlowUserState,
|
|
25773
25762
|
setEnvironmentVariable: () => setEnvironmentVariable,
|
|
25774
25763
|
setEmailTriggerMode: () => setEmailTriggerMode,
|
|
25775
|
-
setDevWorkspaceLabel: () => setDevWorkspaceLabel,
|
|
25776
25764
|
setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
|
|
25777
25765
|
setCaptureConfig: () => setCaptureConfig,
|
|
25778
25766
|
setAzureTriggerMode: () => setAzureTriggerMode,
|
|
@@ -26555,7 +26543,7 @@ var init_auth = __esm(async () => {
|
|
|
26555
26543
|
});
|
|
26556
26544
|
|
|
26557
26545
|
// src/core/constants.ts
|
|
26558
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
26546
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.753.0";
|
|
26559
26547
|
|
|
26560
26548
|
// src/utils/git.ts
|
|
26561
26549
|
var exports_git = {};
|
|
@@ -26636,22 +26624,28 @@ function isGitRepository() {
|
|
|
26636
26624
|
return false;
|
|
26637
26625
|
}
|
|
26638
26626
|
}
|
|
26639
|
-
function isForkWorkspace(workspaceId) {
|
|
26640
|
-
return workspaceId.startsWith(FORK_WORKSPACE_PREFIX);
|
|
26627
|
+
function isForkWorkspace(workspaceId, parentWorkspaceId) {
|
|
26628
|
+
return !!parentWorkspaceId || workspaceId.startsWith(FORK_WORKSPACE_PREFIX);
|
|
26641
26629
|
}
|
|
26642
|
-
function forkBranchName(workspaceId, originalBranch) {
|
|
26643
|
-
|
|
26630
|
+
function forkBranchName(workspaceId, originalBranch, devWorkspaceLabel) {
|
|
26631
|
+
if (devWorkspaceLabel) {
|
|
26632
|
+
return devWorkspaceLabel;
|
|
26633
|
+
}
|
|
26634
|
+
const branchPrefix = `${WM_FORK_PREFIX}/${originalBranch}/`;
|
|
26635
|
+
return workspaceId.startsWith(FORK_WORKSPACE_PREFIX) ? workspaceId.replace(FORK_WORKSPACE_PREFIX, branchPrefix) : `${branchPrefix}${workspaceId}`;
|
|
26644
26636
|
}
|
|
26645
26637
|
function computeGitSyncDeployBranch(params) {
|
|
26646
26638
|
const {
|
|
26647
26639
|
workspaceId,
|
|
26640
|
+
parentWorkspaceId,
|
|
26641
|
+
devWorkspaceLabel,
|
|
26648
26642
|
items,
|
|
26649
26643
|
useIndividualBranch,
|
|
26650
26644
|
groupByFolder,
|
|
26651
26645
|
clonedBranchName
|
|
26652
26646
|
} = params;
|
|
26653
|
-
if (workspaceId
|
|
26654
|
-
return forkBranchName(workspaceId, clonedBranchName);
|
|
26647
|
+
if (isForkWorkspace(workspaceId, parentWorkspaceId)) {
|
|
26648
|
+
return forkBranchName(workspaceId, clonedBranchName, devWorkspaceLabel);
|
|
26655
26649
|
}
|
|
26656
26650
|
if (items.length === 0)
|
|
26657
26651
|
return null;
|
|
@@ -27493,37 +27487,47 @@ async function createWorkspaceFork2(opts, workspaceName, workspaceId = undefined
|
|
|
27493
27487
|
info(colors.red.bold("! Workspace needs to be specified as positional argument, not as option."));
|
|
27494
27488
|
return;
|
|
27495
27489
|
}
|
|
27490
|
+
const token = workspace.token;
|
|
27491
|
+
if (!token) {
|
|
27492
|
+
throw new Error("Not logged in. Please run 'wmill workspace add' first.");
|
|
27493
|
+
}
|
|
27494
|
+
const remote = workspace.remote;
|
|
27495
|
+
setClient(token, remote.endsWith("/") ? remote.substring(0, remote.length - 1) : remote);
|
|
27496
|
+
let parentName = workspace.name;
|
|
27497
|
+
try {
|
|
27498
|
+
const fetched = await getWorkspaceName({ workspace: workspace.workspaceId });
|
|
27499
|
+
if (fetched)
|
|
27500
|
+
parentName = fetched;
|
|
27501
|
+
} catch {}
|
|
27502
|
+
const forkSuffix = "'s fork";
|
|
27503
|
+
const nameBase = parentName || workspace.workspaceId;
|
|
27504
|
+
const defaultForkName = nameBase.length + forkSuffix.length <= 50 ? `${nameBase}${forkSuffix}` : `${nameBase.slice(0, 50 - forkSuffix.length).trimEnd()}${forkSuffix}`;
|
|
27496
27505
|
const branchDefaultId = renameCurrent ? branchToForkId(currentBranch) : undefined;
|
|
27497
27506
|
const interactive = process10.stdin.isTTY && opts.yes !== true;
|
|
27498
27507
|
if (workspaceName === undefined) {
|
|
27499
|
-
if (
|
|
27500
|
-
workspaceName = branchDefaultId;
|
|
27501
|
-
info(`Naming the fork after the current branch: \`${workspaceName}\``);
|
|
27502
|
-
} else {
|
|
27508
|
+
if (interactive) {
|
|
27503
27509
|
workspaceName = await Input.prompt({
|
|
27504
|
-
message: "
|
|
27505
|
-
default:
|
|
27510
|
+
message: "Friendly name for the forked workspace (shown in the UI, may contain spaces):",
|
|
27511
|
+
default: defaultForkName
|
|
27506
27512
|
});
|
|
27513
|
+
} else {
|
|
27514
|
+
workspaceName = defaultForkName;
|
|
27515
|
+
info(`Naming the fork \`${workspaceName}\` (override with the workspace_name argument).`);
|
|
27507
27516
|
}
|
|
27508
27517
|
}
|
|
27509
27518
|
if (!workspaceId) {
|
|
27510
|
-
const
|
|
27511
|
-
|
|
27512
|
-
|
|
27513
|
-
} else {
|
|
27519
|
+
const idBasis = workspaceName === defaultForkName ? `${parentName}-fork` : workspaceName;
|
|
27520
|
+
const idDefault = branchDefaultId ?? branchToForkId(idBasis);
|
|
27521
|
+
if (interactive) {
|
|
27514
27522
|
workspaceId = await Input.prompt({
|
|
27515
|
-
message: `
|
|
27523
|
+
message: `Id for the forked workspace (a slug: no spaces or special characters). It will be prefixed with '${WM_FORK_PREFIX}-' and also determines the git branch name. The suggested default is normalized from the name (or the branch when converting one into the fork branch)`,
|
|
27516
27524
|
default: idDefault,
|
|
27517
27525
|
suggestions: [idDefault]
|
|
27518
27526
|
});
|
|
27527
|
+
} else {
|
|
27528
|
+
workspaceId = idDefault;
|
|
27519
27529
|
}
|
|
27520
27530
|
}
|
|
27521
|
-
const token = workspace.token;
|
|
27522
|
-
if (!token) {
|
|
27523
|
-
throw new Error("Not logged in. Please run 'wmill workspace add' first.");
|
|
27524
|
-
}
|
|
27525
|
-
const remote = workspace.remote;
|
|
27526
|
-
setClient(token, remote.endsWith("/") ? remote.substring(0, remote.length - 1) : remote);
|
|
27527
27531
|
info(colors.blue(`Creating forked workspace: ${workspaceName}...`));
|
|
27528
27532
|
const trueWorkspaceId = `${WM_FORK_PREFIX}-${workspaceId}`;
|
|
27529
27533
|
validateForkWorkspaceId(trueWorkspaceId);
|
|
@@ -29904,7 +29908,13 @@ var init_workspace = __esm(async () => {
|
|
|
29904
29908
|
]);
|
|
29905
29909
|
command2 = new Command().alias("profile").description("workspace related commands").action(list3).command("switch").complete("workspace", async () => (await allWorkspaces()).map((x) => x.name)).description("Switch to another workspace").arguments("<workspace_name:string:workspace>").action(switchC).command("add").description("Add a workspace").arguments("[workspace_name:string] [workspace_id:string] [remote:string]").option("-c --create", "Create the workspace if it does not exist").option("--create-workspace-name <workspace_name:string>", "Specify the workspace name. Ignored if --create is not specified or the workspace already exists. Will default to the workspace id.").option("--create-username <username:string>", "Specify your own username in the newly created workspace. Ignored if --create is not specified, the workspace already exists or automatic username creation is enabled on the instance.", {
|
|
29906
29910
|
default: "admin"
|
|
29907
|
-
}).action(add).command("remove").description("Remove a workspace").arguments("<workspace_name:string>").action(remove).command("whoami").description("Show the currently active user").action(whoami2).command("list").description("List local workspace profiles").action(list3).command("list-remote").description("List workspaces on the remote server that you have access to").option("--as-superadmin", "List ALL workspaces on the instance (requires the token to belong to a superadmin/devops user)").action(listRemote).command("list-forks").description("List forked workspaces on the remote server").action(listForks).command("bind").description("Create or update a workspace entry in wmill.yaml from the active profile").option("--workspace <name:string>", "Workspace name (default: current branch or workspaceId)").option("--branch <branch:string>", "Git branch to associate (default: workspace name)").action((opts) => bind(opts, true)).command("unbind").description("Remove baseUrl and workspaceId from a workspace entry").option("--workspace <name:string>", "Workspace to unbind").action((opts) => bind(opts, false)).command("fork").description(
|
|
29911
|
+
}).action(add).command("remove").description("Remove a workspace").arguments("<workspace_name:string>").action(remove).command("whoami").description("Show the currently active user").action(whoami2).command("list").description("List local workspace profiles").action(list3).command("list-remote").description("List workspaces on the remote server that you have access to").option("--as-superadmin", "List ALL workspaces on the instance (requires the token to belong to a superadmin/devops user)").action(listRemote).command("list-forks").description("List forked workspaces on the remote server").action(listForks).command("bind").description("Create or update a workspace entry in wmill.yaml from the active profile").option("--workspace <name:string>", "Workspace name (default: current branch or workspaceId)").option("--branch <branch:string>", "Git branch to associate (default: workspace name)").action((opts) => bind(opts, true)).command("unbind").description("Remove baseUrl and workspaceId from a workspace entry").option("--workspace <name:string>", "Workspace to unbind").action((opts) => bind(opts, false)).command("fork").description(`Create a forked workspace from its parent workspace.
|
|
29912
|
+
|
|
29913
|
+
The parent is resolved from your current git branch, not from the active profile: run this from a git repo checked out on the branch mapped to the parent workspace in wmill.yaml's \`workspaces:\` section (a fork branch of it resolves to the same parent). \`wmill workspace switch\` does not change which workspace is forked.
|
|
29914
|
+
|
|
29915
|
+
Arguments (omit both to be prompted interactively):
|
|
29916
|
+
[workspace_name] Friendly display name for the fork, shown in the UI. May contain spaces, so quote it in the shell (e.g. "My Fork"). Max 50 chars. Defaults to "<parent workspace name>'s fork".
|
|
29917
|
+
[workspace_id] Id for the fork. Must be a slug (no spaces or special characters) and is automatically prefixed with \`wm-fork-\`, so pass just the bare slug (e.g. \`my-fork\` becomes \`wm-fork-my-fork\`). This id also determines the fork's git branch name. Defaults to a slug derived from the name — or, when you are converting an existing branch into the fork branch, from that branch.`).arguments("[workspace_name:string] [workspace_id:string]").option("--create-workspace-name <workspace_name:string>", "Specify the workspace name. Ignored if --create is not specified or the workspace already exists. Will default to the workspace id.").option("--color <color:string>", "Workspace color (hex code, e.g. #ff0000)").option("--datatable-behavior <behavior:string>", "How to handle datatables: skip, schema_only, or schema_and_data (default: interactive prompt)").option("--from-branch <branch:string>", "Non-interactive override for the 'turn my current working branch into the fork' workflow: base the fork on <branch> (its bound workspace is the parent) and rename the current branch onto wm-fork/<branch>/<id>. Usually unneeded — from a working branch `wmill workspace fork` offers this interactively; from a base branch it creates a fresh fork branch.").option("-y --yes", "Skip interactive prompts (defaults datatable behavior to 'skip'). On a non-base branch, requires --from-branch since the base branch can't be prompted for.").action(createWorkspaceFork2).command("delete-fork").description("Delete a forked workspace").arguments("<fork_name:string>").option("-y --yes", "Skip confirmation prompt").action(deleteWorkspaceFork).command("merge").description("Compare and deploy changes between a fork and its parent workspace").option("--direction <direction:string>", "Deploy direction: to-parent or to-fork").option("--all", "Deploy all changed items including conflicts").option("--skip-conflicts", "Skip items modified in both workspaces").option("--include <items:string>", "Comma-separated kind:path items to include (e.g. script:f/test/main,flow:f/my/flow)").option("--exclude <items:string>", "Comma-separated kind:path items to exclude").option("--preserve-on-behalf-of", "Preserve original on_behalf_of/permissioned_as values").option("-y --yes", "Non-interactive mode (deploy without prompts)").action(mergeWorkspaces).command("connect-slack").description("Non-interactively connect Slack to the active workspace using a pre-minted bot token (xoxb-...). Produces the same artifacts as the UI OAuth flow: workspace_settings fields, g/slack group, f/slack_bot folder, and the encrypted bot token variable + resource at f/slack_bot/bot_token.").option("--bot-token <bot_token:string>", "Slack bot token (xoxb-...)", { required: true }).option("--team-id <team_id:string>", "Slack team id", { required: true }).option("--team-name <team_name:string>", "Slack team name", { required: true }).action(connectSlack2).command("disconnect-slack").description("Clear slack_team_id / slack_name on the active workspace (marks the workspace as disconnected). Does NOT remove the bot token variable/resource/folder/group — delete those from the local sync folder and run 'wmill sync push' to tear them down. Does NOT remove the workspace-level OAuth override — set slack_oauth_client_id/_secret to '' in settings.yaml and push.").action(disconnectSlack2);
|
|
29908
29918
|
workspace_default = command2;
|
|
29909
29919
|
});
|
|
29910
29920
|
|
|
@@ -49055,7 +49065,7 @@ var require_zipEntries = __commonJS((exports, module) => {
|
|
|
49055
49065
|
if (this.centralDirRecords !== this.files.length) {
|
|
49056
49066
|
if (this.centralDirRecords !== 0 && this.files.length === 0) {
|
|
49057
49067
|
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
49058
|
-
}
|
|
49068
|
+
} else {}
|
|
49059
49069
|
}
|
|
49060
49070
|
},
|
|
49061
49071
|
readEndOfCentral: function() {
|
|
@@ -57489,7 +57499,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
57489
57499
|
var error2 = generateError(state, message);
|
|
57490
57500
|
if (state.onWarning) {
|
|
57491
57501
|
state.onWarning.call(null, error2);
|
|
57492
|
-
}
|
|
57502
|
+
} else {}
|
|
57493
57503
|
}
|
|
57494
57504
|
var directiveHandlers = {
|
|
57495
57505
|
YAML: function handleYamlDirective(state, name, args) {
|
|
@@ -58027,7 +58037,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
58027
58037
|
} else if (detectedIndent) {
|
|
58028
58038
|
sc.value += common3.repeat(`
|
|
58029
58039
|
`, emptyLines + 1);
|
|
58030
|
-
}
|
|
58040
|
+
} else {}
|
|
58031
58041
|
detectedIndent = true;
|
|
58032
58042
|
emptyLines = 0;
|
|
58033
58043
|
captureStart = state.position;
|
|
@@ -69451,28 +69461,32 @@ async function pull(opts) {
|
|
|
69451
69461
|
process.exit(1);
|
|
69452
69462
|
}
|
|
69453
69463
|
const clonedBranchName = getCurrentGitBranch() ?? "main";
|
|
69454
|
-
const targetIsFork = isForkWorkspace(workspace.workspaceId);
|
|
69464
|
+
const targetIsFork = isForkWorkspace(workspace.workspaceId, opts.parentWorkspaceId);
|
|
69455
69465
|
const useIndividualBranch = targetIsFork ? false : !!opts.useIndividualBranch;
|
|
69456
69466
|
const groupByFolder = targetIsFork ? false : !!opts.groupByFolder;
|
|
69457
|
-
|
|
69458
|
-
|
|
69459
|
-
|
|
69460
|
-
|
|
69461
|
-
|
|
69462
|
-
|
|
69463
|
-
|
|
69464
|
-
|
|
69465
|
-
|
|
69466
|
-
checkoutGitSyncDeployBranch(parentBranch);
|
|
69467
|
-
}
|
|
69467
|
+
const parentBranch = opts.parentDevWorkspaceLabel ? opts.parentDevWorkspaceLabel : opts.parentWorkspaceId && isForkWorkspace(opts.parentWorkspaceId) ? computeGitSyncDeployBranch({
|
|
69468
|
+
workspaceId: opts.parentWorkspaceId,
|
|
69469
|
+
items: deployItems,
|
|
69470
|
+
useIndividualBranch,
|
|
69471
|
+
groupByFolder,
|
|
69472
|
+
clonedBranchName
|
|
69473
|
+
}) : null;
|
|
69474
|
+
if (parentBranch && parentBranch !== clonedBranchName) {
|
|
69475
|
+
checkoutGitSyncDeployBranch(parentBranch);
|
|
69468
69476
|
}
|
|
69469
69477
|
const deployBranch = computeGitSyncDeployBranch({
|
|
69470
69478
|
workspaceId: workspace.workspaceId,
|
|
69479
|
+
parentWorkspaceId: opts.parentWorkspaceId,
|
|
69480
|
+
devWorkspaceLabel: opts.devWorkspaceLabel,
|
|
69471
69481
|
items: deployItems,
|
|
69472
69482
|
useIndividualBranch,
|
|
69473
69483
|
groupByFolder,
|
|
69474
69484
|
clonedBranchName
|
|
69475
69485
|
});
|
|
69486
|
+
if (targetIsFork && deployBranch && deployBranch === clonedBranchName) {
|
|
69487
|
+
error(`Fork branch '${deployBranch}' equals the checked-out branch '${clonedBranchName}'; refusing to deploy a fork directly to the tracked branch. Use a different dev workspace label or tracked branch.`);
|
|
69488
|
+
process.exit(1);
|
|
69489
|
+
}
|
|
69476
69490
|
if (deployBranch && deployBranch !== clonedBranchName) {
|
|
69477
69491
|
checkoutGitSyncDeployBranch(deployBranch);
|
|
69478
69492
|
}
|
|
@@ -69729,7 +69743,7 @@ async function gitDeploy(opts) {
|
|
|
69729
69743
|
process.exit(1);
|
|
69730
69744
|
}
|
|
69731
69745
|
}
|
|
69732
|
-
const isFork = isForkWorkspace(opts.workspace ?? "");
|
|
69746
|
+
const isFork = isForkWorkspace(opts.workspace ?? "", opts.parentWorkspaceId);
|
|
69733
69747
|
const useIndividualBranch = isFork ? false : !!opts.useIndividualBranch;
|
|
69734
69748
|
const includes = deriveGitSyncDeployIncludes(items, useIndividualBranch);
|
|
69735
69749
|
const promotion = useIndividualBranch && !opts.promotion ? getCurrentGitBranch() ?? undefined : opts.promotion;
|
|
@@ -70816,7 +70830,7 @@ var init_sync = __esm(async () => {
|
|
|
70816
70830
|
aliasDuplicateObjects: false,
|
|
70817
70831
|
singleQuote: true
|
|
70818
70832
|
};
|
|
70819
|
-
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-reencrypt-on-key-change", "When the pushed encryption key differs from the remote, do NOT re-encrypt existing remote secrets. Only safe if they are already encrypted with the new key (e.g. workspace/instance migration). Default is to re-encrypt.").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);
|
|
70833
|
+
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-reencrypt-on-key-change", "When the pushed encryption key differs from the remote, do NOT re-encrypt existing remote secrets. Only safe if they are already encrypted with the new key (e.g. workspace/instance migration). Default is to re-encrypt.").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("--dev-workspace-label <label:string>", "Environment label of a dev workspace (dev/staging); its deploys go to that branch").option("--parent-dev-workspace-label <label:string>", "Environment label of the parent dev workspace; roots a fork-of-dev branch on it").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);
|
|
70820
70834
|
sync_default = command8;
|
|
70821
70835
|
});
|
|
70822
70836
|
|
|
@@ -87685,7 +87699,13 @@ workspace related commands
|
|
|
87685
87699
|
- \`--branch <branch:string>\` - Git branch to associate (default: workspace name)
|
|
87686
87700
|
- \`workspace unbind\` - Remove baseUrl and workspaceId from a workspace entry
|
|
87687
87701
|
- \`--workspace <name:string>\` - Workspace to unbind
|
|
87688
|
-
- \`workspace fork [workspace_name:string] [workspace_id:string]\` - Create a forked workspace
|
|
87702
|
+
- \`workspace fork [workspace_name:string] [workspace_id:string]\` - Create a forked workspace from its parent workspace.
|
|
87703
|
+
|
|
87704
|
+
The parent is resolved from your current git branch, not from the active profile: run this from a git repo checked out on the branch mapped to the parent workspace in wmill.yaml's \`workspaces:\` section (a fork branch of it resolves to the same parent). \`wmill workspace switch\` does not change which workspace is forked.
|
|
87705
|
+
|
|
87706
|
+
Arguments (omit both to be prompted interactively):
|
|
87707
|
+
[workspace_name] Friendly display name for the fork, shown in the UI. May contain spaces, so quote it in the shell (e.g. "My Fork"). Max 50 chars. Defaults to "<parent workspace name>'s fork".
|
|
87708
|
+
[workspace_id] Id for the fork. Must be a slug (no spaces or special characters) and is automatically prefixed with \`wm-fork-\`, so pass just the bare slug (e.g. \`my-fork\` becomes \`wm-fork-my-fork\`). This id also determines the fork's git branch name. Defaults to a slug derived from the name — or, when you are converting an existing branch into the fork branch, from that branch.
|
|
87689
87709
|
- \`--create-workspace-name <workspace_name:string>\` - Specify the workspace name. Ignored if --create is not specified or the workspace already exists. Will default to the workspace id.
|
|
87690
87710
|
- \`--color <color:string>\` - Workspace color (hex code, e.g. #ff0000)
|
|
87691
87711
|
- \`--datatable-behavior <behavior:string>\` - How to handle datatables: skip, schema_only, or schema_and_data (default: interactive prompt)
|
package/package.json
CHANGED