windmill-cli 1.706.1 → 1.707.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 +176 -23
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16772,7 +16772,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16772
16772
|
PASSWORD: undefined,
|
|
16773
16773
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16774
16774
|
USERNAME: undefined,
|
|
16775
|
-
VERSION: "1.
|
|
16775
|
+
VERSION: "1.707.0",
|
|
16776
16776
|
WITH_CREDENTIALS: true,
|
|
16777
16777
|
interceptors: {
|
|
16778
16778
|
request: new Interceptors,
|
|
@@ -17086,6 +17086,7 @@ __export(exports_services_gen, {
|
|
|
17086
17086
|
updateAppHistory: () => updateAppHistory,
|
|
17087
17087
|
updateApp: () => updateApp,
|
|
17088
17088
|
unstar: () => unstar,
|
|
17089
|
+
unassignGhesInstallation: () => unassignGhesInstallation,
|
|
17089
17090
|
unarchiveWorkspace: () => unarchiveWorkspace,
|
|
17090
17091
|
toggleWorkspaceErrorHandlerForScript: () => toggleWorkspaceErrorHandlerForScript,
|
|
17091
17092
|
toggleWorkspaceErrorHandlerForFlow: () => toggleWorkspaceErrorHandlerForFlow,
|
|
@@ -17613,6 +17614,7 @@ __export(exports_services_gen, {
|
|
|
17613
17614
|
dropCustomInstanceDb: () => dropCustomInstanceDb,
|
|
17614
17615
|
downloadOpenapiSpec: () => downloadOpenapiSpec,
|
|
17615
17616
|
discoverMcpOauth: () => discoverMcpOauth,
|
|
17617
|
+
discoverGhesInstallations: () => discoverGhesInstallations,
|
|
17616
17618
|
disconnectTeams: () => disconnectTeams,
|
|
17617
17619
|
disconnectSlack: () => disconnectSlack,
|
|
17618
17620
|
disconnectAccount: () => disconnectAccount,
|
|
@@ -17749,6 +17751,7 @@ __export(exports_services_gen, {
|
|
|
17749
17751
|
batchReRunJobs: () => batchReRunJobs,
|
|
17750
17752
|
backendVersion: () => backendVersion,
|
|
17751
17753
|
backendUptodate: () => backendUptodate,
|
|
17754
|
+
assignGhesInstallation: () => assignGhesInstallation,
|
|
17752
17755
|
archiveWorkspaceDependencies: () => archiveWorkspaceDependencies,
|
|
17753
17756
|
archiveWorkspace: () => archiveWorkspace,
|
|
17754
17757
|
archiveScriptByPath: () => archiveScriptByPath,
|
|
@@ -18548,6 +18551,27 @@ var backendVersion = () => {
|
|
|
18548
18551
|
method: "GET",
|
|
18549
18552
|
url: "/github_app/ghes_config"
|
|
18550
18553
|
});
|
|
18554
|
+
}, discoverGhesInstallations = () => {
|
|
18555
|
+
return request(OpenAPI, {
|
|
18556
|
+
method: "GET",
|
|
18557
|
+
url: "/github_app/ghes/discover"
|
|
18558
|
+
});
|
|
18559
|
+
}, assignGhesInstallation = (data3) => {
|
|
18560
|
+
return request(OpenAPI, {
|
|
18561
|
+
method: "POST",
|
|
18562
|
+
url: "/github_app/ghes/assign",
|
|
18563
|
+
body: data3.requestBody,
|
|
18564
|
+
mediaType: "application/json"
|
|
18565
|
+
});
|
|
18566
|
+
}, unassignGhesInstallation = (data3) => {
|
|
18567
|
+
return request(OpenAPI, {
|
|
18568
|
+
method: "DELETE",
|
|
18569
|
+
url: "/github_app/ghes/assign/{workspace_id}/{installation_id}",
|
|
18570
|
+
path: {
|
|
18571
|
+
workspace_id: data3.workspaceId,
|
|
18572
|
+
installation_id: data3.installationId
|
|
18573
|
+
}
|
|
18574
|
+
});
|
|
18551
18575
|
}, acceptInvite = (data3) => {
|
|
18552
18576
|
return request(OpenAPI, {
|
|
18553
18577
|
method: "POST",
|
|
@@ -44690,7 +44714,7 @@ var require_zipEntries = __commonJS((exports, module) => {
|
|
|
44690
44714
|
if (this.centralDirRecords !== this.files.length) {
|
|
44691
44715
|
if (this.centralDirRecords !== 0 && this.files.length === 0) {
|
|
44692
44716
|
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
44693
|
-
}
|
|
44717
|
+
}
|
|
44694
44718
|
}
|
|
44695
44719
|
},
|
|
44696
44720
|
readEndOfCentral: function() {
|
|
@@ -55620,7 +55644,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
55620
55644
|
var error2 = generateError(state, message);
|
|
55621
55645
|
if (state.onWarning) {
|
|
55622
55646
|
state.onWarning.call(null, error2);
|
|
55623
|
-
}
|
|
55647
|
+
}
|
|
55624
55648
|
}
|
|
55625
55649
|
var directiveHandlers = {
|
|
55626
55650
|
YAML: function handleYamlDirective(state, name, args) {
|
|
@@ -56158,7 +56182,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
56158
56182
|
} else if (detectedIndent) {
|
|
56159
56183
|
sc.value += common3.repeat(`
|
|
56160
56184
|
`, emptyLines + 1);
|
|
56161
|
-
}
|
|
56185
|
+
}
|
|
56162
56186
|
detectedIndent = true;
|
|
56163
56187
|
emptyLines = 0;
|
|
56164
56188
|
captureStart = state.position;
|
|
@@ -67523,7 +67547,7 @@ Both local and remote have been modified.`));
|
|
|
67523
67547
|
}
|
|
67524
67548
|
for (const change of tracker.rawApps) {
|
|
67525
67549
|
info(`Updating lock metadata for raw app ${change}`);
|
|
67526
|
-
await generateAppLocksInternal(change, true,
|
|
67550
|
+
await generateAppLocksInternal(change, true, false, workspace, opts, true, true);
|
|
67527
67551
|
}
|
|
67528
67552
|
for (const change of tracker.apps) {
|
|
67529
67553
|
info(`Updating lock metadata for app ${change}`);
|
|
@@ -77778,6 +77802,8 @@ When the user reports a script or flow failure, is investigating unexpected outp
|
|
|
77778
77802
|
- \`wmill job logs <id>\` — stdout/stderr; for flows, aggregates every step's logs
|
|
77779
77803
|
- \`wmill job result <id>\` — JSON result of a completed job
|
|
77780
77804
|
- \`wmill job cancel <id>\` — stop a running or queued job
|
|
77805
|
+
- \`wmill job rerun <id>\` — re-run a completed job with the same args (single-job equivalent of the frontend "rerun" button)
|
|
77806
|
+
- \`wmill job restart <id> --step <step-id> [--iteration <n>]\` — restart a completed flow at a top-level step (for nested-container restart, use the UI)
|
|
77781
77807
|
|
|
77782
77808
|
For flow failures, start with \`wmill job get <id>\` to identify the failing step and its sub-job ID, then \`wmill job logs <sub-job-id>\` to drill in.
|
|
77783
77809
|
|
|
@@ -78390,9 +78416,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
78390
78416
|
/**
|
|
78391
78417
|
* Get S3 client settings from a resource or workspace default
|
|
78392
78418
|
* @param s3_resource_path - Path to S3 resource (uses workspace default if undefined)
|
|
78419
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
78393
78420
|
* @returns S3 client configuration settings
|
|
78394
78421
|
*/
|
|
78395
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
78422
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
78396
78423
|
|
|
78397
78424
|
/**
|
|
78398
78425
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -78403,8 +78430,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
78403
78430
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
78404
78431
|
* console.log(text);
|
|
78405
78432
|
* \`\`\`
|
|
78433
|
+
*
|
|
78434
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
78406
78435
|
*/
|
|
78407
|
-
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
78436
|
+
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
78408
78437
|
|
|
78409
78438
|
/**
|
|
78410
78439
|
* Load the content of a file stored in S3 as a stream. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -78414,8 +78443,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
78414
78443
|
* // if the content is plain text, the blob can be read directly:
|
|
78415
78444
|
* console.log(await fileContentBlob.text());
|
|
78416
78445
|
* \`\`\`
|
|
78446
|
+
*
|
|
78447
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
78417
78448
|
*/
|
|
78418
|
-
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Blob | undefined>
|
|
78449
|
+
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Blob | undefined>
|
|
78419
78450
|
|
|
78420
78451
|
/**
|
|
78421
78452
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -78425,8 +78456,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
78425
78456
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
78426
78457
|
* console.log(fileContentAsUtf8Str)
|
|
78427
78458
|
* \`\`\`
|
|
78459
|
+
*
|
|
78460
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
78428
78461
|
*/
|
|
78429
|
-
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined): Promise<S3Object>
|
|
78462
|
+
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined, workspace: string | undefined = undefined): Promise<S3Object>
|
|
78463
|
+
|
|
78464
|
+
/**
|
|
78465
|
+
* Permanently delete a file from S3 by key.
|
|
78466
|
+
*
|
|
78467
|
+
* \`\`\`typescript
|
|
78468
|
+
* await wmill.deleteS3File({ s3: "path/to/file.txt" })
|
|
78469
|
+
* \`\`\`
|
|
78470
|
+
*
|
|
78471
|
+
* @param s3object - S3 object identifying the file to delete (must have \`s3\` set)
|
|
78472
|
+
* @param workspace - Workspace to delete from (defaults to the \`WM_WORKSPACE\` env var)
|
|
78473
|
+
*/
|
|
78474
|
+
async deleteS3File(s3object: S3Object, workspace: string | undefined = undefined): Promise<void>
|
|
78430
78475
|
|
|
78431
78476
|
/**
|
|
78432
78477
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -79081,9 +79126,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
79081
79126
|
/**
|
|
79082
79127
|
* Get S3 client settings from a resource or workspace default
|
|
79083
79128
|
* @param s3_resource_path - Path to S3 resource (uses workspace default if undefined)
|
|
79129
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79084
79130
|
* @returns S3 client configuration settings
|
|
79085
79131
|
*/
|
|
79086
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
79132
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
79087
79133
|
|
|
79088
79134
|
/**
|
|
79089
79135
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79094,8 +79140,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
79094
79140
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
79095
79141
|
* console.log(text);
|
|
79096
79142
|
* \`\`\`
|
|
79143
|
+
*
|
|
79144
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79097
79145
|
*/
|
|
79098
|
-
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
79146
|
+
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
79099
79147
|
|
|
79100
79148
|
/**
|
|
79101
79149
|
* Load the content of a file stored in S3 as a stream. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79105,8 +79153,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
79105
79153
|
* // if the content is plain text, the blob can be read directly:
|
|
79106
79154
|
* console.log(await fileContentBlob.text());
|
|
79107
79155
|
* \`\`\`
|
|
79156
|
+
*
|
|
79157
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79108
79158
|
*/
|
|
79109
|
-
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Blob | undefined>
|
|
79159
|
+
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Blob | undefined>
|
|
79110
79160
|
|
|
79111
79161
|
/**
|
|
79112
79162
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79116,8 +79166,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
79116
79166
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
79117
79167
|
* console.log(fileContentAsUtf8Str)
|
|
79118
79168
|
* \`\`\`
|
|
79169
|
+
*
|
|
79170
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
79171
|
+
*/
|
|
79172
|
+
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined, workspace: string | undefined = undefined): Promise<S3Object>
|
|
79173
|
+
|
|
79174
|
+
/**
|
|
79175
|
+
* Permanently delete a file from S3 by key.
|
|
79176
|
+
*
|
|
79177
|
+
* \`\`\`typescript
|
|
79178
|
+
* await wmill.deleteS3File({ s3: "path/to/file.txt" })
|
|
79179
|
+
* \`\`\`
|
|
79180
|
+
*
|
|
79181
|
+
* @param s3object - S3 object identifying the file to delete (must have \`s3\` set)
|
|
79182
|
+
* @param workspace - Workspace to delete from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79119
79183
|
*/
|
|
79120
|
-
async
|
|
79184
|
+
async deleteS3File(s3object: S3Object, workspace: string | undefined = undefined): Promise<void>
|
|
79121
79185
|
|
|
79122
79186
|
/**
|
|
79123
79187
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -79860,9 +79924,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
79860
79924
|
/**
|
|
79861
79925
|
* Get S3 client settings from a resource or workspace default
|
|
79862
79926
|
* @param s3_resource_path - Path to S3 resource (uses workspace default if undefined)
|
|
79927
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79863
79928
|
* @returns S3 client configuration settings
|
|
79864
79929
|
*/
|
|
79865
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
79930
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
79866
79931
|
|
|
79867
79932
|
/**
|
|
79868
79933
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79873,8 +79938,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
79873
79938
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
79874
79939
|
* console.log(text);
|
|
79875
79940
|
* \`\`\`
|
|
79941
|
+
*
|
|
79942
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79876
79943
|
*/
|
|
79877
|
-
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
79944
|
+
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
79878
79945
|
|
|
79879
79946
|
/**
|
|
79880
79947
|
* Load the content of a file stored in S3 as a stream. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79884,8 +79951,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
79884
79951
|
* // if the content is plain text, the blob can be read directly:
|
|
79885
79952
|
* console.log(await fileContentBlob.text());
|
|
79886
79953
|
* \`\`\`
|
|
79954
|
+
*
|
|
79955
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79887
79956
|
*/
|
|
79888
|
-
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Blob | undefined>
|
|
79957
|
+
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Blob | undefined>
|
|
79889
79958
|
|
|
79890
79959
|
/**
|
|
79891
79960
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79895,8 +79964,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
79895
79964
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
79896
79965
|
* console.log(fileContentAsUtf8Str)
|
|
79897
79966
|
* \`\`\`
|
|
79967
|
+
*
|
|
79968
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
79969
|
+
*/
|
|
79970
|
+
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined, workspace: string | undefined = undefined): Promise<S3Object>
|
|
79971
|
+
|
|
79972
|
+
/**
|
|
79973
|
+
* Permanently delete a file from S3 by key.
|
|
79974
|
+
*
|
|
79975
|
+
* \`\`\`typescript
|
|
79976
|
+
* await wmill.deleteS3File({ s3: "path/to/file.txt" })
|
|
79977
|
+
* \`\`\`
|
|
79978
|
+
*
|
|
79979
|
+
* @param s3object - S3 object identifying the file to delete (must have \`s3\` set)
|
|
79980
|
+
* @param workspace - Workspace to delete from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79898
79981
|
*/
|
|
79899
|
-
async
|
|
79982
|
+
async deleteS3File(s3object: S3Object, workspace: string | undefined = undefined): Promise<void>
|
|
79900
79983
|
|
|
79901
79984
|
/**
|
|
79902
79985
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -81062,9 +81145,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
81062
81145
|
/**
|
|
81063
81146
|
* Get S3 client settings from a resource or workspace default
|
|
81064
81147
|
* @param s3_resource_path - Path to S3 resource (uses workspace default if undefined)
|
|
81148
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
81065
81149
|
* @returns S3 client configuration settings
|
|
81066
81150
|
*/
|
|
81067
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
81151
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
81068
81152
|
|
|
81069
81153
|
/**
|
|
81070
81154
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -81075,8 +81159,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
81075
81159
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
81076
81160
|
* console.log(text);
|
|
81077
81161
|
* \`\`\`
|
|
81162
|
+
*
|
|
81163
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
81078
81164
|
*/
|
|
81079
|
-
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
81165
|
+
async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Uint8Array | undefined>
|
|
81080
81166
|
|
|
81081
81167
|
/**
|
|
81082
81168
|
* Load the content of a file stored in S3 as a stream. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -81086,8 +81172,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
81086
81172
|
* // if the content is plain text, the blob can be read directly:
|
|
81087
81173
|
* console.log(await fileContentBlob.text());
|
|
81088
81174
|
* \`\`\`
|
|
81175
|
+
*
|
|
81176
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
81089
81177
|
*/
|
|
81090
|
-
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined): Promise<Blob | undefined>
|
|
81178
|
+
async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined = undefined, workspace: string | undefined = undefined): Promise<Blob | undefined>
|
|
81091
81179
|
|
|
81092
81180
|
/**
|
|
81093
81181
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -81097,8 +81185,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
81097
81185
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
81098
81186
|
* console.log(fileContentAsUtf8Str)
|
|
81099
81187
|
* \`\`\`
|
|
81188
|
+
*
|
|
81189
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
81100
81190
|
*/
|
|
81101
|
-
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined): Promise<S3Object>
|
|
81191
|
+
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined, workspace: string | undefined = undefined): Promise<S3Object>
|
|
81192
|
+
|
|
81193
|
+
/**
|
|
81194
|
+
* Permanently delete a file from S3 by key.
|
|
81195
|
+
*
|
|
81196
|
+
* \`\`\`typescript
|
|
81197
|
+
* await wmill.deleteS3File({ s3: "path/to/file.txt" })
|
|
81198
|
+
* \`\`\`
|
|
81199
|
+
*
|
|
81200
|
+
* @param s3object - S3 object identifying the file to delete (must have \`s3\` set)
|
|
81201
|
+
* @param workspace - Workspace to delete from (defaults to the \`WM_WORKSPACE\` env var)
|
|
81202
|
+
*/
|
|
81203
|
+
async deleteS3File(s3object: S3Object, workspace: string | undefined = undefined): Promise<void>
|
|
81102
81204
|
|
|
81103
81205
|
/**
|
|
81104
81206
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -84733,6 +84835,10 @@ Manage jobs (list, inspect, cancel)
|
|
|
84733
84835
|
- \`job logs <id:string>\` - Get job logs. For flows: aggregates all step logs
|
|
84734
84836
|
- \`job cancel <id:string>\` - Cancel a running or queued job
|
|
84735
84837
|
- \`--reason <reason:string>\` - Reason for cancellation
|
|
84838
|
+
- \`job rerun <id:string>\` - Re-run a completed job with the same args. Prints the new job UUID on stdout.
|
|
84839
|
+
- \`job restart <id:string>\` - Restart a completed flow at a given top-level step. Prints the new flow job UUID on stdout.
|
|
84840
|
+
- \`--step <stepId:string>\` - Top-level step id to restart the flow from
|
|
84841
|
+
- \`--iteration <n:number>\` - For a top-level branchall or for-loop step, the iteration to restart at
|
|
84736
84842
|
|
|
84737
84843
|
### jobs
|
|
84738
84844
|
|
|
@@ -90709,8 +90815,55 @@ async function cancel(opts, id) {
|
|
|
90709
90815
|
});
|
|
90710
90816
|
info(colors.green(`Job ${id} canceled.`));
|
|
90711
90817
|
}
|
|
90818
|
+
async function rerun(opts, id) {
|
|
90819
|
+
setSilent(true);
|
|
90820
|
+
opts = await mergeConfigWithConfigFile(opts);
|
|
90821
|
+
const workspace = await resolveWorkspace(opts);
|
|
90822
|
+
await requireLogin(opts);
|
|
90823
|
+
const response = await batchReRunJobs({
|
|
90824
|
+
workspace: workspace.workspaceId,
|
|
90825
|
+
requestBody: {
|
|
90826
|
+
job_ids: [id],
|
|
90827
|
+
script_options_by_path: {},
|
|
90828
|
+
flow_options_by_path: {}
|
|
90829
|
+
}
|
|
90830
|
+
});
|
|
90831
|
+
const newIds = [];
|
|
90832
|
+
const errorLines = [];
|
|
90833
|
+
for (const line of String(response).split(`
|
|
90834
|
+
`)) {
|
|
90835
|
+
const trimmed = line.trim();
|
|
90836
|
+
if (!trimmed)
|
|
90837
|
+
continue;
|
|
90838
|
+
if (trimmed.startsWith("Error:"))
|
|
90839
|
+
errorLines.push(trimmed);
|
|
90840
|
+
else
|
|
90841
|
+
newIds.push(trimmed);
|
|
90842
|
+
}
|
|
90843
|
+
for (const err of errorLines)
|
|
90844
|
+
error(err);
|
|
90845
|
+
if (newIds.length === 0) {
|
|
90846
|
+
throw new Error(`Failed to re-run job ${id}.`);
|
|
90847
|
+
}
|
|
90848
|
+
console.log(newIds[0]);
|
|
90849
|
+
}
|
|
90850
|
+
async function restart(opts, id) {
|
|
90851
|
+
setSilent(true);
|
|
90852
|
+
opts = await mergeConfigWithConfigFile(opts);
|
|
90853
|
+
const workspace = await resolveWorkspace(opts);
|
|
90854
|
+
await requireLogin(opts);
|
|
90855
|
+
const newId = await restartFlowAtStep({
|
|
90856
|
+
workspace: workspace.workspaceId,
|
|
90857
|
+
id,
|
|
90858
|
+
requestBody: {
|
|
90859
|
+
step_id: opts.step,
|
|
90860
|
+
branch_or_iteration_n: opts.iteration
|
|
90861
|
+
}
|
|
90862
|
+
});
|
|
90863
|
+
console.log(newId);
|
|
90864
|
+
}
|
|
90712
90865
|
var listOptions = (cmd) => cmd.option("--json", "Output as JSON (for piping to jq)").option("--script-path <scriptPath:string>", "Filter by exact script/flow path").option("--created-by <createdBy:string>", "Filter by creator username").option("--running", "Show only running jobs").option("--failed", "Show only failed jobs").option("--success <success:boolean>", "Filter by success status (true/false)").option("--limit <limit:number>", "Number of jobs to return (default 30, max 100)").option("--job-kinds <jobKinds:string>", "Filter by job kinds (default: script,flow,singlestepflow)").option("--label <label:string>", "Filter by job label").option("--all", "Include sub-jobs (flow steps). By default only top-level jobs are shown").option("--parent <parent:string>", "Filter by parent job ID (show sub-jobs of a specific flow)").option("--is-flow-step", "Show only flow step jobs");
|
|
90713
|
-
var command33 = listOptions(new Command().description("Manage jobs (list, inspect, cancel)")).action(list13).command("list", listOptions(new Command().description("List recent jobs"))).action(list13).command("get", "Get job details. For flows: shows step tree with sub-job IDs").arguments("<id:string>").option("--json", "Output as JSON (for piping to jq)").action(get10).command("result", "Get the result of a completed job (machine-friendly)").arguments("<id:string>").action(result).command("logs", "Get job logs. For flows: aggregates all step logs").arguments("<id:string>").action(logs).command("cancel", "Cancel a running or queued job").arguments("<id:string>").option("--reason <reason:string>", "Reason for cancellation").action(cancel);
|
|
90866
|
+
var command33 = listOptions(new Command().description("Manage jobs (list, inspect, cancel)")).action(list13).command("list", listOptions(new Command().description("List recent jobs"))).action(list13).command("get", "Get job details. For flows: shows step tree with sub-job IDs").arguments("<id:string>").option("--json", "Output as JSON (for piping to jq)").action(get10).command("result", "Get the result of a completed job (machine-friendly)").arguments("<id:string>").action(result).command("logs", "Get job logs. For flows: aggregates all step logs").arguments("<id:string>").action(logs).command("cancel", "Cancel a running or queued job").arguments("<id:string>").option("--reason <reason:string>", "Reason for cancellation").action(cancel).command("rerun", "Re-run a completed job with the same args. Prints the new job UUID on stdout.").arguments("<id:string>").action(rerun).command("restart", "Restart a completed flow at a given top-level step. Prints the new flow job UUID on stdout.").arguments("<id:string>").option("--step <stepId:string>", "Top-level step id to restart the flow from", { required: true }).option("--iteration <n:number>", "For a top-level branchall or for-loop step, the iteration to restart at").action(restart);
|
|
90714
90867
|
var job_default = command33;
|
|
90715
90868
|
|
|
90716
90869
|
// src/commands/group/group.ts
|
|
@@ -93046,7 +93199,7 @@ var ducklake_default = command40;
|
|
|
93046
93199
|
|
|
93047
93200
|
// src/main.ts
|
|
93048
93201
|
await init_context();
|
|
93049
|
-
var VERSION = "1.
|
|
93202
|
+
var VERSION = "1.707.0";
|
|
93050
93203
|
async function checkVersionSafe(cmd) {
|
|
93051
93204
|
const mainCommand = cmd.getMainCommand();
|
|
93052
93205
|
const upgradeCommand = mainCommand.getCommand("upgrade");
|