windmill-cli 1.767.0 → 1.768.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 +323 -17
- package/package.json +1 -1
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.768.0",
|
|
16788
16788
|
WITH_CREDENTIALS: true,
|
|
16789
16789
|
interceptors: {
|
|
16790
16790
|
request: new Interceptors,
|
|
@@ -17126,6 +17126,7 @@ __export(exports_services_gen, {
|
|
|
17126
17126
|
testAmqpConnection: () => testAmqpConnection,
|
|
17127
17127
|
syncNativeTriggers: () => syncNativeTriggers,
|
|
17128
17128
|
submitOnboardingData: () => submitOnboardingData,
|
|
17129
|
+
submitHubProject: () => submitHubProject,
|
|
17129
17130
|
storeRawScriptTemp: () => storeRawScriptTemp,
|
|
17130
17131
|
startMcpOauthPopup: () => startMcpOauthPopup,
|
|
17131
17132
|
star: () => star,
|
|
@@ -17228,6 +17229,19 @@ __export(exports_services_gen, {
|
|
|
17228
17229
|
rawScriptByHash: () => rawScriptByHash,
|
|
17229
17230
|
queryResourceTypes: () => queryResourceTypes,
|
|
17230
17231
|
queryHubScripts: () => queryHubScripts,
|
|
17232
|
+
publishHubTriggers: () => publishHubTriggers,
|
|
17233
|
+
publishHubScriptRecording: () => publishHubScriptRecording,
|
|
17234
|
+
publishHubScript: () => publishHubScript,
|
|
17235
|
+
publishHubResources: () => publishHubResources,
|
|
17236
|
+
publishHubResourceType: () => publishHubResourceType,
|
|
17237
|
+
publishHubRawAppEmbed: () => publishHubRawAppEmbed,
|
|
17238
|
+
publishHubRawApp: () => publishHubRawApp,
|
|
17239
|
+
publishHubPipelineRecording: () => publishHubPipelineRecording,
|
|
17240
|
+
publishHubMigrations: () => publishHubMigrations,
|
|
17241
|
+
publishHubFlowRecording: () => publishHubFlowRecording,
|
|
17242
|
+
publishHubFlow: () => publishHubFlow,
|
|
17243
|
+
publishHubDraft: () => publishHubDraft,
|
|
17244
|
+
publishHubApp: () => publishHubApp,
|
|
17231
17245
|
pruneVersions: () => pruneVersions,
|
|
17232
17246
|
previewSchedule: () => previewSchedule,
|
|
17233
17247
|
polarsConnectionSettingsV2: () => polarsConnectionSettingsV2,
|
|
@@ -17522,6 +17536,8 @@ __export(exports_services_gen, {
|
|
|
17522
17536
|
getHubScriptContentByPath: () => getHubScriptContentByPath,
|
|
17523
17537
|
getHubScriptByPath: () => getHubScriptByPath,
|
|
17524
17538
|
getHubRawAppById: () => getHubRawAppById,
|
|
17539
|
+
getHubProjectExport: () => getHubProjectExport,
|
|
17540
|
+
getHubProjectBySource: () => getHubProjectBySource,
|
|
17525
17541
|
getHubFlowById: () => getHubFlowById,
|
|
17526
17542
|
getHubAppById: () => getHubAppById,
|
|
17527
17543
|
getHttpTrigger: () => getHttpTrigger,
|
|
@@ -25901,6 +25917,214 @@ var backendVersion = () => {
|
|
|
25901
25917
|
state: data3.state
|
|
25902
25918
|
}
|
|
25903
25919
|
});
|
|
25920
|
+
}, publishHubDraft = (data3) => {
|
|
25921
|
+
return request(OpenAPI, {
|
|
25922
|
+
method: "POST",
|
|
25923
|
+
url: "/w/{workspace}/hub/publish_draft",
|
|
25924
|
+
path: {
|
|
25925
|
+
workspace: data3.workspace
|
|
25926
|
+
},
|
|
25927
|
+
query: {
|
|
25928
|
+
folder: data3.folder
|
|
25929
|
+
},
|
|
25930
|
+
body: data3.requestBody,
|
|
25931
|
+
mediaType: "application/json"
|
|
25932
|
+
});
|
|
25933
|
+
}, publishHubScript = (data3) => {
|
|
25934
|
+
return request(OpenAPI, {
|
|
25935
|
+
method: "POST",
|
|
25936
|
+
url: "/w/{workspace}/hub/scripts",
|
|
25937
|
+
path: {
|
|
25938
|
+
workspace: data3.workspace
|
|
25939
|
+
},
|
|
25940
|
+
query: {
|
|
25941
|
+
folder: data3.folder
|
|
25942
|
+
},
|
|
25943
|
+
body: data3.requestBody,
|
|
25944
|
+
mediaType: "application/json"
|
|
25945
|
+
});
|
|
25946
|
+
}, publishHubFlow = (data3) => {
|
|
25947
|
+
return request(OpenAPI, {
|
|
25948
|
+
method: "POST",
|
|
25949
|
+
url: "/w/{workspace}/hub/flows",
|
|
25950
|
+
path: {
|
|
25951
|
+
workspace: data3.workspace
|
|
25952
|
+
},
|
|
25953
|
+
query: {
|
|
25954
|
+
folder: data3.folder
|
|
25955
|
+
},
|
|
25956
|
+
body: data3.requestBody,
|
|
25957
|
+
mediaType: "application/json"
|
|
25958
|
+
});
|
|
25959
|
+
}, publishHubApp = (data3) => {
|
|
25960
|
+
return request(OpenAPI, {
|
|
25961
|
+
method: "POST",
|
|
25962
|
+
url: "/w/{workspace}/hub/apps",
|
|
25963
|
+
path: {
|
|
25964
|
+
workspace: data3.workspace
|
|
25965
|
+
},
|
|
25966
|
+
query: {
|
|
25967
|
+
folder: data3.folder
|
|
25968
|
+
},
|
|
25969
|
+
body: data3.requestBody,
|
|
25970
|
+
mediaType: "application/json"
|
|
25971
|
+
});
|
|
25972
|
+
}, publishHubRawApp = (data3) => {
|
|
25973
|
+
return request(OpenAPI, {
|
|
25974
|
+
method: "POST",
|
|
25975
|
+
url: "/w/{workspace}/hub/raw_apps",
|
|
25976
|
+
path: {
|
|
25977
|
+
workspace: data3.workspace
|
|
25978
|
+
},
|
|
25979
|
+
query: {
|
|
25980
|
+
folder: data3.folder
|
|
25981
|
+
},
|
|
25982
|
+
body: data3.requestBody,
|
|
25983
|
+
mediaType: "application/json"
|
|
25984
|
+
});
|
|
25985
|
+
}, publishHubRawAppEmbed = (data3) => {
|
|
25986
|
+
return request(OpenAPI, {
|
|
25987
|
+
method: "POST",
|
|
25988
|
+
url: "/w/{workspace}/hub/raw_apps/{id}/embed",
|
|
25989
|
+
path: {
|
|
25990
|
+
workspace: data3.workspace,
|
|
25991
|
+
id: data3.id
|
|
25992
|
+
},
|
|
25993
|
+
query: {
|
|
25994
|
+
folder: data3.folder
|
|
25995
|
+
},
|
|
25996
|
+
body: data3.requestBody,
|
|
25997
|
+
mediaType: "application/json"
|
|
25998
|
+
});
|
|
25999
|
+
}, publishHubScriptRecording = (data3) => {
|
|
26000
|
+
return request(OpenAPI, {
|
|
26001
|
+
method: "POST",
|
|
26002
|
+
url: "/w/{workspace}/hub/scripts/{ask_id}/recording",
|
|
26003
|
+
path: {
|
|
26004
|
+
workspace: data3.workspace,
|
|
26005
|
+
ask_id: data3.askId
|
|
26006
|
+
},
|
|
26007
|
+
query: {
|
|
26008
|
+
folder: data3.folder
|
|
26009
|
+
},
|
|
26010
|
+
body: data3.requestBody,
|
|
26011
|
+
mediaType: "application/json"
|
|
26012
|
+
});
|
|
26013
|
+
}, publishHubFlowRecording = (data3) => {
|
|
26014
|
+
return request(OpenAPI, {
|
|
26015
|
+
method: "POST",
|
|
26016
|
+
url: "/w/{workspace}/hub/flows/{flow_id}/recording",
|
|
26017
|
+
path: {
|
|
26018
|
+
workspace: data3.workspace,
|
|
26019
|
+
flow_id: data3.flowId
|
|
26020
|
+
},
|
|
26021
|
+
query: {
|
|
26022
|
+
folder: data3.folder
|
|
26023
|
+
},
|
|
26024
|
+
body: data3.requestBody,
|
|
26025
|
+
mediaType: "application/json"
|
|
26026
|
+
});
|
|
26027
|
+
}, publishHubPipelineRecording = (data3) => {
|
|
26028
|
+
return request(OpenAPI, {
|
|
26029
|
+
method: "POST",
|
|
26030
|
+
url: "/w/{workspace}/hub/projects/{slug}/pipeline_recording",
|
|
26031
|
+
path: {
|
|
26032
|
+
workspace: data3.workspace,
|
|
26033
|
+
slug: data3.slug
|
|
26034
|
+
},
|
|
26035
|
+
query: {
|
|
26036
|
+
folder: data3.folder
|
|
26037
|
+
},
|
|
26038
|
+
body: data3.requestBody,
|
|
26039
|
+
mediaType: "application/json"
|
|
26040
|
+
});
|
|
26041
|
+
}, publishHubResourceType = (data3) => {
|
|
26042
|
+
return request(OpenAPI, {
|
|
26043
|
+
method: "POST",
|
|
26044
|
+
url: "/w/{workspace}/hub/resource_types",
|
|
26045
|
+
path: {
|
|
26046
|
+
workspace: data3.workspace
|
|
26047
|
+
},
|
|
26048
|
+
query: {
|
|
26049
|
+
folder: data3.folder
|
|
26050
|
+
},
|
|
26051
|
+
body: data3.requestBody,
|
|
26052
|
+
mediaType: "application/json"
|
|
26053
|
+
});
|
|
26054
|
+
}, publishHubResources = (data3) => {
|
|
26055
|
+
return request(OpenAPI, {
|
|
26056
|
+
method: "POST",
|
|
26057
|
+
url: "/w/{workspace}/hub/resources",
|
|
26058
|
+
path: {
|
|
26059
|
+
workspace: data3.workspace
|
|
26060
|
+
},
|
|
26061
|
+
query: {
|
|
26062
|
+
folder: data3.folder
|
|
26063
|
+
},
|
|
26064
|
+
body: data3.requestBody,
|
|
26065
|
+
mediaType: "application/json"
|
|
26066
|
+
});
|
|
26067
|
+
}, publishHubTriggers = (data3) => {
|
|
26068
|
+
return request(OpenAPI, {
|
|
26069
|
+
method: "POST",
|
|
26070
|
+
url: "/w/{workspace}/hub/triggers",
|
|
26071
|
+
path: {
|
|
26072
|
+
workspace: data3.workspace
|
|
26073
|
+
},
|
|
26074
|
+
query: {
|
|
26075
|
+
folder: data3.folder
|
|
26076
|
+
},
|
|
26077
|
+
body: data3.requestBody,
|
|
26078
|
+
mediaType: "application/json"
|
|
26079
|
+
});
|
|
26080
|
+
}, publishHubMigrations = (data3) => {
|
|
26081
|
+
return request(OpenAPI, {
|
|
26082
|
+
method: "POST",
|
|
26083
|
+
url: "/w/{workspace}/hub/migrations",
|
|
26084
|
+
path: {
|
|
26085
|
+
workspace: data3.workspace
|
|
26086
|
+
},
|
|
26087
|
+
query: {
|
|
26088
|
+
folder: data3.folder
|
|
26089
|
+
},
|
|
26090
|
+
body: data3.requestBody,
|
|
26091
|
+
mediaType: "application/json"
|
|
26092
|
+
});
|
|
26093
|
+
}, getHubProjectExport = (data3) => {
|
|
26094
|
+
return request(OpenAPI, {
|
|
26095
|
+
method: "GET",
|
|
26096
|
+
url: "/w/{workspace}/hub/projects/{slug}/export",
|
|
26097
|
+
path: {
|
|
26098
|
+
workspace: data3.workspace,
|
|
26099
|
+
slug: data3.slug
|
|
26100
|
+
},
|
|
26101
|
+
query: {
|
|
26102
|
+
folder: data3.folder
|
|
26103
|
+
}
|
|
26104
|
+
});
|
|
26105
|
+
}, submitHubProject = (data3) => {
|
|
26106
|
+
return request(OpenAPI, {
|
|
26107
|
+
method: "POST",
|
|
26108
|
+
url: "/w/{workspace}/hub/projects/{slug}/submit",
|
|
26109
|
+
path: {
|
|
26110
|
+
workspace: data3.workspace,
|
|
26111
|
+
slug: data3.slug
|
|
26112
|
+
},
|
|
26113
|
+
query: {
|
|
26114
|
+
folder: data3.folder
|
|
26115
|
+
}
|
|
26116
|
+
});
|
|
26117
|
+
}, getHubProjectBySource = (data3) => {
|
|
26118
|
+
return request(OpenAPI, {
|
|
26119
|
+
method: "GET",
|
|
26120
|
+
url: "/w/{workspace}/hub/project",
|
|
26121
|
+
path: {
|
|
26122
|
+
workspace: data3.workspace
|
|
26123
|
+
},
|
|
26124
|
+
query: {
|
|
26125
|
+
folder: data3.folder
|
|
26126
|
+
}
|
|
26127
|
+
});
|
|
25904
26128
|
};
|
|
25905
26129
|
var init_services_gen = __esm(() => {
|
|
25906
26130
|
init_OpenAPI();
|
|
@@ -25980,6 +26204,7 @@ __export(exports_gen, {
|
|
|
25980
26204
|
testAmqpConnection: () => testAmqpConnection,
|
|
25981
26205
|
syncNativeTriggers: () => syncNativeTriggers,
|
|
25982
26206
|
submitOnboardingData: () => submitOnboardingData,
|
|
26207
|
+
submitHubProject: () => submitHubProject,
|
|
25983
26208
|
storeRawScriptTemp: () => storeRawScriptTemp,
|
|
25984
26209
|
startMcpOauthPopup: () => startMcpOauthPopup,
|
|
25985
26210
|
star: () => star,
|
|
@@ -26082,6 +26307,19 @@ __export(exports_gen, {
|
|
|
26082
26307
|
rawScriptByHash: () => rawScriptByHash,
|
|
26083
26308
|
queryResourceTypes: () => queryResourceTypes,
|
|
26084
26309
|
queryHubScripts: () => queryHubScripts,
|
|
26310
|
+
publishHubTriggers: () => publishHubTriggers,
|
|
26311
|
+
publishHubScriptRecording: () => publishHubScriptRecording,
|
|
26312
|
+
publishHubScript: () => publishHubScript,
|
|
26313
|
+
publishHubResources: () => publishHubResources,
|
|
26314
|
+
publishHubResourceType: () => publishHubResourceType,
|
|
26315
|
+
publishHubRawAppEmbed: () => publishHubRawAppEmbed,
|
|
26316
|
+
publishHubRawApp: () => publishHubRawApp,
|
|
26317
|
+
publishHubPipelineRecording: () => publishHubPipelineRecording,
|
|
26318
|
+
publishHubMigrations: () => publishHubMigrations,
|
|
26319
|
+
publishHubFlowRecording: () => publishHubFlowRecording,
|
|
26320
|
+
publishHubFlow: () => publishHubFlow,
|
|
26321
|
+
publishHubDraft: () => publishHubDraft,
|
|
26322
|
+
publishHubApp: () => publishHubApp,
|
|
26085
26323
|
pruneVersions: () => pruneVersions,
|
|
26086
26324
|
previewSchedule: () => previewSchedule,
|
|
26087
26325
|
polarsConnectionSettingsV2: () => polarsConnectionSettingsV2,
|
|
@@ -26376,6 +26614,8 @@ __export(exports_gen, {
|
|
|
26376
26614
|
getHubScriptContentByPath: () => getHubScriptContentByPath,
|
|
26377
26615
|
getHubScriptByPath: () => getHubScriptByPath,
|
|
26378
26616
|
getHubRawAppById: () => getHubRawAppById,
|
|
26617
|
+
getHubProjectExport: () => getHubProjectExport,
|
|
26618
|
+
getHubProjectBySource: () => getHubProjectBySource,
|
|
26379
26619
|
getHubFlowById: () => getHubFlowById,
|
|
26380
26620
|
getHubAppById: () => getHubAppById,
|
|
26381
26621
|
getHttpTrigger: () => getHttpTrigger,
|
|
@@ -26804,7 +27044,7 @@ var init_auth = __esm(async () => {
|
|
|
26804
27044
|
});
|
|
26805
27045
|
|
|
26806
27046
|
// src/core/constants.ts
|
|
26807
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
27047
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.768.0";
|
|
26808
27048
|
|
|
26809
27049
|
// src/utils/git.ts
|
|
26810
27050
|
var exports_git = {};
|
|
@@ -38442,6 +38682,9 @@ import * as fs9 from "node:fs";
|
|
|
38442
38682
|
import * as path6 from "node:path";
|
|
38443
38683
|
import process14 from "node:process";
|
|
38444
38684
|
import { spawn } from "node:child_process";
|
|
38685
|
+
function conditionsFor(svelte) {
|
|
38686
|
+
return svelte ? [...DEFAULT_BUILD_OPTIONS.conditions, "svelte"] : DEFAULT_BUILD_OPTIONS.conditions;
|
|
38687
|
+
}
|
|
38445
38688
|
function detectFrameworks(appDir) {
|
|
38446
38689
|
const packageJsonPath = path6.join(appDir, "package.json");
|
|
38447
38690
|
if (!fs9.existsSync(packageJsonPath)) {
|
|
@@ -38599,6 +38842,7 @@ async function createBundle(options = {}) {
|
|
|
38599
38842
|
}
|
|
38600
38843
|
const buildOptions = {
|
|
38601
38844
|
...DEFAULT_BUILD_OPTIONS,
|
|
38845
|
+
conditions: conditionsFor(frameworks.svelte),
|
|
38602
38846
|
entryPoints: [entryPoint],
|
|
38603
38847
|
outfile,
|
|
38604
38848
|
sourcemap,
|
|
@@ -38634,9 +38878,10 @@ async function createBundle(options = {}) {
|
|
|
38634
38878
|
await stopEsbuild();
|
|
38635
38879
|
}
|
|
38636
38880
|
}
|
|
38637
|
-
function getDevBuildOptions(entryPoint = "index.tsx") {
|
|
38881
|
+
function getDevBuildOptions(entryPoint = "index.tsx", svelte = false) {
|
|
38638
38882
|
return {
|
|
38639
38883
|
...DEFAULT_BUILD_OPTIONS,
|
|
38884
|
+
conditions: conditionsFor(svelte),
|
|
38640
38885
|
entryPoints: [entryPoint],
|
|
38641
38886
|
outfile: "dist/bundle.js",
|
|
38642
38887
|
sourcemap: true,
|
|
@@ -38661,6 +38906,7 @@ var init_bundle = __esm(async () => {
|
|
|
38661
38906
|
loader: {
|
|
38662
38907
|
".css": "css"
|
|
38663
38908
|
},
|
|
38909
|
+
conditions: ["style", "module"],
|
|
38664
38910
|
logLevel: "info",
|
|
38665
38911
|
write: true
|
|
38666
38912
|
};
|
|
@@ -65901,6 +66147,13 @@ import { sep as SEP6 } from "node:path";
|
|
|
65901
66147
|
import * as path9 from "node:path";
|
|
65902
66148
|
import fs10 from "node:fs";
|
|
65903
66149
|
import { execSync as execSync4 } from "node:child_process";
|
|
66150
|
+
function nonePositiveInt(v) {
|
|
66151
|
+
return v != null && v > 0 ? v : undefined;
|
|
66152
|
+
}
|
|
66153
|
+
function normalizeConcurrency(concurrentLimit, concurrencyTimeWindowS) {
|
|
66154
|
+
const limit = nonePositiveInt(concurrentLimit);
|
|
66155
|
+
return limit === undefined ? [undefined, undefined] : [limit, concurrencyTimeWindowS ?? undefined];
|
|
66156
|
+
}
|
|
65904
66157
|
function isAppInlineScriptPath2(filePath) {
|
|
65905
66158
|
return isAppInlineScriptPath(filePath);
|
|
65906
66159
|
}
|
|
@@ -66096,6 +66349,7 @@ async function handleFile(path10, workspace, alreadySynced, message, opts, rawWo
|
|
|
66096
66349
|
const scriptBasePath = moduleEntryPoint ? getScriptBasePathFromModulePath(path10) : path10.substring(0, path10.indexOf("."));
|
|
66097
66350
|
const moduleFolderPath = scriptBasePath + getModuleFolderSuffix();
|
|
66098
66351
|
const modules = await readModulesFromDisk(moduleFolderPath, opts?.defaultTs, moduleEntryPoint);
|
|
66352
|
+
const [normConcurrentLimit, normConcurrencyTimeWindowS] = normalizeConcurrency(typed?.concurrent_limit, typed?.concurrency_time_window_s);
|
|
66099
66353
|
const requestBodyCommon = {
|
|
66100
66354
|
content,
|
|
66101
66355
|
description: typed?.description ?? "",
|
|
@@ -66109,8 +66363,8 @@ async function handleFile(path10, workspace, alreadySynced, message, opts, rawWo
|
|
|
66109
66363
|
ws_error_handler_muted: typed?.ws_error_handler_muted,
|
|
66110
66364
|
dedicated_worker: typed?.dedicated_worker,
|
|
66111
66365
|
cache_ttl: typed?.cache_ttl,
|
|
66112
|
-
concurrency_time_window_s:
|
|
66113
|
-
concurrent_limit:
|
|
66366
|
+
concurrency_time_window_s: normConcurrencyTimeWindowS,
|
|
66367
|
+
concurrent_limit: normConcurrentLimit,
|
|
66114
66368
|
deployment_message: message,
|
|
66115
66369
|
restart_unless_cancelled: typed?.restart_unless_cancelled,
|
|
66116
66370
|
visible_to_runner_only: typed?.visible_to_runner_only,
|
|
@@ -66120,7 +66374,7 @@ async function handleFile(path10, workspace, alreadySynced, message, opts, rawWo
|
|
|
66120
66374
|
debounce_key: typed?.debounce_key,
|
|
66121
66375
|
debounce_delay_s: typed?.debounce_delay_s,
|
|
66122
66376
|
codebase: await codebase?.getDigest(forceTar),
|
|
66123
|
-
timeout: typed?.timeout,
|
|
66377
|
+
timeout: nonePositiveInt(typed?.timeout),
|
|
66124
66378
|
on_behalf_of_email: typed?.on_behalf_of_email,
|
|
66125
66379
|
envs: typed?.envs,
|
|
66126
66380
|
modules,
|
|
@@ -66138,7 +66392,7 @@ async function handleFile(path10, workspace, alreadySynced, message, opts, rawWo
|
|
|
66138
66392
|
if (remote) {
|
|
66139
66393
|
if (content === remote.content) {
|
|
66140
66394
|
if (typed == undefined || typed.description === remote.description && typed.summary === remote.summary && typed.kind == remote.kind && !remote.archived && (Array.isArray(remote?.lock) ? remote?.lock?.join(`
|
|
66141
|
-
`) : remote?.lock ?? "").trim() == (typed?.lock ?? "").trim() && deepEqual(typed.schema, remote.schema) && typed.tag == remote.tag && (typed.ws_error_handler_muted ?? false) == remote.ws_error_handler_muted && typed.dedicated_worker == remote.dedicated_worker && typed.cache_ttl == remote.cache_ttl &&
|
|
66395
|
+
`) : remote?.lock ?? "").trim() == (typed?.lock ?? "").trim() && deepEqual(typed.schema, remote.schema) && typed.tag == remote.tag && (typed.ws_error_handler_muted ?? false) == remote.ws_error_handler_muted && typed.dedicated_worker == remote.dedicated_worker && typed.cache_ttl == remote.cache_ttl && normConcurrencyTimeWindowS == normalizeConcurrency(remote.concurrent_limit, remote.concurrency_time_window_s)[1] && normConcurrentLimit == normalizeConcurrency(remote.concurrent_limit)[0] && Boolean(typed.restart_unless_cancelled) == Boolean(remote.restart_unless_cancelled) && Boolean(typed.visible_to_runner_only) == Boolean(remote.visible_to_runner_only) && Boolean(typed.has_preprocessor) == Boolean(remote.has_preprocessor) && typed.priority == Boolean(remote.priority) && nonePositiveInt(typed.timeout) == nonePositiveInt(remote.timeout) && typed.concurrency_key == remote["concurrency_key"] && typed.debounce_key == remote["debounce_key"] && typed.debounce_delay_s == remote["debounce_delay_s"] && typed.codebase == remote.codebase && (hasOnBehalfOf ? true : typed.on_behalf_of_email == remote.on_behalf_of_email) && deepEqual(typed.envs, remote.envs) && deepEqual(modules ?? null, remote.modules ?? null)) {
|
|
66142
66396
|
info(colors.green(`Script ${remotePath} is up to date`));
|
|
66143
66397
|
await applyExtraPermsDiff(workspaceId, "script", remotePath.replaceAll(SEP6, "/"), typed?.extra_perms, remote?.extra_perms);
|
|
66144
66398
|
return true;
|
|
@@ -67553,10 +67807,10 @@ async function readDirRecursive(dir, rel = "", out = {}) {
|
|
|
67553
67807
|
}
|
|
67554
67808
|
return out;
|
|
67555
67809
|
}
|
|
67556
|
-
async function
|
|
67810
|
+
async function diffSharedUi(workspace) {
|
|
67557
67811
|
const localDir = path11.join(process.cwd(), SHARED_UI_DIR);
|
|
67558
67812
|
if (!fs11.existsSync(localDir)) {
|
|
67559
|
-
return
|
|
67813
|
+
return [];
|
|
67560
67814
|
}
|
|
67561
67815
|
const files = await readDirRecursive(localDir);
|
|
67562
67816
|
let remote = {};
|
|
@@ -67564,10 +67818,33 @@ async function pushSharedUi(workspace) {
|
|
|
67564
67818
|
const got = await getSharedUi({ workspace });
|
|
67565
67819
|
remote = got.files ?? {};
|
|
67566
67820
|
} catch {}
|
|
67567
|
-
|
|
67821
|
+
const changes = [];
|
|
67822
|
+
for (const [rel, content] of Object.entries(files)) {
|
|
67823
|
+
const p = `${SHARED_UI_DIR}/${rel}`;
|
|
67824
|
+
if (!Object.hasOwn(remote, rel)) {
|
|
67825
|
+
changes.push({ type: "added", path: p });
|
|
67826
|
+
} else if (remote[rel] !== content) {
|
|
67827
|
+
changes.push({ type: "edited", path: p, before: remote[rel], after: content });
|
|
67828
|
+
}
|
|
67829
|
+
}
|
|
67830
|
+
for (const rel of Object.keys(remote)) {
|
|
67831
|
+
if (!Object.hasOwn(files, rel)) {
|
|
67832
|
+
changes.push({ type: "deleted", path: `${SHARED_UI_DIR}/${rel}` });
|
|
67833
|
+
}
|
|
67834
|
+
}
|
|
67835
|
+
return changes;
|
|
67836
|
+
}
|
|
67837
|
+
async function pushSharedUi(workspace) {
|
|
67838
|
+
const localDir = path11.join(process.cwd(), SHARED_UI_DIR);
|
|
67839
|
+
if (!fs11.existsSync(localDir)) {
|
|
67840
|
+
return false;
|
|
67841
|
+
}
|
|
67842
|
+
const diff2 = await diffSharedUi(workspace);
|
|
67843
|
+
if (diff2.length === 0) {
|
|
67568
67844
|
info(colors.gray("Shared UI folder up to date"));
|
|
67569
67845
|
return false;
|
|
67570
67846
|
}
|
|
67847
|
+
const files = await readDirRecursive(localDir);
|
|
67571
67848
|
await updateSharedUi({
|
|
67572
67849
|
workspace,
|
|
67573
67850
|
requestBody: { files }
|
|
@@ -70037,6 +70314,8 @@ async function gitDeploy(opts) {
|
|
|
70037
70314
|
});
|
|
70038
70315
|
}
|
|
70039
70316
|
function changeTypeLabel(p) {
|
|
70317
|
+
if (p === "ui" || p.startsWith("ui/"))
|
|
70318
|
+
return "shared UI ";
|
|
70040
70319
|
const t = getTypeStrFromPath(p);
|
|
70041
70320
|
return t === "datatable_migration" ? "" : `${t} `;
|
|
70042
70321
|
}
|
|
@@ -70058,9 +70337,9 @@ function prettyChanges(changes, specificItems, branchOverride, folderDefaultAnno
|
|
|
70058
70337
|
} else if (change.name === "deleted") {
|
|
70059
70338
|
info(colors.red(`- ${changeTypeLabel(change.path)}` + displayPath + colors.gray(wsNote)));
|
|
70060
70339
|
} else if (change.name === "edited") {
|
|
70061
|
-
const changeType = getTypeStrFromPath(change.path);
|
|
70062
70340
|
info(colors.yellow(`~ ${changeTypeLabel(change.path)}` + displayPath + colors.gray(wsNote) + (change.codebase ? ` (codebase changed)` : "")));
|
|
70063
70341
|
if (change.before != change.after) {
|
|
70342
|
+
const changeType = change.path === "ui" || change.path.startsWith("ui/") ? "shared_ui" : getTypeStrFromPath(change.path);
|
|
70064
70343
|
if (changeType === "encryption_key") {
|
|
70065
70344
|
showDiff(redactEncryptionKey(change.before), redactEncryptionKey(change.after));
|
|
70066
70345
|
} else if (change.path.endsWith(".yaml")) {
|
|
@@ -70346,6 +70625,26 @@ Push aborted: ${lockIssues.length} script(s) missing locks.`));
|
|
|
70346
70625
|
info("");
|
|
70347
70626
|
}
|
|
70348
70627
|
await fetchRemoteVersion(workspace);
|
|
70628
|
+
if (opts.dryRun) {
|
|
70629
|
+
try {
|
|
70630
|
+
for (const c of await diffSharedUi(workspace.workspaceId)) {
|
|
70631
|
+
if (c.type === "added") {
|
|
70632
|
+
changes.push({ name: "added", path: c.path, content: "" });
|
|
70633
|
+
} else if (c.type === "deleted") {
|
|
70634
|
+
changes.push({ name: "deleted", path: c.path });
|
|
70635
|
+
} else {
|
|
70636
|
+
changes.push({
|
|
70637
|
+
name: "edited",
|
|
70638
|
+
path: c.path,
|
|
70639
|
+
before: c.before,
|
|
70640
|
+
after: c.after
|
|
70641
|
+
});
|
|
70642
|
+
}
|
|
70643
|
+
}
|
|
70644
|
+
} catch (e) {
|
|
70645
|
+
warn(`Failed to compute shared UI diff for dry-run preview: ${e}`);
|
|
70646
|
+
}
|
|
70647
|
+
}
|
|
70349
70648
|
info(`remote (${workspace.name}) <- local: ${changes.length} changes to apply`);
|
|
70350
70649
|
const missingFolders = [];
|
|
70351
70650
|
if (changes.length > 0) {
|
|
@@ -71031,13 +71330,20 @@ Run 'wmill folder add-missing' to create them locally, then push again.`;
|
|
|
71031
71330
|
Done! All ${changes.length} changes pushed to the remote workspace ${workspace.workspaceId} named ${workspace.name} (${(performance.now() - start).toFixed(0)}ms)`));
|
|
71032
71331
|
}
|
|
71033
71332
|
} else {
|
|
71034
|
-
|
|
71035
|
-
|
|
71036
|
-
|
|
71037
|
-
|
|
71333
|
+
let sharedUiPushed = false;
|
|
71334
|
+
if (!opts.dryRun) {
|
|
71335
|
+
try {
|
|
71336
|
+
sharedUiPushed = await pushSharedUi(workspace.workspaceId);
|
|
71337
|
+
} catch (e) {
|
|
71338
|
+
warn(`Failed to push shared UI folder: ${e}`);
|
|
71339
|
+
}
|
|
71038
71340
|
}
|
|
71039
71341
|
if (opts.jsonOutput) {
|
|
71040
|
-
console.log(JSON.stringify({
|
|
71342
|
+
console.log(JSON.stringify({
|
|
71343
|
+
success: true,
|
|
71344
|
+
message: sharedUiPushed ? "Pushed shared UI changes" : "No changes to push",
|
|
71345
|
+
total: 0
|
|
71346
|
+
}, null, 2));
|
|
71041
71347
|
}
|
|
71042
71348
|
}
|
|
71043
71349
|
}
|
|
@@ -73399,7 +73705,7 @@ data: reload
|
|
|
73399
73705
|
`);
|
|
73400
73706
|
});
|
|
73401
73707
|
}
|
|
73402
|
-
const buildOptions = getDevBuildOptions(entryPoint);
|
|
73708
|
+
const buildOptions = getDevBuildOptions(entryPoint, frameworks.svelte);
|
|
73403
73709
|
const frameworkPlugins = await createFrameworkPlugins(appDir);
|
|
73404
73710
|
const wmillPlugin = {
|
|
73405
73711
|
name: "wmill-virtual",
|