windmill-cli 1.651.1 → 1.652.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 +37 -13
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -11785,7 +11785,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
11785
11785
|
PASSWORD: undefined,
|
|
11786
11786
|
TOKEN: getEnv2("WM_TOKEN"),
|
|
11787
11787
|
USERNAME: undefined,
|
|
11788
|
-
VERSION: "1.
|
|
11788
|
+
VERSION: "1.652.0",
|
|
11789
11789
|
WITH_CREDENTIALS: true,
|
|
11790
11790
|
interceptors: {
|
|
11791
11791
|
request: new Interceptors,
|
|
@@ -25369,7 +25369,8 @@ async function remove(_opts, name) {
|
|
|
25369
25369
|
}
|
|
25370
25370
|
async function whoami2(_opts) {
|
|
25371
25371
|
await requireLogin(_opts);
|
|
25372
|
-
|
|
25372
|
+
const whoamiInfo = await globalWhoami();
|
|
25373
|
+
info(JSON.stringify(whoamiInfo, null, 2));
|
|
25373
25374
|
const activeName = await getActiveWorkspaceName(_opts);
|
|
25374
25375
|
info("Active: " + colors.green.bold(activeName || "none"));
|
|
25375
25376
|
}
|
|
@@ -62244,6 +62245,7 @@ ${folderList}
|
|
|
62244
62245
|
let [_basePath, changes2] = queue.shift();
|
|
62245
62246
|
const promise = (async () => {
|
|
62246
62247
|
const alreadySynced = [];
|
|
62248
|
+
const deletedVarsResPaths = [];
|
|
62247
62249
|
const isRawApp = isRawAppFile(changes2[0].path);
|
|
62248
62250
|
if (isRawApp) {
|
|
62249
62251
|
const deleteRawApp = changes2.find((change) => change.name === "deleted" && isRawAppFolderMetadataFile(change.path));
|
|
@@ -62371,12 +62373,23 @@ ${folderList}
|
|
|
62371
62373
|
name: change.path.split(SEP8)[1]
|
|
62372
62374
|
});
|
|
62373
62375
|
break;
|
|
62374
|
-
case "resource":
|
|
62375
|
-
|
|
62376
|
-
|
|
62377
|
-
|
|
62378
|
-
|
|
62376
|
+
case "resource": {
|
|
62377
|
+
const resourcePath = removeSuffix(target, ".resource.json");
|
|
62378
|
+
try {
|
|
62379
|
+
await deleteResource({
|
|
62380
|
+
workspace: workspaceId,
|
|
62381
|
+
path: resourcePath
|
|
62382
|
+
});
|
|
62383
|
+
} catch (e) {
|
|
62384
|
+
if (e?.status === 404 && deletedVarsResPaths.includes(resourcePath)) {
|
|
62385
|
+
debug(`Resource ${resourcePath} already deleted by linked variable`);
|
|
62386
|
+
} else {
|
|
62387
|
+
throw e;
|
|
62388
|
+
}
|
|
62389
|
+
}
|
|
62390
|
+
deletedVarsResPaths.push(resourcePath);
|
|
62379
62391
|
break;
|
|
62392
|
+
}
|
|
62380
62393
|
case "resource-type":
|
|
62381
62394
|
await deleteResourceType({
|
|
62382
62395
|
workspace: workspaceId,
|
|
@@ -62495,12 +62508,23 @@ ${folderList}
|
|
|
62495
62508
|
});
|
|
62496
62509
|
break;
|
|
62497
62510
|
}
|
|
62498
|
-
case "variable":
|
|
62499
|
-
|
|
62500
|
-
|
|
62501
|
-
|
|
62502
|
-
|
|
62511
|
+
case "variable": {
|
|
62512
|
+
const variablePath = removeSuffix(target, ".variable.json");
|
|
62513
|
+
try {
|
|
62514
|
+
await deleteVariable({
|
|
62515
|
+
workspace: workspaceId,
|
|
62516
|
+
path: variablePath
|
|
62517
|
+
});
|
|
62518
|
+
} catch (e) {
|
|
62519
|
+
if (e?.status === 404 && deletedVarsResPaths.includes(variablePath)) {
|
|
62520
|
+
debug(`Variable ${variablePath} already deleted by linked resource`);
|
|
62521
|
+
} else {
|
|
62522
|
+
throw e;
|
|
62523
|
+
}
|
|
62524
|
+
}
|
|
62525
|
+
deletedVarsResPaths.push(variablePath);
|
|
62503
62526
|
break;
|
|
62527
|
+
}
|
|
62504
62528
|
case "user": {
|
|
62505
62529
|
const users = await listUsers({
|
|
62506
62530
|
workspace: workspaceId
|
|
@@ -78416,7 +78440,7 @@ var docs_default = command29;
|
|
|
78416
78440
|
|
|
78417
78441
|
// src/main.ts
|
|
78418
78442
|
await init_context();
|
|
78419
|
-
var VERSION = "1.
|
|
78443
|
+
var VERSION = "1.652.0";
|
|
78420
78444
|
var command30 = new Command().name("wmill").action(() => info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`)).description("Windmill CLI").globalOption("--workspace <workspace:string>", "Specify the target workspace. This overrides the default workspace.").globalOption("--debug --verbose", "Show debug/verbose logs").globalOption("--show-diffs", "Show diff informations when syncing (may show sensitive informations)").globalOption("--token <token:string>", "Specify an API token. This will override any stored token.").globalOption("--base-url <baseUrl:string>", "Specify the base URL of the API. If used, --token and --workspace are required and no local remote/workspace already set will be used.").globalOption("--config-dir <configDir:string>", "Specify a custom config directory. Overrides WMILL_CONFIG_DIR environment variable and default ~/.config location.").env("HEADERS <headers:string>", `Specify headers to use for all requests. e.g: "HEADERS='h1: v1, h2: v2'"`).version(VERSION).versionOption(false).command("init", init_default).command("app", app_default).command("flow", flow_default).command("script", script_default).command("workspace", workspace_default).command("resource", resource_default).command("resource-type", resource_type_default).command("user", user_default).command("variable", variable_default).command("hub", hub_default).command("folder", folder_default).command("schedule", schedule_default).command("trigger", trigger_default).command("dev", dev_default2).command("sync", sync_default).command("lint", lint_default).command("gitsync-settings", gitsync_settings_default).command("instance", instance_default).command("worker-groups", worker_groups_default).command("workers", workers_default).command("queues", queues_default).command("dependencies", dependencies_default).command("jobs", jobs_default).command("docs", docs_default).command("version --version", "Show version information").action(async (opts) => {
|
|
78421
78445
|
console.log("CLI version: " + VERSION);
|
|
78422
78446
|
try {
|