windmill-cli 1.706.0 → 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 +173 -38
- 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",
|
|
@@ -67349,14 +67373,6 @@ async function pull(opts) {
|
|
|
67349
67373
|
checkoutGitSyncDeployBranch(deployBranch);
|
|
67350
67374
|
}
|
|
67351
67375
|
if (opts.onlyCreateBranch) {
|
|
67352
|
-
gitSyncDeployPush({
|
|
67353
|
-
items: deployItems,
|
|
67354
|
-
authorName: process.env["WM_USERNAME"] || "windmill",
|
|
67355
|
-
authorEmail: process.env["WM_EMAIL"] || "windmill@windmill.dev",
|
|
67356
|
-
committerName: opts.gitCommitterName,
|
|
67357
|
-
committerEmail: opts.gitCommitterEmail,
|
|
67358
|
-
onlyCreateBranch: true
|
|
67359
|
-
});
|
|
67360
67376
|
return;
|
|
67361
67377
|
}
|
|
67362
67378
|
}
|
|
@@ -67531,7 +67547,7 @@ Both local and remote have been modified.`));
|
|
|
67531
67547
|
}
|
|
67532
67548
|
for (const change of tracker.rawApps) {
|
|
67533
67549
|
info(`Updating lock metadata for raw app ${change}`);
|
|
67534
|
-
await generateAppLocksInternal(change, true,
|
|
67550
|
+
await generateAppLocksInternal(change, true, false, workspace, opts, true, true);
|
|
67535
67551
|
}
|
|
67536
67552
|
for (const change of tracker.apps) {
|
|
67537
67553
|
info(`Updating lock metadata for app ${change}`);
|
|
@@ -67590,16 +67606,6 @@ Done! All ${changes.length} changes applied locally and wmill-lock.yaml updated.
|
|
|
67590
67606
|
} catch (e) {
|
|
67591
67607
|
warn(`Failed to pull shared UI folder: ${e}`);
|
|
67592
67608
|
}
|
|
67593
|
-
if (opts.gitDeployItems !== undefined && !opts.onlyCreateBranch) {
|
|
67594
|
-
const deployItems = JSON.parse(opts.gitDeployItems);
|
|
67595
|
-
gitSyncDeployPush({
|
|
67596
|
-
items: deployItems,
|
|
67597
|
-
authorName: process.env["WM_USERNAME"] || "windmill",
|
|
67598
|
-
authorEmail: process.env["WM_EMAIL"] || "windmill@windmill.dev",
|
|
67599
|
-
committerName: opts.gitCommitterName,
|
|
67600
|
-
committerEmail: opts.gitCommitterEmail
|
|
67601
|
-
});
|
|
67602
|
-
}
|
|
67603
67609
|
}
|
|
67604
67610
|
async function gitDeploy(opts) {
|
|
67605
67611
|
let items = [];
|
|
@@ -77796,6 +77802,8 @@ When the user reports a script or flow failure, is investigating unexpected outp
|
|
|
77796
77802
|
- \`wmill job logs <id>\` — stdout/stderr; for flows, aggregates every step's logs
|
|
77797
77803
|
- \`wmill job result <id>\` — JSON result of a completed job
|
|
77798
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)
|
|
77799
77807
|
|
|
77800
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.
|
|
77801
77809
|
|
|
@@ -78408,9 +78416,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
78408
78416
|
/**
|
|
78409
78417
|
* Get S3 client settings from a resource or workspace default
|
|
78410
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)
|
|
78411
78420
|
* @returns S3 client configuration settings
|
|
78412
78421
|
*/
|
|
78413
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
78422
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
78414
78423
|
|
|
78415
78424
|
/**
|
|
78416
78425
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -78421,8 +78430,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
78421
78430
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
78422
78431
|
* console.log(text);
|
|
78423
78432
|
* \`\`\`
|
|
78433
|
+
*
|
|
78434
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
78424
78435
|
*/
|
|
78425
|
-
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>
|
|
78426
78437
|
|
|
78427
78438
|
/**
|
|
78428
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.
|
|
@@ -78432,8 +78443,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
78432
78443
|
* // if the content is plain text, the blob can be read directly:
|
|
78433
78444
|
* console.log(await fileContentBlob.text());
|
|
78434
78445
|
* \`\`\`
|
|
78446
|
+
*
|
|
78447
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
78435
78448
|
*/
|
|
78436
|
-
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>
|
|
78437
78450
|
|
|
78438
78451
|
/**
|
|
78439
78452
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -78443,8 +78456,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
78443
78456
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
78444
78457
|
* console.log(fileContentAsUtf8Str)
|
|
78445
78458
|
* \`\`\`
|
|
78459
|
+
*
|
|
78460
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
78446
78461
|
*/
|
|
78447
|
-
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>
|
|
78448
78475
|
|
|
78449
78476
|
/**
|
|
78450
78477
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -79099,9 +79126,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
79099
79126
|
/**
|
|
79100
79127
|
* Get S3 client settings from a resource or workspace default
|
|
79101
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)
|
|
79102
79130
|
* @returns S3 client configuration settings
|
|
79103
79131
|
*/
|
|
79104
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
79132
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
79105
79133
|
|
|
79106
79134
|
/**
|
|
79107
79135
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79112,8 +79140,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
79112
79140
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
79113
79141
|
* console.log(text);
|
|
79114
79142
|
* \`\`\`
|
|
79143
|
+
*
|
|
79144
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79115
79145
|
*/
|
|
79116
|
-
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>
|
|
79117
79147
|
|
|
79118
79148
|
/**
|
|
79119
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.
|
|
@@ -79123,8 +79153,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
79123
79153
|
* // if the content is plain text, the blob can be read directly:
|
|
79124
79154
|
* console.log(await fileContentBlob.text());
|
|
79125
79155
|
* \`\`\`
|
|
79156
|
+
*
|
|
79157
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79126
79158
|
*/
|
|
79127
|
-
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>
|
|
79128
79160
|
|
|
79129
79161
|
/**
|
|
79130
79162
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79134,8 +79166,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
79134
79166
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
79135
79167
|
* console.log(fileContentAsUtf8Str)
|
|
79136
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)
|
|
79137
79183
|
*/
|
|
79138
|
-
async
|
|
79184
|
+
async deleteS3File(s3object: S3Object, workspace: string | undefined = undefined): Promise<void>
|
|
79139
79185
|
|
|
79140
79186
|
/**
|
|
79141
79187
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -79878,9 +79924,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
79878
79924
|
/**
|
|
79879
79925
|
* Get S3 client settings from a resource or workspace default
|
|
79880
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)
|
|
79881
79928
|
* @returns S3 client configuration settings
|
|
79882
79929
|
*/
|
|
79883
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
79930
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
79884
79931
|
|
|
79885
79932
|
/**
|
|
79886
79933
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79891,8 +79938,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
79891
79938
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
79892
79939
|
* console.log(text);
|
|
79893
79940
|
* \`\`\`
|
|
79941
|
+
*
|
|
79942
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79894
79943
|
*/
|
|
79895
|
-
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>
|
|
79896
79945
|
|
|
79897
79946
|
/**
|
|
79898
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.
|
|
@@ -79902,8 +79951,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
79902
79951
|
* // if the content is plain text, the blob can be read directly:
|
|
79903
79952
|
* console.log(await fileContentBlob.text());
|
|
79904
79953
|
* \`\`\`
|
|
79954
|
+
*
|
|
79955
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
79905
79956
|
*/
|
|
79906
|
-
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>
|
|
79907
79958
|
|
|
79908
79959
|
/**
|
|
79909
79960
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -79913,8 +79964,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
79913
79964
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
79914
79965
|
* console.log(fileContentAsUtf8Str)
|
|
79915
79966
|
* \`\`\`
|
|
79967
|
+
*
|
|
79968
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
79916
79969
|
*/
|
|
79917
|
-
async writeS3File(s3object: S3Object | undefined, fileContent: string | Blob, s3ResourcePath: string | undefined = undefined, contentType: string | undefined = undefined, contentDisposition: string | undefined = undefined): Promise<S3Object>
|
|
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)
|
|
79981
|
+
*/
|
|
79982
|
+
async deleteS3File(s3object: S3Object, workspace: string | undefined = undefined): Promise<void>
|
|
79918
79983
|
|
|
79919
79984
|
/**
|
|
79920
79985
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -81080,9 +81145,10 @@ async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise<an
|
|
|
81080
81145
|
/**
|
|
81081
81146
|
* Get S3 client settings from a resource or workspace default
|
|
81082
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)
|
|
81083
81149
|
* @returns S3 client configuration settings
|
|
81084
81150
|
*/
|
|
81085
|
-
async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<DenoS3LightClientSettings>
|
|
81151
|
+
async denoS3LightClientSettings(s3_resource_path: string | undefined, workspace: string | undefined = undefined): Promise<DenoS3LightClientSettings>
|
|
81086
81152
|
|
|
81087
81153
|
/**
|
|
81088
81154
|
* Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -81093,8 +81159,10 @@ async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise<D
|
|
|
81093
81159
|
* const text = new TextDecoder().decode(fileContentStream)
|
|
81094
81160
|
* console.log(text);
|
|
81095
81161
|
* \`\`\`
|
|
81162
|
+
*
|
|
81163
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
81096
81164
|
*/
|
|
81097
|
-
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>
|
|
81098
81166
|
|
|
81099
81167
|
/**
|
|
81100
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.
|
|
@@ -81104,8 +81172,10 @@ async loadS3File(s3object: S3Object, s3ResourcePath: string | undefined = undefi
|
|
|
81104
81172
|
* // if the content is plain text, the blob can be read directly:
|
|
81105
81173
|
* console.log(await fileContentBlob.text());
|
|
81106
81174
|
* \`\`\`
|
|
81175
|
+
*
|
|
81176
|
+
* @param workspace - Workspace to read from (defaults to the \`WM_WORKSPACE\` env var)
|
|
81107
81177
|
*/
|
|
81108
|
-
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>
|
|
81109
81179
|
|
|
81110
81180
|
/**
|
|
81111
81181
|
* Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.
|
|
@@ -81115,8 +81185,22 @@ async loadS3FileStream(s3object: S3Object, s3ResourcePath: string | undefined =
|
|
|
81115
81185
|
* const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
|
|
81116
81186
|
* console.log(fileContentAsUtf8Str)
|
|
81117
81187
|
* \`\`\`
|
|
81188
|
+
*
|
|
81189
|
+
* @param workspace - Workspace to write to (defaults to the \`WM_WORKSPACE\` env var)
|
|
81118
81190
|
*/
|
|
81119
|
-
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>
|
|
81120
81204
|
|
|
81121
81205
|
/**
|
|
81122
81206
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
@@ -84751,6 +84835,10 @@ Manage jobs (list, inspect, cancel)
|
|
|
84751
84835
|
- \`job logs <id:string>\` - Get job logs. For flows: aggregates all step logs
|
|
84752
84836
|
- \`job cancel <id:string>\` - Cancel a running or queued job
|
|
84753
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
|
|
84754
84842
|
|
|
84755
84843
|
### jobs
|
|
84756
84844
|
|
|
@@ -90727,8 +90815,55 @@ async function cancel(opts, id) {
|
|
|
90727
90815
|
});
|
|
90728
90816
|
info(colors.green(`Job ${id} canceled.`));
|
|
90729
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
|
+
}
|
|
90730
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");
|
|
90731
|
-
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);
|
|
90732
90867
|
var job_default = command33;
|
|
90733
90868
|
|
|
90734
90869
|
// src/commands/group/group.ts
|
|
@@ -93064,7 +93199,7 @@ var ducklake_default = command40;
|
|
|
93064
93199
|
|
|
93065
93200
|
// src/main.ts
|
|
93066
93201
|
await init_context();
|
|
93067
|
-
var VERSION = "1.
|
|
93202
|
+
var VERSION = "1.707.0";
|
|
93068
93203
|
async function checkVersionSafe(cmd) {
|
|
93069
93204
|
const mainCommand = cmd.getMainCommand();
|
|
93070
93205
|
const upgradeCommand = mainCommand.getCommand("upgrade");
|