windmill-cli 1.815.0 → 1.816.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 +44 -13
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16766,7 +16766,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16766
16766
|
PASSWORD: undefined,
|
|
16767
16767
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16768
16768
|
USERNAME: undefined,
|
|
16769
|
-
VERSION: "1.
|
|
16769
|
+
VERSION: "1.816.0",
|
|
16770
16770
|
WITH_CREDENTIALS: true,
|
|
16771
16771
|
interceptors: {
|
|
16772
16772
|
request: new Interceptors,
|
|
@@ -18058,6 +18058,10 @@ var getAuditLog = (data) => {
|
|
|
18058
18058
|
path: {
|
|
18059
18059
|
workspace: data.workspace,
|
|
18060
18060
|
path: data.path
|
|
18061
|
+
},
|
|
18062
|
+
query: {
|
|
18063
|
+
page: data.page,
|
|
18064
|
+
per_page: data.perPage
|
|
18061
18065
|
}
|
|
18062
18066
|
});
|
|
18063
18067
|
}, existsScriptByPath = (data) => {
|
|
@@ -18153,6 +18157,10 @@ var getAuditLog = (data) => {
|
|
|
18153
18157
|
path: {
|
|
18154
18158
|
workspace: data.workspace,
|
|
18155
18159
|
path: data.path
|
|
18160
|
+
},
|
|
18161
|
+
query: {
|
|
18162
|
+
page: data.page,
|
|
18163
|
+
per_page: data.perPage
|
|
18156
18164
|
}
|
|
18157
18165
|
});
|
|
18158
18166
|
}, getFlowVersion = (data) => {
|
|
@@ -20012,7 +20020,7 @@ var init_auth = __esm(async () => {
|
|
|
20012
20020
|
});
|
|
20013
20021
|
|
|
20014
20022
|
// src/core/constants.ts
|
|
20015
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
20023
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.816.0";
|
|
20016
20024
|
|
|
20017
20025
|
// src/utils/resource_folders.ts
|
|
20018
20026
|
import { existsSync } from "node:fs";
|
|
@@ -21517,6 +21525,16 @@ Found ${datatables.length} datatable(s):`);
|
|
|
21517
21525
|
continue;
|
|
21518
21526
|
}
|
|
21519
21527
|
const newDbName = `${trueWorkspaceId.replace(/-/g, "_")}__${dt.name}`;
|
|
21528
|
+
const forkBehavior = dtBehavior;
|
|
21529
|
+
if (typeof dt.permissioned === "boolean") {
|
|
21530
|
+
info(colors.blue(` Datatable "${dt.name}" will be cloned (${forkBehavior === "schema_only" ? "schema" : "schema + data"}) into "${newDbName}" when the fork is created.`));
|
|
21531
|
+
forkedDatatables.push({
|
|
21532
|
+
name: dt.name,
|
|
21533
|
+
new_dbname: newDbName,
|
|
21534
|
+
fork_behavior: forkBehavior
|
|
21535
|
+
});
|
|
21536
|
+
continue;
|
|
21537
|
+
}
|
|
21520
21538
|
try {
|
|
21521
21539
|
info(colors.blue(` Creating database "${newDbName}" for datatable "${dt.name}"...`));
|
|
21522
21540
|
await createPgDatabase({
|
|
@@ -21526,14 +21544,14 @@ Found ${datatables.length} datatable(s):`);
|
|
|
21526
21544
|
target_dbname: newDbName
|
|
21527
21545
|
}
|
|
21528
21546
|
});
|
|
21529
|
-
info(colors.blue(` Importing ${
|
|
21547
|
+
info(colors.blue(` Importing ${forkBehavior === "schema_only" ? "schema" : "schema + data"}...`));
|
|
21530
21548
|
await importPgDatabase({
|
|
21531
21549
|
workspace: workspace.workspaceId,
|
|
21532
21550
|
requestBody: {
|
|
21533
21551
|
source: `datatable://${dt.name}`,
|
|
21534
21552
|
target: `datatable://${dt.name}`,
|
|
21535
21553
|
target_dbname_override: newDbName,
|
|
21536
|
-
fork_behavior:
|
|
21554
|
+
fork_behavior: forkBehavior
|
|
21537
21555
|
}
|
|
21538
21556
|
});
|
|
21539
21557
|
info(colors.green(` ✓ Datatable "${dt.name}" cloned.`));
|
|
@@ -21551,7 +21569,8 @@ Found ${datatables.length} datatable(s):`);
|
|
|
21551
21569
|
requestBody: {
|
|
21552
21570
|
id: trueWorkspaceId,
|
|
21553
21571
|
name: opts.createWorkspaceName ?? workspaceName ?? trueWorkspaceId,
|
|
21554
|
-
color: forkColor
|
|
21572
|
+
color: forkColor,
|
|
21573
|
+
forked_datatables: forkedDatatables
|
|
21555
21574
|
}
|
|
21556
21575
|
});
|
|
21557
21576
|
if (gitSyncJobIds && gitSyncJobIds.length > 0) {
|
|
@@ -56924,7 +56943,7 @@ var init_openflow = __esm(() => {
|
|
|
56924
56943
|
openflow_default = {
|
|
56925
56944
|
openapi: "3.0.3",
|
|
56926
56945
|
info: {
|
|
56927
|
-
version: "1.
|
|
56946
|
+
version: "1.816.0",
|
|
56928
56947
|
title: "OpenFlow Spec",
|
|
56929
56948
|
contact: {
|
|
56930
56949
|
name: "Ruben Fiszel",
|
|
@@ -67389,10 +67408,14 @@ async function pull(opts) {
|
|
|
67389
67408
|
if (opts.jsonOutput)
|
|
67390
67409
|
setSilent(true);
|
|
67391
67410
|
const originalCliOpts = { ...opts };
|
|
67392
|
-
|
|
67393
|
-
|
|
67394
|
-
|
|
67395
|
-
|
|
67411
|
+
const withConfigFile = async () => {
|
|
67412
|
+
const merged = await mergeConfigWithConfigFile({ ...originalCliOpts });
|
|
67413
|
+
if (originalCliOpts.includeSecrets) {
|
|
67414
|
+
merged.skipSecrets = false;
|
|
67415
|
+
}
|
|
67416
|
+
return merged;
|
|
67417
|
+
};
|
|
67418
|
+
opts = await withConfigFile();
|
|
67396
67419
|
const hasExplicitCredentials = !!opts.baseUrl;
|
|
67397
67420
|
let wsNameForConfig;
|
|
67398
67421
|
if (opts.branch && !hasExplicitCredentials && !branchDeprecationWarned) {
|
|
@@ -67412,9 +67435,6 @@ async function pull(opts) {
|
|
|
67412
67435
|
}
|
|
67413
67436
|
throw error2;
|
|
67414
67437
|
}
|
|
67415
|
-
if (opts.stateful) {
|
|
67416
|
-
await mkdir6(path13.join(process.cwd(), ".wmill"), { recursive: true });
|
|
67417
|
-
}
|
|
67418
67438
|
const workspace = await resolveWorkspace(opts, wsNameForConfig);
|
|
67419
67439
|
await requireLogin(opts);
|
|
67420
67440
|
if (opts.gitDeployItems !== undefined) {
|
|
@@ -67467,6 +67487,10 @@ async function pull(opts) {
|
|
|
67467
67487
|
});
|
|
67468
67488
|
return;
|
|
67469
67489
|
}
|
|
67490
|
+
if (getCurrentGitBranch() !== clonedBranchName) {
|
|
67491
|
+
opts = await withConfigFile();
|
|
67492
|
+
wsNameForConfig = resolveWsNameForConfigFromFlags(opts);
|
|
67493
|
+
}
|
|
67470
67494
|
}
|
|
67471
67495
|
if (!wsNameForConfig) {
|
|
67472
67496
|
wsNameForConfig = inferWsNameFromProfile(opts, workspace);
|
|
@@ -67478,6 +67502,9 @@ async function pull(opts) {
|
|
|
67478
67502
|
const wsSpecificMerge = await mergeWsSpecificFromServer(workspace.workspaceId, specificItems);
|
|
67479
67503
|
specificItems = wsSpecificMerge.merged;
|
|
67480
67504
|
opts = mergeCliWithEffectiveOptions(originalCliOpts, effectiveOpts);
|
|
67505
|
+
if (opts.stateful) {
|
|
67506
|
+
await mkdir6(path13.join(process.cwd(), ".wmill"), { recursive: true });
|
|
67507
|
+
}
|
|
67481
67508
|
const codebases = await listSyncCodebases(opts);
|
|
67482
67509
|
info(colors.gray("Computing the files to update locally to match remote (taking wmill.yaml into account)"));
|
|
67483
67510
|
let resourceTypeToFormatExtension = {};
|
|
@@ -85011,6 +85038,8 @@ data:
|
|
|
85011
85038
|
tables:
|
|
85012
85039
|
- main/users # Table in public schema
|
|
85013
85040
|
- main/app_schema:items # Table in specific schema
|
|
85041
|
+
roles: # Optional: the role the app uses each datatable through
|
|
85042
|
+
main: analyst
|
|
85014
85043
|
\`\`\`
|
|
85015
85044
|
|
|
85016
85045
|
**Table reference formats:**
|
|
@@ -85018,6 +85047,8 @@ data:
|
|
|
85018
85047
|
- \`<datatable>/<table>\` — Specific table in public schema
|
|
85019
85048
|
- \`<datatable>/<schema>:<table>\` — Table in specific schema
|
|
85020
85049
|
|
|
85050
|
+
**Roles:** when a datatable is under roles, its queries run as a role, which only reaches what it was granted. \`roles\` records the role the app uses each datatable through; the app's code must pass the same role: \`wmill.datatable('main', { role: 'analyst' })\` in TypeScript, \`wmill.datatable('main', role='analyst')\` in Python. A datatable without an entry is used as its default role.
|
|
85051
|
+
|
|
85021
85052
|
## SQL Migrations (sql_to_apply/)
|
|
85022
85053
|
|
|
85023
85054
|
The \`sql_to_apply/\` folder is for creating/modifying database tables during development.
|