@limrun/api 0.34.0 → 0.36.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/CHANGELOG.md +21 -0
- package/index.d.mts +3 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -1
- package/index.d.ts.map +1 -1
- package/index.js +17 -1
- package/index.js.map +1 -1
- package/index.mjs +2 -0
- package/index.mjs.map +1 -1
- package/internal/direct-instance-errors.d.mts +9 -0
- package/internal/direct-instance-errors.d.mts.map +1 -1
- package/internal/direct-instance-errors.d.ts +9 -0
- package/internal/direct-instance-errors.d.ts.map +1 -1
- package/internal/direct-instance-errors.js +6 -1
- package/internal/direct-instance-errors.js.map +1 -1
- package/internal/direct-instance-errors.mjs +5 -1
- package/internal/direct-instance-errors.mjs.map +1 -1
- package/internal/proxy-transport.d.mts +9 -0
- package/internal/proxy-transport.d.mts.map +1 -1
- package/internal/proxy-transport.d.ts +9 -0
- package/internal/proxy-transport.d.ts.map +1 -1
- package/internal/proxy-transport.js +19 -0
- package/internal/proxy-transport.js.map +1 -1
- package/internal/proxy-transport.mjs +19 -0
- package/internal/proxy-transport.mjs.map +1 -1
- package/internal/sse-fetch.d.mts +11 -0
- package/internal/sse-fetch.d.mts.map +1 -0
- package/internal/sse-fetch.d.ts +11 -0
- package/internal/sse-fetch.d.ts.map +1 -0
- package/internal/sse-fetch.js +23 -0
- package/internal/sse-fetch.js.map +1 -0
- package/internal/sse-fetch.mjs +20 -0
- package/internal/sse-fetch.mjs.map +1 -0
- package/package.json +21 -1
- package/rbe-session.d.mts +35 -0
- package/rbe-session.d.mts.map +1 -0
- package/rbe-session.d.ts +35 -0
- package/rbe-session.d.ts.map +1 -0
- package/rbe-session.js +72 -0
- package/rbe-session.js.map +1 -0
- package/rbe-session.mjs +65 -0
- package/rbe-session.mjs.map +1 -0
- package/rbe-workspace.d.mts +163 -0
- package/rbe-workspace.d.mts.map +1 -0
- package/rbe-workspace.d.ts +163 -0
- package/rbe-workspace.d.ts.map +1 -0
- package/rbe-workspace.js +394 -0
- package/rbe-workspace.js.map +1 -0
- package/rbe-workspace.mjs +382 -0
- package/rbe-workspace.mjs.map +1 -0
- package/resources/xcode-instances-helpers.d.mts +61 -0
- package/resources/xcode-instances-helpers.d.mts.map +1 -1
- package/resources/xcode-instances-helpers.d.ts +61 -0
- package/resources/xcode-instances-helpers.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.js +126 -7
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +127 -8
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/src/index.ts +25 -0
- package/src/internal/direct-instance-errors.ts +11 -1
- package/src/internal/proxy-transport.ts +22 -0
- package/src/internal/sse-fetch.ts +20 -0
- package/src/rbe-session.ts +92 -0
- package/src/rbe-workspace.ts +407 -0
- package/src/resources/xcode-instances-helpers.ts +223 -13
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.36.0 (2026-07-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.35.0...v0.36.0](https://github.com/limrun-inc/typescript-sdk/compare/v0.35.0...v0.36.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **xcode:** RBE build-watch primitives for auto-upload ([d7a1816](https://github.com/limrun-inc/typescript-sdk/commit/d7a181686b84f25fcf6c61bce09305d1bfc0d013))
|
|
10
|
+
|
|
11
|
+
## 0.35.0 (2026-07-03)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.34.0...v0.35.0](https://github.com/limrun-inc/typescript-sdk/compare/v0.34.0...v0.35.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **xcode:** RBE workspace/session helpers in the SDK and uploadLatestRbeBuild ([fdfb7b0](https://github.com/limrun-inc/typescript-sdk/commit/fdfb7b03010a38e129691aba97789a77887fdf2d))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Refactors
|
|
21
|
+
|
|
22
|
+
* **xcode:** apply cleanup review to the RBE upload surface ([ae34cb9](https://github.com/limrun-inc/typescript-sdk/commit/ae34cb9d40bc9f689a0cf231f1e474bafefcfbe6))
|
|
23
|
+
|
|
3
24
|
## 0.34.0 (2026-07-01)
|
|
4
25
|
|
|
5
26
|
Full Changelog: [v0.33.5...v0.34.0](https://github.com/limrun-inc/typescript-sdk/compare/v0.33.5...v0.34.0)
|
package/index.d.mts
CHANGED
|
@@ -8,6 +8,8 @@ export * as Ios from "./ios-client.mjs";
|
|
|
8
8
|
export { startHttpProxy, type HttpProxy, type StartHttpProxyOptions } from "./http-proxy.mjs";
|
|
9
9
|
export { buildSettingKeyPattern, parseBuildSettingEntries, validateBuildSettings } from "./build-settings.mjs";
|
|
10
10
|
export { exec, type ExecRequest, type ExecOptions, type ExecResult, type ExecChildProcess, } from "./exec-client.mjs";
|
|
11
|
-
export { type XcodeCreateClientParams, type XcodeClient, type RbeStatus, type RbeStartOptions, type RbeTunnelOptions, type RbeInstallResult, type Tunnel, RbeUnsupportedError, deriveRbeTunnelUrl, DEFAULT_RBE_TUNNEL_PORT, type XcodeProjectConfig, type XcodeBuildOptions, type ReactNativeBuildConfig, type SimulatorAttachResult, type SimulatorStatus, type SimulatorBuildStatus, type SimulatorAttachment, type SimulatorDeviceInfo, type SimulatorInstallState, } from "./resources/xcode-instances-helpers.mjs";
|
|
11
|
+
export { type XcodeCreateClientParams, type XcodeClient, type RbeStatus, type RbeStartOptions, type RbeTunnelOptions, type RbeInstallResult, type RbeUploadOptions, type RbeUploadResult, type RbeActiveBuild, type RbeBuildEnd, type Tunnel, RbeUnsupportedError, deriveRbeTunnelUrl, DEFAULT_RBE_TUNNEL_PORT, type XcodeProjectConfig, type XcodeBuildOptions, type ReactNativeBuildConfig, type SimulatorAttachResult, type SimulatorStatus, type SimulatorBuildStatus, type SimulatorAttachment, type SimulatorDeviceInfo, type SimulatorInstallState, } from "./resources/xcode-instances-helpers.mjs";
|
|
12
|
+
export { LIMRUN_DIR, TRY_IMPORT_LINE, findBazelWorkspaceRoot, inferBuildTarget, detectBazelMajorVersion, isBazel9OrLater, renderXcodeConfigBuild, renderLimrunBazelrc, ensureTryImport, writeRbeWorkspaceFiles, type RbeWorkspaceFiles, } from "./rbe-workspace.mjs";
|
|
13
|
+
export { isTransientError, retryTransient, waitForRbeRunning, defaultSleep, type Sleep, type RunningRbeStatus, } from "./rbe-session.mjs";
|
|
12
14
|
export { LimrunError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
|
|
13
15
|
//# sourceMappingURL=index.d.mts.map
|
package/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,qBAAiB;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE,2BAAuB;AACzD,OAAO,EAAE,UAAU,EAAE,+BAA2B;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,qBAAiB;AACtD,OAAO,EAAE,WAAW,EAAE,8BAA0B;AAChD,sCAAkC;AAClC,OAAO,KAAK,GAAG,yBAAqB;AACpC,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,yBAAqB;AAC1F,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,6BAAyB;AAC3G,OAAO,EACL,IAAI,EACJ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,E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B;AACvB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,gDAA4C;AAC7C,OAAO,EACL,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,KAAK,iBAAiB,GACvB,4BAAwB;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,KAAK,KAAK,EACV,KAAK,gBAAgB,GACtB,0BAAsB;AACvB,OAAO,EACL,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,yBAAqB"}
|
package/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export * as Ios from "./ios-client.js";
|
|
|
8
8
|
export { startHttpProxy, type HttpProxy, type StartHttpProxyOptions } from "./http-proxy.js";
|
|
9
9
|
export { buildSettingKeyPattern, parseBuildSettingEntries, validateBuildSettings } from "./build-settings.js";
|
|
10
10
|
export { exec, type ExecRequest, type ExecOptions, type ExecResult, type ExecChildProcess, } from "./exec-client.js";
|
|
11
|
-
export { type XcodeCreateClientParams, type XcodeClient, type RbeStatus, type RbeStartOptions, type RbeTunnelOptions, type RbeInstallResult, type Tunnel, RbeUnsupportedError, deriveRbeTunnelUrl, DEFAULT_RBE_TUNNEL_PORT, type XcodeProjectConfig, type XcodeBuildOptions, type ReactNativeBuildConfig, type SimulatorAttachResult, type SimulatorStatus, type SimulatorBuildStatus, type SimulatorAttachment, type SimulatorDeviceInfo, type SimulatorInstallState, } from "./resources/xcode-instances-helpers.js";
|
|
11
|
+
export { type XcodeCreateClientParams, type XcodeClient, type RbeStatus, type RbeStartOptions, type RbeTunnelOptions, type RbeInstallResult, type RbeUploadOptions, type RbeUploadResult, type RbeActiveBuild, type RbeBuildEnd, type Tunnel, RbeUnsupportedError, deriveRbeTunnelUrl, DEFAULT_RBE_TUNNEL_PORT, type XcodeProjectConfig, type XcodeBuildOptions, type ReactNativeBuildConfig, type SimulatorAttachResult, type SimulatorStatus, type SimulatorBuildStatus, type SimulatorAttachment, type SimulatorDeviceInfo, type SimulatorInstallState, } from "./resources/xcode-instances-helpers.js";
|
|
12
|
+
export { LIMRUN_DIR, TRY_IMPORT_LINE, findBazelWorkspaceRoot, inferBuildTarget, detectBazelMajorVersion, isBazel9OrLater, renderXcodeConfigBuild, renderLimrunBazelrc, ensureTryImport, writeRbeWorkspaceFiles, type RbeWorkspaceFiles, } from "./rbe-workspace.js";
|
|
13
|
+
export { isTransientError, retryTransient, waitForRbeRunning, defaultSleep, type Sleep, type RunningRbeStatus, } from "./rbe-session.js";
|
|
12
14
|
export { LimrunError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.js";
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":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KAAK,EACV,KAAK,gBAAgB,GACtB,yBAAsB;AACvB,OAAO,EACL,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,wBAAqB"}
|
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ exports = module.exports = function (...args) {
|
|
|
4
4
|
return new exports.default(...args)
|
|
5
5
|
}
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.LimrunError = exports.DEFAULT_RBE_TUNNEL_PORT = exports.deriveRbeTunnelUrl = exports.RbeUnsupportedError = exports.exec = exports.validateBuildSettings = exports.parseBuildSettingEntries = exports.buildSettingKeyPattern = exports.startHttpProxy = exports.Ios = exports.PagePromise = exports.Limrun = exports.APIPromise = exports.toFile = exports.default = void 0;
|
|
7
|
+
exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.LimrunError = exports.defaultSleep = exports.waitForRbeRunning = exports.retryTransient = exports.isTransientError = exports.writeRbeWorkspaceFiles = exports.ensureTryImport = exports.renderLimrunBazelrc = exports.renderXcodeConfigBuild = exports.isBazel9OrLater = exports.detectBazelMajorVersion = exports.inferBuildTarget = exports.findBazelWorkspaceRoot = exports.TRY_IMPORT_LINE = exports.LIMRUN_DIR = exports.DEFAULT_RBE_TUNNEL_PORT = exports.deriveRbeTunnelUrl = exports.RbeUnsupportedError = exports.exec = exports.validateBuildSettings = exports.parseBuildSettingEntries = exports.buildSettingKeyPattern = exports.startHttpProxy = exports.Ios = exports.PagePromise = exports.Limrun = exports.APIPromise = exports.toFile = exports.default = void 0;
|
|
8
8
|
const tslib_1 = require("./internal/tslib.js");
|
|
9
9
|
var client_1 = require("./client.js");
|
|
10
10
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_1.Limrun; } });
|
|
@@ -30,6 +30,22 @@ var xcode_instances_helpers_1 = require("./resources/xcode-instances-helpers.js"
|
|
|
30
30
|
Object.defineProperty(exports, "RbeUnsupportedError", { enumerable: true, get: function () { return xcode_instances_helpers_1.RbeUnsupportedError; } });
|
|
31
31
|
Object.defineProperty(exports, "deriveRbeTunnelUrl", { enumerable: true, get: function () { return xcode_instances_helpers_1.deriveRbeTunnelUrl; } });
|
|
32
32
|
Object.defineProperty(exports, "DEFAULT_RBE_TUNNEL_PORT", { enumerable: true, get: function () { return xcode_instances_helpers_1.DEFAULT_RBE_TUNNEL_PORT; } });
|
|
33
|
+
var rbe_workspace_1 = require("./rbe-workspace.js");
|
|
34
|
+
Object.defineProperty(exports, "LIMRUN_DIR", { enumerable: true, get: function () { return rbe_workspace_1.LIMRUN_DIR; } });
|
|
35
|
+
Object.defineProperty(exports, "TRY_IMPORT_LINE", { enumerable: true, get: function () { return rbe_workspace_1.TRY_IMPORT_LINE; } });
|
|
36
|
+
Object.defineProperty(exports, "findBazelWorkspaceRoot", { enumerable: true, get: function () { return rbe_workspace_1.findBazelWorkspaceRoot; } });
|
|
37
|
+
Object.defineProperty(exports, "inferBuildTarget", { enumerable: true, get: function () { return rbe_workspace_1.inferBuildTarget; } });
|
|
38
|
+
Object.defineProperty(exports, "detectBazelMajorVersion", { enumerable: true, get: function () { return rbe_workspace_1.detectBazelMajorVersion; } });
|
|
39
|
+
Object.defineProperty(exports, "isBazel9OrLater", { enumerable: true, get: function () { return rbe_workspace_1.isBazel9OrLater; } });
|
|
40
|
+
Object.defineProperty(exports, "renderXcodeConfigBuild", { enumerable: true, get: function () { return rbe_workspace_1.renderXcodeConfigBuild; } });
|
|
41
|
+
Object.defineProperty(exports, "renderLimrunBazelrc", { enumerable: true, get: function () { return rbe_workspace_1.renderLimrunBazelrc; } });
|
|
42
|
+
Object.defineProperty(exports, "ensureTryImport", { enumerable: true, get: function () { return rbe_workspace_1.ensureTryImport; } });
|
|
43
|
+
Object.defineProperty(exports, "writeRbeWorkspaceFiles", { enumerable: true, get: function () { return rbe_workspace_1.writeRbeWorkspaceFiles; } });
|
|
44
|
+
var rbe_session_1 = require("./rbe-session.js");
|
|
45
|
+
Object.defineProperty(exports, "isTransientError", { enumerable: true, get: function () { return rbe_session_1.isTransientError; } });
|
|
46
|
+
Object.defineProperty(exports, "retryTransient", { enumerable: true, get: function () { return rbe_session_1.retryTransient; } });
|
|
47
|
+
Object.defineProperty(exports, "waitForRbeRunning", { enumerable: true, get: function () { return rbe_session_1.waitForRbeRunning; } });
|
|
48
|
+
Object.defineProperty(exports, "defaultSleep", { enumerable: true, get: function () { return rbe_session_1.defaultSleep; } });
|
|
33
49
|
var error_1 = require("./core/error.js");
|
|
34
50
|
Object.defineProperty(exports, "LimrunError", { enumerable: true, get: function () { return error_1.LimrunError; } });
|
|
35
51
|
Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return error_1.APIError; } });
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sCAA6C;AAApC,iGAAA,MAAM,OAAW;AAE1B,6CAAyD;AAA/B,iGAAA,MAAM,OAAA;AAChC,qDAAgD;AAAvC,yGAAA,UAAU,OAAA;AACnB,sCAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,mDAAgD;AAAvC,yGAAA,WAAW,OAAA;AACpB,+DAAkC;AAClC,+DAAoC;AACpC,8CAA0F;AAAjF,4GAAA,cAAc,OAAA;AACv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AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA"}
|
package/index.mjs
CHANGED
|
@@ -10,5 +10,7 @@ export { startHttpProxy } from "./http-proxy.mjs";
|
|
|
10
10
|
export { buildSettingKeyPattern, parseBuildSettingEntries, validateBuildSettings } from "./build-settings.mjs";
|
|
11
11
|
export { exec, } from "./exec-client.mjs";
|
|
12
12
|
export { RbeUnsupportedError, deriveRbeTunnelUrl, DEFAULT_RBE_TUNNEL_PORT, } from "./resources/xcode-instances-helpers.mjs";
|
|
13
|
+
export { LIMRUN_DIR, TRY_IMPORT_LINE, findBazelWorkspaceRoot, inferBuildTarget, detectBazelMajorVersion, isBazel9OrLater, renderXcodeConfigBuild, renderLimrunBazelrc, ensureTryImport, writeRbeWorkspaceFiles, } from "./rbe-workspace.mjs";
|
|
14
|
+
export { isTransientError, retryTransient, waitForRbeRunning, defaultSleep, } from "./rbe-session.mjs";
|
|
13
15
|
export { LimrunError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
|
|
14
16
|
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,qBAAiB;AAE7C,OAAO,EAAmB,MAAM,EAAE,2BAAuB;AACzD,OAAO,EAAE,UAAU,EAAE,+BAA2B;AA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nB,qBAAqB,EACrB,wBAAwB,GACzB,yBAAqB"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
/** Error thrown for non-2xx direct-instance responses, carrying the HTTP
|
|
2
|
+
* status and raw body so callers can match on them structurally instead of
|
|
3
|
+
* parsing the message. */
|
|
4
|
+
export type DirectInstanceHttpError = Error & {
|
|
5
|
+
status: number;
|
|
6
|
+
body: string;
|
|
7
|
+
};
|
|
1
8
|
export declare function directInstanceHttpError(operation: string, status: number, text: string, headers: Headers): Error;
|
|
9
|
+
/** Narrow an unknown error to a direct-instance HTTP error with the given status. */
|
|
10
|
+
export declare function isDirectInstanceHttpError(err: unknown, status: number): err is DirectInstanceHttpError;
|
|
2
11
|
//# sourceMappingURL=direct-instance-errors.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct-instance-errors.d.mts","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,KAAK,CAMP"}
|
|
1
|
+
{"version":3,"file":"direct-instance-errors.d.mts","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":"AAEA;;2BAE2B;AAC3B,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,KAAK,CAMP;AAED,qFAAqF;AACrF,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,uBAAuB,CAEtG"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
/** Error thrown for non-2xx direct-instance responses, carrying the HTTP
|
|
2
|
+
* status and raw body so callers can match on them structurally instead of
|
|
3
|
+
* parsing the message. */
|
|
4
|
+
export type DirectInstanceHttpError = Error & {
|
|
5
|
+
status: number;
|
|
6
|
+
body: string;
|
|
7
|
+
};
|
|
1
8
|
export declare function directInstanceHttpError(operation: string, status: number, text: string, headers: Headers): Error;
|
|
9
|
+
/** Narrow an unknown error to a direct-instance HTTP error with the given status. */
|
|
10
|
+
export declare function isDirectInstanceHttpError(err: unknown, status: number): err is DirectInstanceHttpError;
|
|
2
11
|
//# sourceMappingURL=direct-instance-errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct-instance-errors.d.ts","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,KAAK,CAMP"}
|
|
1
|
+
{"version":3,"file":"direct-instance-errors.d.ts","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":"AAEA;;2BAE2B;AAC3B,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,KAAK,CAMP;AAED,qFAAqF;AACrF,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,uBAAuB,CAEtG"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.directInstanceHttpError = directInstanceHttpError;
|
|
4
|
+
exports.isDirectInstanceHttpError = isDirectInstanceHttpError;
|
|
4
5
|
const error_1 = require("../core/error.js");
|
|
5
6
|
function directInstanceHttpError(operation, status, text, headers) {
|
|
6
7
|
const message = `${operation} failed: ${status}${text ? ` ${text}` : ''}`;
|
|
7
8
|
if (status === 404) {
|
|
8
9
|
return new error_1.NotFoundError(404, { message }, undefined, headers);
|
|
9
10
|
}
|
|
10
|
-
return new Error(message);
|
|
11
|
+
return Object.assign(new Error(message), { status, body: text });
|
|
12
|
+
}
|
|
13
|
+
/** Narrow an unknown error to a direct-instance HTTP error with the given status. */
|
|
14
|
+
function isDirectInstanceHttpError(err, status) {
|
|
15
|
+
return err instanceof Error && err.status === status;
|
|
11
16
|
}
|
|
12
17
|
//# sourceMappingURL=direct-instance-errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct-instance-errors.js","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"direct-instance-errors.js","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":";;AAOA,0DAWC;AAGD,8DAEC;AAvBD,4CAA8C;AAO9C,SAAgB,uBAAuB,CACrC,SAAiB,EACjB,MAAc,EACd,IAAY,EACZ,OAAgB;IAEhB,MAAM,OAAO,GAAG,GAAG,SAAS,YAAY,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC1E,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO,IAAI,qBAAa,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,qFAAqF;AACrF,SAAgB,yBAAyB,CAAC,GAAY,EAAE,MAAc;IACpE,OAAO,GAAG,YAAY,KAAK,IAAK,GAAwC,CAAC,MAAM,KAAK,MAAM,CAAC;AAC7F,CAAC"}
|
|
@@ -4,6 +4,10 @@ export function directInstanceHttpError(operation, status, text, headers) {
|
|
|
4
4
|
if (status === 404) {
|
|
5
5
|
return new NotFoundError(404, { message }, undefined, headers);
|
|
6
6
|
}
|
|
7
|
-
return new Error(message);
|
|
7
|
+
return Object.assign(new Error(message), { status, body: text });
|
|
8
|
+
}
|
|
9
|
+
/** Narrow an unknown error to a direct-instance HTTP error with the given status. */
|
|
10
|
+
export function isDirectInstanceHttpError(err, status) {
|
|
11
|
+
return err instanceof Error && err.status === status;
|
|
8
12
|
}
|
|
9
13
|
//# sourceMappingURL=direct-instance-errors.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct-instance-errors.mjs","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,0BAAsB;
|
|
1
|
+
{"version":3,"file":"direct-instance-errors.mjs","sourceRoot":"","sources":["../src/internal/direct-instance-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,0BAAsB;AAO9C,MAAM,UAAU,uBAAuB,CACrC,SAAiB,EACjB,MAAc,EACd,IAAY,EACZ,OAAgB;IAEhB,MAAM,OAAO,GAAG,GAAG,SAAS,YAAY,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC1E,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,yBAAyB,CAAC,GAAY,EAAE,MAAc;IACpE,OAAO,GAAG,YAAY,KAAK,IAAK,GAAwC,CAAC,MAAM,KAAK,MAAM,CAAC;AAC7F,CAAC"}
|
|
@@ -2,8 +2,17 @@ import type { Agent as HttpAgent } from 'http';
|
|
|
2
2
|
import type { Fetch } from "./builtin-types.mjs";
|
|
3
3
|
declare class NodeProxyTransport {
|
|
4
4
|
private envHttpProxyAgent;
|
|
5
|
+
private longRequestDispatcher;
|
|
5
6
|
private websocketAgents;
|
|
6
7
|
fetch: Fetch;
|
|
8
|
+
/**
|
|
9
|
+
* fetch for requests that legitimately receive no response bytes for many
|
|
10
|
+
* minutes (the server answers only after completing long work). Plain fetch
|
|
11
|
+
* would abort them at undici's default 300s headersTimeout.
|
|
12
|
+
* EnvHttpProxyAgent covers the no-proxy case too: it routes non-proxied
|
|
13
|
+
* origins through an internal Agent built with these same options.
|
|
14
|
+
*/
|
|
15
|
+
fetchLongRequest: Fetch;
|
|
7
16
|
getWebSocketAgent(url: string): HttpAgent | undefined;
|
|
8
17
|
private getEnvHttpProxyAgent;
|
|
9
18
|
private hasProxyEnv;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-transport.d.mts","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAM/C,OAAO,KAAK,EAAE,KAAK,EAAE,4BAAwB;
|
|
1
|
+
{"version":3,"file":"proxy-transport.d.mts","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAM/C,OAAO,KAAK,EAAE,KAAK,EAAE,4BAAwB;AAQ7C,cAAM,kBAAkB;IACtB,OAAO,CAAC,iBAAiB,CAAgC;IACzD,OAAO,CAAC,qBAAqB,CAAgC;IAC7D,OAAO,CAAC,eAAe,CAAgC;IAEvD,KAAK,EAAE,KAAK,CASV;IAEF;;;;;;OAMG;IACH,gBAAgB,EAAE,KAAK,CAMrB;IAEF,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAoBrD,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,0BAA0B;CASnC;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
|
|
@@ -2,8 +2,17 @@ import type { Agent as HttpAgent } from 'http';
|
|
|
2
2
|
import type { Fetch } from "./builtin-types.js";
|
|
3
3
|
declare class NodeProxyTransport {
|
|
4
4
|
private envHttpProxyAgent;
|
|
5
|
+
private longRequestDispatcher;
|
|
5
6
|
private websocketAgents;
|
|
6
7
|
fetch: Fetch;
|
|
8
|
+
/**
|
|
9
|
+
* fetch for requests that legitimately receive no response bytes for many
|
|
10
|
+
* minutes (the server answers only after completing long work). Plain fetch
|
|
11
|
+
* would abort them at undici's default 300s headersTimeout.
|
|
12
|
+
* EnvHttpProxyAgent covers the no-proxy case too: it routes non-proxied
|
|
13
|
+
* origins through an internal Agent built with these same options.
|
|
14
|
+
*/
|
|
15
|
+
fetchLongRequest: Fetch;
|
|
7
16
|
getWebSocketAgent(url: string): HttpAgent | undefined;
|
|
8
17
|
private getEnvHttpProxyAgent;
|
|
9
18
|
private hasProxyEnv;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-transport.d.ts","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAM/C,OAAO,KAAK,EAAE,KAAK,EAAE,2BAAwB;
|
|
1
|
+
{"version":3,"file":"proxy-transport.d.ts","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAM/C,OAAO,KAAK,EAAE,KAAK,EAAE,2BAAwB;AAQ7C,cAAM,kBAAkB;IACtB,OAAO,CAAC,iBAAiB,CAAgC;IACzD,OAAO,CAAC,qBAAqB,CAAgC;IAC7D,OAAO,CAAC,eAAe,CAAgC;IAEvD,KAAK,EAAE,KAAK,CASV;IAEF;;;;;;OAMG;IACH,gBAAgB,EAAE,KAAK,CAMrB;IAEF,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAoBrD,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,0BAA0B;CASnC;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
|
|
@@ -4,6 +4,11 @@ exports.nodeProxyTransport = void 0;
|
|
|
4
4
|
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
5
5
|
const proxy_from_env_1 = require("proxy-from-env");
|
|
6
6
|
const undici_1 = require("undici");
|
|
7
|
+
// For requests whose server responds only after finishing long work (no bytes
|
|
8
|
+
// until then). Matches the ingress proxy-read-timeout so the client is never
|
|
9
|
+
// the first to give up. undici's defaults are 300s, which would abort e.g. an
|
|
10
|
+
// instance-side artifact upload that takes longer.
|
|
11
|
+
const longRequestTimeouts = { headersTimeout: 3600000, bodyTimeout: 3600000 };
|
|
7
12
|
class NodeProxyTransport {
|
|
8
13
|
constructor() {
|
|
9
14
|
this.websocketAgents = new Map();
|
|
@@ -16,6 +21,20 @@ class NodeProxyTransport {
|
|
|
16
21
|
dispatcher: this.getEnvHttpProxyAgent(),
|
|
17
22
|
});
|
|
18
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* fetch for requests that legitimately receive no response bytes for many
|
|
26
|
+
* minutes (the server answers only after completing long work). Plain fetch
|
|
27
|
+
* would abort them at undici's default 300s headersTimeout.
|
|
28
|
+
* EnvHttpProxyAgent covers the no-proxy case too: it routes non-proxied
|
|
29
|
+
* origins through an internal Agent built with these same options.
|
|
30
|
+
*/
|
|
31
|
+
this.fetchLongRequest = async (input, init) => {
|
|
32
|
+
this.longRequestDispatcher ?? (this.longRequestDispatcher = new undici_1.EnvHttpProxyAgent(longRequestTimeouts));
|
|
33
|
+
return fetch(input, {
|
|
34
|
+
...(init ?? {}),
|
|
35
|
+
dispatcher: this.longRequestDispatcher,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
19
38
|
}
|
|
20
39
|
getWebSocketAgent(url) {
|
|
21
40
|
if (!this.hasProxyEnv()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-transport.js","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":";;;AAEA,yDAAoD;AACpD,mDAAgD;AAChD,mCAA2C;AAI3C,MAAM,kBAAkB;IAAxB;
|
|
1
|
+
{"version":3,"file":"proxy-transport.js","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":";;;AAEA,yDAAoD;AACpD,mDAAgD;AAChD,mCAA2C;AAI3C,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,mDAAmD;AACnD,MAAM,mBAAmB,GAAG,EAAE,cAAc,EAAE,OAAS,EAAE,WAAW,EAAE,OAAS,EAAE,CAAC;AAElF,MAAM,kBAAkB;IAAxB;QAGU,oBAAe,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEvD,UAAK,GAAU,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5B,CAAC;YAED,OAAQ,KAAa,CAAC,KAAK,EAAE;gBAC3B,GAA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O,WAAW;QACjB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC9D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACxB,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;IAChG,CAAC;IAEO,0BAA0B,CAAC,GAAW;QAC5C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,SAAS,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;YACjC,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC;QAC/B,CAAC;aAAM,IAAI,SAAS,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YACzC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAChC,CAAC;QACD,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF;AAEY,QAAA,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
2
2
|
import { getProxyForUrl } from 'proxy-from-env';
|
|
3
3
|
import { EnvHttpProxyAgent } from 'undici';
|
|
4
|
+
// For requests whose server responds only after finishing long work (no bytes
|
|
5
|
+
// until then). Matches the ingress proxy-read-timeout so the client is never
|
|
6
|
+
// the first to give up. undici's defaults are 300s, which would abort e.g. an
|
|
7
|
+
// instance-side artifact upload that takes longer.
|
|
8
|
+
const longRequestTimeouts = { headersTimeout: 3600000, bodyTimeout: 3600000 };
|
|
4
9
|
class NodeProxyTransport {
|
|
5
10
|
constructor() {
|
|
6
11
|
this.websocketAgents = new Map();
|
|
@@ -13,6 +18,20 @@ class NodeProxyTransport {
|
|
|
13
18
|
dispatcher: this.getEnvHttpProxyAgent(),
|
|
14
19
|
});
|
|
15
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* fetch for requests that legitimately receive no response bytes for many
|
|
23
|
+
* minutes (the server answers only after completing long work). Plain fetch
|
|
24
|
+
* would abort them at undici's default 300s headersTimeout.
|
|
25
|
+
* EnvHttpProxyAgent covers the no-proxy case too: it routes non-proxied
|
|
26
|
+
* origins through an internal Agent built with these same options.
|
|
27
|
+
*/
|
|
28
|
+
this.fetchLongRequest = async (input, init) => {
|
|
29
|
+
this.longRequestDispatcher ?? (this.longRequestDispatcher = new EnvHttpProxyAgent(longRequestTimeouts));
|
|
30
|
+
return fetch(input, {
|
|
31
|
+
...(init ?? {}),
|
|
32
|
+
dispatcher: this.longRequestDispatcher,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
16
35
|
}
|
|
17
36
|
getWebSocketAgent(url) {
|
|
18
37
|
if (!this.hasProxyEnv()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-transport.mjs","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAI3C,MAAM,kBAAkB;IAAxB;
|
|
1
|
+
{"version":3,"file":"proxy-transport.mjs","sourceRoot":"","sources":["../src/internal/proxy-transport.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAI3C,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,mDAAmD;AACnD,MAAM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2
|
+
/**
|
|
3
|
+
* Wraps a fetch for use with eventsource-client, which swallows a REJECTED
|
|
4
|
+
* fetch (connection refused, instance gone) into a silent reconnect loop
|
|
5
|
+
* without ever calling onDisconnect. The wrapper reports the rejection so the
|
|
6
|
+
* caller can settle its promise instead of hanging while the client
|
|
7
|
+
* reconnect-loops. exec-client has the same latent hazard and should adopt
|
|
8
|
+
* this when touched next.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sseFetch(fetchImpl: Fetch, onRejected: (err: unknown) => void): Fetch;
|
|
11
|
+
//# sourceMappingURL=sse-fetch.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse-fetch.d.mts","sourceRoot":"","sources":["../src/internal/sse-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,4BAAwB;AAE7C;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,GAAG,KAAK,CASpF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Fetch } from "./builtin-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a fetch for use with eventsource-client, which swallows a REJECTED
|
|
4
|
+
* fetch (connection refused, instance gone) into a silent reconnect loop
|
|
5
|
+
* without ever calling onDisconnect. The wrapper reports the rejection so the
|
|
6
|
+
* caller can settle its promise instead of hanging while the client
|
|
7
|
+
* reconnect-loops. exec-client has the same latent hazard and should adopt
|
|
8
|
+
* this when touched next.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sseFetch(fetchImpl: Fetch, onRejected: (err: unknown) => void): Fetch;
|
|
11
|
+
//# sourceMappingURL=sse-fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse-fetch.d.ts","sourceRoot":"","sources":["../src/internal/sse-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,2BAAwB;AAE7C;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,GAAG,KAAK,CASpF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sseFetch = sseFetch;
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a fetch for use with eventsource-client, which swallows a REJECTED
|
|
6
|
+
* fetch (connection refused, instance gone) into a silent reconnect loop
|
|
7
|
+
* without ever calling onDisconnect. The wrapper reports the rejection so the
|
|
8
|
+
* caller can settle its promise instead of hanging while the client
|
|
9
|
+
* reconnect-loops. exec-client has the same latent hazard and should adopt
|
|
10
|
+
* this when touched next.
|
|
11
|
+
*/
|
|
12
|
+
function sseFetch(fetchImpl, onRejected) {
|
|
13
|
+
return async (input, init) => {
|
|
14
|
+
try {
|
|
15
|
+
return await fetchImpl(input, init);
|
|
16
|
+
}
|
|
17
|
+
catch (err) {
|
|
18
|
+
onRejected(err);
|
|
19
|
+
throw err;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sse-fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse-fetch.js","sourceRoot":"","sources":["../src/internal/sse-fetch.ts"],"names":[],"mappings":";;AAUA,4BASC;AAjBD;;;;;;;GAOG;AACH,SAAgB,QAAQ,CAAC,SAAgB,EAAE,UAAkC;IAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAC3B,IAAI,CAAC;YACH,OAAO,MAAM,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,UAAU,CAAC,GAAG,CAAC,CAAC;YAChB,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps a fetch for use with eventsource-client, which swallows a REJECTED
|
|
3
|
+
* fetch (connection refused, instance gone) into a silent reconnect loop
|
|
4
|
+
* without ever calling onDisconnect. The wrapper reports the rejection so the
|
|
5
|
+
* caller can settle its promise instead of hanging while the client
|
|
6
|
+
* reconnect-loops. exec-client has the same latent hazard and should adopt
|
|
7
|
+
* this when touched next.
|
|
8
|
+
*/
|
|
9
|
+
export function sseFetch(fetchImpl, onRejected) {
|
|
10
|
+
return async (input, init) => {
|
|
11
|
+
try {
|
|
12
|
+
return await fetchImpl(input, init);
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
onRejected(err);
|
|
16
|
+
throw err;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=sse-fetch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse-fetch.mjs","sourceRoot":"","sources":["../src/internal/sse-fetch.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAgB,EAAE,UAAkC;IAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAC3B,IAAI,CAAC;YACH,OAAO,MAAM,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,UAAU,CAAC,GAAG,CAAC,CAAC;YAChB,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limrun/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "The official TypeScript library for the Limrun API",
|
|
5
5
|
"author": "Limrun <contact@limrun.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -218,6 +218,26 @@
|
|
|
218
218
|
"./pagination.mjs": {
|
|
219
219
|
"default": "./pagination.mjs"
|
|
220
220
|
},
|
|
221
|
+
"./rbe-session": {
|
|
222
|
+
"import": "./rbe-session.mjs",
|
|
223
|
+
"require": "./rbe-session.js"
|
|
224
|
+
},
|
|
225
|
+
"./rbe-session.js": {
|
|
226
|
+
"default": "./rbe-session.js"
|
|
227
|
+
},
|
|
228
|
+
"./rbe-session.mjs": {
|
|
229
|
+
"default": "./rbe-session.mjs"
|
|
230
|
+
},
|
|
231
|
+
"./rbe-workspace": {
|
|
232
|
+
"import": "./rbe-workspace.mjs",
|
|
233
|
+
"require": "./rbe-workspace.js"
|
|
234
|
+
},
|
|
235
|
+
"./rbe-workspace.js": {
|
|
236
|
+
"default": "./rbe-workspace.js"
|
|
237
|
+
},
|
|
238
|
+
"./rbe-workspace.mjs": {
|
|
239
|
+
"default": "./rbe-workspace.mjs"
|
|
240
|
+
},
|
|
221
241
|
"./resource": {
|
|
222
242
|
"import": "./resource.mjs",
|
|
223
243
|
"require": "./resource.js"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RbeStatus, XcodeClient } from "./resources/xcode-instances-helpers.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Client-side helpers for driving an instance's RBE stack: waiting for it to
|
|
4
|
+
* come up and riding out the transient gateway errors that occur right after
|
|
5
|
+
* instance creation. Shared by the CLI and pure-SDK consumers (e.g. CI
|
|
6
|
+
* actions).
|
|
7
|
+
*/
|
|
8
|
+
export type Sleep = (ms: number) => Promise<void>;
|
|
9
|
+
export declare const defaultSleep: Sleep;
|
|
10
|
+
export declare function isTransientError(err: unknown): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Retries `fn` on transient gateway errors (or on whatever `retryOn` matches
|
|
13
|
+
* when given). Non-matching errors propagate immediately. After exhausting
|
|
14
|
+
* `attempts`, throws the last error.
|
|
15
|
+
*/
|
|
16
|
+
export declare function retryTransient<T>(fn: () => Promise<T>, opts?: {
|
|
17
|
+
sleep?: Sleep;
|
|
18
|
+
log?: (msg: string) => void;
|
|
19
|
+
attempts?: number;
|
|
20
|
+
retryOn?: (err: unknown) => boolean;
|
|
21
|
+
}): Promise<T>;
|
|
22
|
+
/** RbeStatus once the stack is running: frontendPort and xcodeVersion are set. */
|
|
23
|
+
export type RunningRbeStatus = RbeStatus & Required<Pick<RbeStatus, 'frontendPort' | 'xcodeVersion'>>;
|
|
24
|
+
/**
|
|
25
|
+
* Polls `getRbe` until the stack is `running` (with a usable frontend port and
|
|
26
|
+
* Xcode version), starting from the `initial` status returned by `startRbe`.
|
|
27
|
+
* Each poll is wrapped in retryTransient so a transient blip mid-startup does
|
|
28
|
+
* not abort. Throws when the stack ends in `failed`, stays `starting` past
|
|
29
|
+
* `maxAttempts`, or reports `running` without the fields the caller needs.
|
|
30
|
+
*/
|
|
31
|
+
export declare function waitForRbeRunning(client: Pick<XcodeClient, 'getRbe'>, initial: RbeStatus, opts?: {
|
|
32
|
+
sleep?: Sleep;
|
|
33
|
+
maxAttempts?: number;
|
|
34
|
+
}): Promise<RunningRbeStatus>;
|
|
35
|
+
//# sourceMappingURL=rbe-session.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rbe-session.d.mts","sourceRoot":"","sources":["src/rbe-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gDAA4C;AAElF;;;;;GAKG;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAClD,eAAO,MAAM,YAAY,EAAE,KAAiE,CAAC;AAc7F,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE;IACJ,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC;CAChC,GACL,OAAO,CAAC,CAAC,CAAC,CAqBZ;AAED,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC,CAAC;AAEtG;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,EACnC,OAAO,EAAE,SAAS,EAClB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GACjD,OAAO,CAAC,gBAAgB,CAAC,CAY3B"}
|
package/rbe-session.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RbeStatus, XcodeClient } from "./resources/xcode-instances-helpers.js";
|
|
2
|
+
/**
|
|
3
|
+
* Client-side helpers for driving an instance's RBE stack: waiting for it to
|
|
4
|
+
* come up and riding out the transient gateway errors that occur right after
|
|
5
|
+
* instance creation. Shared by the CLI and pure-SDK consumers (e.g. CI
|
|
6
|
+
* actions).
|
|
7
|
+
*/
|
|
8
|
+
export type Sleep = (ms: number) => Promise<void>;
|
|
9
|
+
export declare const defaultSleep: Sleep;
|
|
10
|
+
export declare function isTransientError(err: unknown): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Retries `fn` on transient gateway errors (or on whatever `retryOn` matches
|
|
13
|
+
* when given). Non-matching errors propagate immediately. After exhausting
|
|
14
|
+
* `attempts`, throws the last error.
|
|
15
|
+
*/
|
|
16
|
+
export declare function retryTransient<T>(fn: () => Promise<T>, opts?: {
|
|
17
|
+
sleep?: Sleep;
|
|
18
|
+
log?: (msg: string) => void;
|
|
19
|
+
attempts?: number;
|
|
20
|
+
retryOn?: (err: unknown) => boolean;
|
|
21
|
+
}): Promise<T>;
|
|
22
|
+
/** RbeStatus once the stack is running: frontendPort and xcodeVersion are set. */
|
|
23
|
+
export type RunningRbeStatus = RbeStatus & Required<Pick<RbeStatus, 'frontendPort' | 'xcodeVersion'>>;
|
|
24
|
+
/**
|
|
25
|
+
* Polls `getRbe` until the stack is `running` (with a usable frontend port and
|
|
26
|
+
* Xcode version), starting from the `initial` status returned by `startRbe`.
|
|
27
|
+
* Each poll is wrapped in retryTransient so a transient blip mid-startup does
|
|
28
|
+
* not abort. Throws when the stack ends in `failed`, stays `starting` past
|
|
29
|
+
* `maxAttempts`, or reports `running` without the fields the caller needs.
|
|
30
|
+
*/
|
|
31
|
+
export declare function waitForRbeRunning(client: Pick<XcodeClient, 'getRbe'>, initial: RbeStatus, opts?: {
|
|
32
|
+
sleep?: Sleep;
|
|
33
|
+
maxAttempts?: number;
|
|
34
|
+
}): Promise<RunningRbeStatus>;
|
|
35
|
+
//# sourceMappingURL=rbe-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rbe-session.d.ts","sourceRoot":"","sources":["src/rbe-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,+CAA4C;AAElF;;;;;GAKG;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAClD,eAAO,MAAM,YAAY,EAAE,KAAiE,CAAC;AAc7F,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE;IACJ,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC;CAChC,GACL,OAAO,CAAC,CAAC,CAAC,CAqBZ;AAED,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC,CAAC;AAEtG;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,EACnC,OAAO,EAAE,SAAS,EAClB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GACjD,OAAO,CAAC,gBAAgB,CAAC,CAY3B"}
|