sim 2.2.19-preview.250.1 → 2.2.19-preview.251.1
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/dist/embed.d.ts +1 -0
- package/dist/exit-codes.d.ts +8 -0
- package/dist/index.js +5 -2
- package/dist/runtime.js +5 -2
- package/package.json +1 -1
package/dist/embed.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { SimClient } from './http/client';
|
|
|
13
13
|
* any ordinary console logging around them) never interleave.
|
|
14
14
|
*/
|
|
15
15
|
export type { EmbeddedCliIdentity, EmbeddedFileSnapshot } from './embed-context';
|
|
16
|
+
export { STILL_RUNNING_EXIT_CODE } from './exit-codes';
|
|
16
17
|
export type { ExportWorkflowResponse, ListFilesResponse, ListWorkflowsResponse, ReadFileTextResponse, } from './generated/v2-api';
|
|
17
18
|
export { SimApiError, SimClient } from './http/client';
|
|
18
19
|
export interface EmbeddedCliResult {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exit status of a wait whose `--wait-timeout` elapsed while the work it watches
|
|
3
|
+
* keeps going: `workflows runs wait`, a synchronous `workflows run` that detached, and a
|
|
4
|
+
* workspace operation wait. The command did what it was asked and printed the record to
|
|
5
|
+
* continue from, so a host that runs the CLI for an agent treats it as a finished call,
|
|
6
|
+
* not a failed one; a script still branches on the non-zero status.
|
|
7
|
+
*/
|
|
8
|
+
export declare const STILL_RUNNING_EXIT_CODE = 4;
|
package/dist/index.js
CHANGED
|
@@ -20795,6 +20795,9 @@ var CLI_CONTRACT = {
|
|
|
20795
20795
|
getFileUpload: { hidden: true }
|
|
20796
20796
|
};
|
|
20797
20797
|
|
|
20798
|
+
// src/exit-codes.ts
|
|
20799
|
+
var STILL_RUNNING_EXIT_CODE = 4;
|
|
20800
|
+
|
|
20798
20801
|
// src/output/truncation.ts
|
|
20799
20802
|
var TRUNCATION_FLAG = /^truncated$|^[A-Za-z0-9]+Truncated$/;
|
|
20800
20803
|
var NEGATED_TRUNCATION_FLAG = /^(?:not|un|non|never)Truncated$|(?:Not|Un|Non|Never)Truncated$/;
|
|
@@ -21182,7 +21185,7 @@ function workspaceWaitTimeout(raw) {
|
|
|
21182
21185
|
return seconds;
|
|
21183
21186
|
}
|
|
21184
21187
|
function assertWorkspaceOperationOutcome(report, timedOut = false) {
|
|
21185
|
-
const exitCode = timedOut ?
|
|
21188
|
+
const exitCode = timedOut ? STILL_RUNNING_EXIT_CODE : EXIT_CODES[report.status];
|
|
21186
21189
|
if (!exitCode)
|
|
21187
21190
|
return;
|
|
21188
21191
|
throw new SimApiError(timedOut ? "Waiting timed out; reconcile using the same operation or request ID" : report.status === "requires_configuration" ? "The operation committed and requires destination configuration" : "The operation committed, but follow-up work failed", 0, timedOut ? "OPERATION_WAIT_TIMEOUT" : report.status.toUpperCase(), {
|
|
@@ -24047,7 +24050,7 @@ var WAIT_EXIT_CODES = {
|
|
|
24047
24050
|
failed: 1,
|
|
24048
24051
|
cancelled: 2,
|
|
24049
24052
|
paused: 3,
|
|
24050
|
-
timeout:
|
|
24053
|
+
timeout: STILL_RUNNING_EXIT_CODE
|
|
24051
24054
|
};
|
|
24052
24055
|
var FIRST_POLL_DELAY_MS = 2000;
|
|
24053
24056
|
var MAX_POLL_DELAY_MS = 15000;
|
package/dist/runtime.js
CHANGED
|
@@ -20844,6 +20844,9 @@ var CLI_CONTRACT = {
|
|
|
20844
20844
|
getFileUpload: { hidden: true }
|
|
20845
20845
|
};
|
|
20846
20846
|
|
|
20847
|
+
// src/exit-codes.ts
|
|
20848
|
+
var STILL_RUNNING_EXIT_CODE = 4;
|
|
20849
|
+
|
|
20847
20850
|
// src/output/truncation.ts
|
|
20848
20851
|
var TRUNCATION_FLAG = /^truncated$|^[A-Za-z0-9]+Truncated$/;
|
|
20849
20852
|
var NEGATED_TRUNCATION_FLAG = /^(?:not|un|non|never)Truncated$|(?:Not|Un|Non|Never)Truncated$/;
|
|
@@ -21231,7 +21234,7 @@ function workspaceWaitTimeout(raw) {
|
|
|
21231
21234
|
return seconds;
|
|
21232
21235
|
}
|
|
21233
21236
|
function assertWorkspaceOperationOutcome(report, timedOut = false) {
|
|
21234
|
-
const exitCode = timedOut ?
|
|
21237
|
+
const exitCode = timedOut ? STILL_RUNNING_EXIT_CODE : EXIT_CODES[report.status];
|
|
21235
21238
|
if (!exitCode)
|
|
21236
21239
|
return;
|
|
21237
21240
|
throw new SimApiError(timedOut ? "Waiting timed out; reconcile using the same operation or request ID" : report.status === "requires_configuration" ? "The operation committed and requires destination configuration" : "The operation committed, but follow-up work failed", 0, timedOut ? "OPERATION_WAIT_TIMEOUT" : report.status.toUpperCase(), {
|
|
@@ -24096,7 +24099,7 @@ var WAIT_EXIT_CODES = {
|
|
|
24096
24099
|
failed: 1,
|
|
24097
24100
|
cancelled: 2,
|
|
24098
24101
|
paused: 3,
|
|
24099
|
-
timeout:
|
|
24102
|
+
timeout: STILL_RUNNING_EXIT_CODE
|
|
24100
24103
|
};
|
|
24101
24104
|
var FIRST_POLL_DELAY_MS = 2000;
|
|
24102
24105
|
var MAX_POLL_DELAY_MS = 15000;
|