@limrun/api 0.5.2 → 0.7.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 +27 -103
- package/client.d.mts +7 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -6
- package/client.d.ts.map +1 -1
- package/client.js +14 -8
- package/client.js.map +1 -1
- package/client.mjs +13 -7
- package/client.mjs.map +1 -1
- package/index.d.mts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -2
- package/index.js.map +1 -1
- package/index.mjs +0 -1
- package/package.json +1 -4
- package/resources/android-instances-helpers.d.mts +4 -28
- package/resources/android-instances-helpers.d.mts.map +1 -1
- package/resources/android-instances-helpers.d.ts +4 -28
- package/resources/android-instances-helpers.d.ts.map +1 -1
- package/resources/android-instances-helpers.js +18 -124
- package/resources/android-instances-helpers.js.map +1 -1
- package/resources/android-instances-helpers.mjs +16 -120
- package/resources/android-instances-helpers.mjs.map +1 -1
- package/resources/android-instances.d.mts +4 -7
- package/resources/android-instances.d.mts.map +1 -1
- package/resources/android-instances.d.ts +4 -7
- package/resources/android-instances.d.ts.map +1 -1
- package/resources/android-instances.js.map +1 -1
- package/resources/android-instances.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/instance-client.d.mts +57 -0
- package/resources/instance-client.d.mts.map +1 -0
- package/resources/instance-client.d.ts +57 -0
- package/resources/instance-client.d.ts.map +1 -0
- package/resources/instance-client.js +221 -0
- package/resources/instance-client.js.map +1 -0
- package/resources/instance-client.mjs +218 -0
- package/resources/instance-client.mjs.map +1 -0
- package/resources/tunnel.d.mts +25 -0
- package/resources/tunnel.d.mts.map +1 -0
- package/resources/tunnel.d.ts +25 -0
- package/resources/tunnel.d.ts.map +1 -0
- package/resources/tunnel.js +102 -0
- package/resources/tunnel.js.map +1 -0
- package/resources/tunnel.mjs +98 -0
- package/resources/tunnel.mjs.map +1 -0
- package/src/client.ts +19 -15
- package/src/index.ts +0 -2
- package/src/resources/android-instances-helpers.ts +25 -157
- package/src/resources/android-instances.ts +3 -8
- package/src/resources/index.ts +2 -2
- package/src/resources/instance-client.ts +350 -0
- package/src/resources/tunnel.ts +126 -0
- 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/index.d.mts
CHANGED
|
@@ -3,5 +3,4 @@ export { type Uploadable, toFile } from "./core/uploads.mjs";
|
|
|
3
3
|
export { APIPromise } from "./core/api-promise.mjs";
|
|
4
4
|
export { Limrun, type ClientOptions } from "./client.mjs";
|
|
5
5
|
export { LimrunError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
|
|
6
|
-
export * from "./resources/android-instances-helpers.mjs";
|
|
7
6
|
//# sourceMappingURL=index.d.mts.map
|
package/index.d.ts
CHANGED
|
@@ -3,5 +3,4 @@ export { type Uploadable, toFile } from "./core/uploads.js";
|
|
|
3
3
|
export { APIPromise } from "./core/api-promise.js";
|
|
4
4
|
export { Limrun, type ClientOptions } from "./client.js";
|
|
5
5
|
export { LimrunError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.js";
|
|
6
|
-
export * from "./resources/android-instances-helpers.js";
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -5,7 +5,6 @@ exports = module.exports = function (...args) {
|
|
|
5
5
|
}
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
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.Limrun = exports.APIPromise = exports.toFile = exports.default = void 0;
|
|
8
|
-
const tslib_1 = require("./internal/tslib.js");
|
|
9
8
|
var client_1 = require("./client.js");
|
|
10
9
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_1.Limrun; } });
|
|
11
10
|
var uploads_1 = require("./core/uploads.js");
|
|
@@ -28,5 +27,4 @@ Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: f
|
|
|
28
27
|
Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return error_1.InternalServerError; } });
|
|
29
28
|
Object.defineProperty(exports, "PermissionDeniedError", { enumerable: true, get: function () { return error_1.PermissionDeniedError; } });
|
|
30
29
|
Object.defineProperty(exports, "UnprocessableEntityError", { enumerable: true, get: function () { return error_1.UnprocessableEntityError; } });
|
|
31
|
-
tslib_1.__exportStar(require("./resources/android-instances-helpers.js"), exports);
|
|
32
30
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
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,yCAcsB;AAbpB,oGAAA,WAAW,OAAA;AACX,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;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
|
@@ -4,5 +4,4 @@ export { toFile } from "./core/uploads.mjs";
|
|
|
4
4
|
export { APIPromise } from "./core/api-promise.mjs";
|
|
5
5
|
export { Limrun } from "./client.mjs";
|
|
6
6
|
export { LimrunError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
|
|
7
|
-
export * from "./resources/android-instances-helpers.mjs";
|
|
8
7
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limrun/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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",
|
|
@@ -136,8 +136,5 @@
|
|
|
136
136
|
"./version.mjs": {
|
|
137
137
|
"default": "./version.mjs"
|
|
138
138
|
}
|
|
139
|
-
},
|
|
140
|
-
"optionalDependencies": {
|
|
141
|
-
"bufferutil": "^4.0.9"
|
|
142
139
|
}
|
|
143
140
|
}
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AndroidInstance } from "./android-instances.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* client to it.
|
|
6
|
-
*/
|
|
7
|
-
export declare const startAdbTunnel: (androidInstance: AndroidInstance, hostname?: string, port?: number) => Promise<Proxy>;
|
|
8
|
-
/** Returned by `startTcpProxy` – holds the chosen localhost port and a close callback. */
|
|
9
|
-
export interface Proxy {
|
|
10
|
-
address: net.AddressInfo;
|
|
11
|
-
close: () => void;
|
|
1
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
2
|
+
import { AndroidInstance, AndroidInstanceCreateParams, AndroidInstances as GeneratedAndroidInstances } from "./android-instances.mjs";
|
|
3
|
+
export declare class AndroidInstances extends GeneratedAndroidInstances {
|
|
4
|
+
getOrCreate(params: AndroidInstanceCreateParams, options?: RequestOptions): Promise<AndroidInstance>;
|
|
12
5
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Starts a one-shot TCP → WebSocket proxy.
|
|
15
|
-
*
|
|
16
|
-
* The function creates a local TCP server that listens on an ephemeral port on
|
|
17
|
-
* 127.0.0.1. As soon as the **first** TCP client connects the server stops
|
|
18
|
-
* accepting further connections and forwards all traffic between that client
|
|
19
|
-
* and `remoteURL` through an authenticated WebSocket. If you need to proxy
|
|
20
|
-
* more than one TCP connection, call `startTcpProxy` again to create a new
|
|
21
|
-
* proxy instance.
|
|
22
|
-
*
|
|
23
|
-
* @param remoteURL Remote WebSocket endpoint (e.g. wss://example.com/instance)
|
|
24
|
-
* @param token Bearer token sent as `Authorization` header
|
|
25
|
-
* @param hostname Optional IP address to listen on. Default is 127.0.0.1
|
|
26
|
-
* @param port Optional port number to listen on. Default is to ask Node.js
|
|
27
|
-
* to find an available non-privileged port.
|
|
28
|
-
*/
|
|
29
|
-
export declare function startTcpProxy(remoteURL: string, token: string, hostname: string, port: number): Promise<Proxy>;
|
|
30
6
|
//# sourceMappingURL=android-instances-helpers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances-helpers.d.mts","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"android-instances-helpers.d.mts","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;OAClB,EACL,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,IAAI,yBAAyB,EAC9C;AAED,qBAAa,gBAAiB,SAAQ,yBAAyB;IACvD,WAAW,CAAC,MAAM,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAkB3G"}
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AndroidInstance } from "./android-instances.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* client to it.
|
|
6
|
-
*/
|
|
7
|
-
export declare const startAdbTunnel: (androidInstance: AndroidInstance, hostname?: string, port?: number) => Promise<Proxy>;
|
|
8
|
-
/** Returned by `startTcpProxy` – holds the chosen localhost port and a close callback. */
|
|
9
|
-
export interface Proxy {
|
|
10
|
-
address: net.AddressInfo;
|
|
11
|
-
close: () => void;
|
|
1
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
2
|
+
import { AndroidInstance, AndroidInstanceCreateParams, AndroidInstances as GeneratedAndroidInstances } from "./android-instances.js";
|
|
3
|
+
export declare class AndroidInstances extends GeneratedAndroidInstances {
|
|
4
|
+
getOrCreate(params: AndroidInstanceCreateParams, options?: RequestOptions): Promise<AndroidInstance>;
|
|
12
5
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Starts a one-shot TCP → WebSocket proxy.
|
|
15
|
-
*
|
|
16
|
-
* The function creates a local TCP server that listens on an ephemeral port on
|
|
17
|
-
* 127.0.0.1. As soon as the **first** TCP client connects the server stops
|
|
18
|
-
* accepting further connections and forwards all traffic between that client
|
|
19
|
-
* and `remoteURL` through an authenticated WebSocket. If you need to proxy
|
|
20
|
-
* more than one TCP connection, call `startTcpProxy` again to create a new
|
|
21
|
-
* proxy instance.
|
|
22
|
-
*
|
|
23
|
-
* @param remoteURL Remote WebSocket endpoint (e.g. wss://example.com/instance)
|
|
24
|
-
* @param token Bearer token sent as `Authorization` header
|
|
25
|
-
* @param hostname Optional IP address to listen on. Default is 127.0.0.1
|
|
26
|
-
* @param port Optional port number to listen on. Default is to ask Node.js
|
|
27
|
-
* to find an available non-privileged port.
|
|
28
|
-
*/
|
|
29
|
-
export declare function startTcpProxy(remoteURL: string, token: string, hostname: string, port: number): Promise<Proxy>;
|
|
30
6
|
//# sourceMappingURL=android-instances-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances-helpers.d.ts","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"android-instances-helpers.d.ts","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,EAAE;OAClB,EACL,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,IAAI,yBAAyB,EAC9C;AAED,qBAAa,gBAAiB,SAAQ,yBAAyB;IACvD,WAAW,CAAC,MAAM,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAkB3G"}
|
|
@@ -1,129 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
exports.AndroidInstances = void 0;
|
|
4
|
+
const android_instances_1 = require("./android-instances.js");
|
|
5
|
+
class AndroidInstances extends android_instances_1.AndroidInstances {
|
|
6
|
+
async getOrCreate(params, options) {
|
|
7
|
+
if (!params.metadata || !params.metadata.labels || Object.keys(params.metadata.labels).length === 0) {
|
|
8
|
+
return Promise.reject(new Error('At least one label is required for getOrCreate operation'));
|
|
9
|
+
}
|
|
10
|
+
const instances = await super.list({
|
|
11
|
+
labelSelector: Object.entries(params.metadata.labels)
|
|
12
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
13
|
+
.join(','),
|
|
14
|
+
state: 'ready',
|
|
15
|
+
}, options);
|
|
16
|
+
if (instances && instances.length > 0) {
|
|
17
|
+
return instances[0];
|
|
18
|
+
}
|
|
19
|
+
return super.create(params, options);
|
|
16
20
|
}
|
|
17
|
-
const { address, close } = await startTcpProxy(androidInstance.status.adbWebSocketUrl, androidInstance.status.token, hostname ?? '127.0.0.1', port ?? 0);
|
|
18
|
-
try {
|
|
19
|
-
await new Promise((resolve, reject) => {
|
|
20
|
-
(0, child_process_1.exec)(`adb connect ${address.address}:${address.port}`, (err) => {
|
|
21
|
-
if (err)
|
|
22
|
-
return reject(err);
|
|
23
|
-
resolve();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
catch (err) {
|
|
28
|
-
close();
|
|
29
|
-
throw err;
|
|
30
|
-
}
|
|
31
|
-
return { address, close };
|
|
32
|
-
};
|
|
33
|
-
exports.startAdbTunnel = startAdbTunnel;
|
|
34
|
-
/**
|
|
35
|
-
* Starts a one-shot TCP → WebSocket proxy.
|
|
36
|
-
*
|
|
37
|
-
* The function creates a local TCP server that listens on an ephemeral port on
|
|
38
|
-
* 127.0.0.1. As soon as the **first** TCP client connects the server stops
|
|
39
|
-
* accepting further connections and forwards all traffic between that client
|
|
40
|
-
* and `remoteURL` through an authenticated WebSocket. If you need to proxy
|
|
41
|
-
* more than one TCP connection, call `startTcpProxy` again to create a new
|
|
42
|
-
* proxy instance.
|
|
43
|
-
*
|
|
44
|
-
* @param remoteURL Remote WebSocket endpoint (e.g. wss://example.com/instance)
|
|
45
|
-
* @param token Bearer token sent as `Authorization` header
|
|
46
|
-
* @param hostname Optional IP address to listen on. Default is 127.0.0.1
|
|
47
|
-
* @param port Optional port number to listen on. Default is to ask Node.js
|
|
48
|
-
* to find an available non-privileged port.
|
|
49
|
-
*/
|
|
50
|
-
async function startTcpProxy(remoteURL, token, hostname, port) {
|
|
51
|
-
return new Promise((resolve, reject) => {
|
|
52
|
-
const server = net.createServer();
|
|
53
|
-
let ws;
|
|
54
|
-
let pingInterval;
|
|
55
|
-
// close helper
|
|
56
|
-
const close = () => {
|
|
57
|
-
if (pingInterval) {
|
|
58
|
-
clearInterval(pingInterval);
|
|
59
|
-
pingInterval = undefined;
|
|
60
|
-
}
|
|
61
|
-
if (ws && ws.readyState === ws_1.WebSocket.OPEN) {
|
|
62
|
-
ws.close(1000, 'close');
|
|
63
|
-
}
|
|
64
|
-
if (server.listening) {
|
|
65
|
-
server.close();
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
// No AbortController support – proxy can be closed via the returned handle
|
|
69
|
-
// TCP server error
|
|
70
|
-
server.once('error', (err) => {
|
|
71
|
-
close();
|
|
72
|
-
reject(new Error(`TCP server error: ${err.message}`));
|
|
73
|
-
});
|
|
74
|
-
// Listening
|
|
75
|
-
server.once('listening', () => {
|
|
76
|
-
const address = server.address();
|
|
77
|
-
if (!address || typeof address === 'string') {
|
|
78
|
-
close();
|
|
79
|
-
return reject(new Error('Failed to obtain listening address'));
|
|
80
|
-
}
|
|
81
|
-
resolve({ address, close });
|
|
82
|
-
});
|
|
83
|
-
// On first TCP connection
|
|
84
|
-
server.on('connection', (tcpSocket) => {
|
|
85
|
-
// Single-connection proxy
|
|
86
|
-
server.close();
|
|
87
|
-
ws = new ws_1.WebSocket(remoteURL, {
|
|
88
|
-
headers: { Authorization: `Bearer ${token}` },
|
|
89
|
-
perMessageDeflate: false,
|
|
90
|
-
});
|
|
91
|
-
// WebSocket error
|
|
92
|
-
ws.once('error', (err) => {
|
|
93
|
-
console.error('WebSocket error:', err);
|
|
94
|
-
tcpSocket.destroy();
|
|
95
|
-
close();
|
|
96
|
-
});
|
|
97
|
-
ws.once('open', () => {
|
|
98
|
-
const socket = ws; // non-undefined after open
|
|
99
|
-
pingInterval = setInterval(() => {
|
|
100
|
-
if (socket.readyState === ws_1.WebSocket.OPEN) {
|
|
101
|
-
socket.ping();
|
|
102
|
-
}
|
|
103
|
-
}, 30000);
|
|
104
|
-
// TCP → WS
|
|
105
|
-
tcpSocket.on('data', (chunk) => {
|
|
106
|
-
if (socket.readyState === ws_1.WebSocket.OPEN) {
|
|
107
|
-
socket.send(chunk);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
// WS → TCP
|
|
111
|
-
socket.on('message', (data) => {
|
|
112
|
-
if (!tcpSocket.destroyed) {
|
|
113
|
-
tcpSocket.write(data);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
// Mutual close
|
|
118
|
-
tcpSocket.on('close', close);
|
|
119
|
-
tcpSocket.on('error', (err) => {
|
|
120
|
-
console.error('TCP socket error:', err);
|
|
121
|
-
close();
|
|
122
|
-
});
|
|
123
|
-
ws.on('close', () => tcpSocket.destroy());
|
|
124
|
-
});
|
|
125
|
-
// Start listening
|
|
126
|
-
server.listen(port, hostname);
|
|
127
|
-
});
|
|
128
21
|
}
|
|
22
|
+
exports.AndroidInstances = AndroidInstances;
|
|
129
23
|
//# sourceMappingURL=android-instances-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances-helpers.js","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"android-instances-helpers.js","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":";;;AACA,8DAI6B;AAE7B,MAAa,gBAAiB,SAAQ,oCAAyB;IAC7D,KAAK,CAAC,WAAW,CAAC,MAAmC,EAAE,OAAwB;QAC7E,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpG,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC,CAAC;QAC/F,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,IAAI,CAChC;YACE,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAClD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;iBACxC,IAAI,CAAC,GAAG,CAAC;YACZ,KAAK,EAAE,OAAO;SACf,EACD,OAAO,CACR,CAAC;QACF,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC;QACvB,CAAC;QACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAnBD,4CAmBC"}
|
|
@@ -1,123 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { AndroidInstances as GeneratedAndroidInstances, } from "./android-instances.mjs";
|
|
2
|
+
export class AndroidInstances extends GeneratedAndroidInstances {
|
|
3
|
+
async getOrCreate(params, options) {
|
|
4
|
+
if (!params.metadata || !params.metadata.labels || Object.keys(params.metadata.labels).length === 0) {
|
|
5
|
+
return Promise.reject(new Error('At least one label is required for getOrCreate operation'));
|
|
6
|
+
}
|
|
7
|
+
const instances = await super.list({
|
|
8
|
+
labelSelector: Object.entries(params.metadata.labels)
|
|
9
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
10
|
+
.join(','),
|
|
11
|
+
state: 'ready',
|
|
12
|
+
}, options);
|
|
13
|
+
if (instances && instances.length > 0) {
|
|
14
|
+
return instances[0];
|
|
15
|
+
}
|
|
16
|
+
return super.create(params, options);
|
|
11
17
|
}
|
|
12
|
-
const { address, close } = await startTcpProxy(androidInstance.status.adbWebSocketUrl, androidInstance.status.token, hostname ?? '127.0.0.1', port ?? 0);
|
|
13
|
-
try {
|
|
14
|
-
await new Promise((resolve, reject) => {
|
|
15
|
-
exec(`adb connect ${address.address}:${address.port}`, (err) => {
|
|
16
|
-
if (err)
|
|
17
|
-
return reject(err);
|
|
18
|
-
resolve();
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
catch (err) {
|
|
23
|
-
close();
|
|
24
|
-
throw err;
|
|
25
|
-
}
|
|
26
|
-
return { address, close };
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Starts a one-shot TCP → WebSocket proxy.
|
|
30
|
-
*
|
|
31
|
-
* The function creates a local TCP server that listens on an ephemeral port on
|
|
32
|
-
* 127.0.0.1. As soon as the **first** TCP client connects the server stops
|
|
33
|
-
* accepting further connections and forwards all traffic between that client
|
|
34
|
-
* and `remoteURL` through an authenticated WebSocket. If you need to proxy
|
|
35
|
-
* more than one TCP connection, call `startTcpProxy` again to create a new
|
|
36
|
-
* proxy instance.
|
|
37
|
-
*
|
|
38
|
-
* @param remoteURL Remote WebSocket endpoint (e.g. wss://example.com/instance)
|
|
39
|
-
* @param token Bearer token sent as `Authorization` header
|
|
40
|
-
* @param hostname Optional IP address to listen on. Default is 127.0.0.1
|
|
41
|
-
* @param port Optional port number to listen on. Default is to ask Node.js
|
|
42
|
-
* to find an available non-privileged port.
|
|
43
|
-
*/
|
|
44
|
-
export async function startTcpProxy(remoteURL, token, hostname, port) {
|
|
45
|
-
return new Promise((resolve, reject) => {
|
|
46
|
-
const server = net.createServer();
|
|
47
|
-
let ws;
|
|
48
|
-
let pingInterval;
|
|
49
|
-
// close helper
|
|
50
|
-
const close = () => {
|
|
51
|
-
if (pingInterval) {
|
|
52
|
-
clearInterval(pingInterval);
|
|
53
|
-
pingInterval = undefined;
|
|
54
|
-
}
|
|
55
|
-
if (ws && ws.readyState === WebSocket.OPEN) {
|
|
56
|
-
ws.close(1000, 'close');
|
|
57
|
-
}
|
|
58
|
-
if (server.listening) {
|
|
59
|
-
server.close();
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
// No AbortController support – proxy can be closed via the returned handle
|
|
63
|
-
// TCP server error
|
|
64
|
-
server.once('error', (err) => {
|
|
65
|
-
close();
|
|
66
|
-
reject(new Error(`TCP server error: ${err.message}`));
|
|
67
|
-
});
|
|
68
|
-
// Listening
|
|
69
|
-
server.once('listening', () => {
|
|
70
|
-
const address = server.address();
|
|
71
|
-
if (!address || typeof address === 'string') {
|
|
72
|
-
close();
|
|
73
|
-
return reject(new Error('Failed to obtain listening address'));
|
|
74
|
-
}
|
|
75
|
-
resolve({ address, close });
|
|
76
|
-
});
|
|
77
|
-
// On first TCP connection
|
|
78
|
-
server.on('connection', (tcpSocket) => {
|
|
79
|
-
// Single-connection proxy
|
|
80
|
-
server.close();
|
|
81
|
-
ws = new WebSocket(remoteURL, {
|
|
82
|
-
headers: { Authorization: `Bearer ${token}` },
|
|
83
|
-
perMessageDeflate: false,
|
|
84
|
-
});
|
|
85
|
-
// WebSocket error
|
|
86
|
-
ws.once('error', (err) => {
|
|
87
|
-
console.error('WebSocket error:', err);
|
|
88
|
-
tcpSocket.destroy();
|
|
89
|
-
close();
|
|
90
|
-
});
|
|
91
|
-
ws.once('open', () => {
|
|
92
|
-
const socket = ws; // non-undefined after open
|
|
93
|
-
pingInterval = setInterval(() => {
|
|
94
|
-
if (socket.readyState === WebSocket.OPEN) {
|
|
95
|
-
socket.ping();
|
|
96
|
-
}
|
|
97
|
-
}, 30000);
|
|
98
|
-
// TCP → WS
|
|
99
|
-
tcpSocket.on('data', (chunk) => {
|
|
100
|
-
if (socket.readyState === WebSocket.OPEN) {
|
|
101
|
-
socket.send(chunk);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
// WS → TCP
|
|
105
|
-
socket.on('message', (data) => {
|
|
106
|
-
if (!tcpSocket.destroyed) {
|
|
107
|
-
tcpSocket.write(data);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
// Mutual close
|
|
112
|
-
tcpSocket.on('close', close);
|
|
113
|
-
tcpSocket.on('error', (err) => {
|
|
114
|
-
console.error('TCP socket error:', err);
|
|
115
|
-
close();
|
|
116
|
-
});
|
|
117
|
-
ws.on('close', () => tcpSocket.destroy());
|
|
118
|
-
});
|
|
119
|
-
// Start listening
|
|
120
|
-
server.listen(port, hostname);
|
|
121
|
-
});
|
|
122
18
|
}
|
|
123
19
|
//# sourceMappingURL=android-instances-helpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances-helpers.mjs","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"android-instances-helpers.mjs","sourceRoot":"","sources":["../src/resources/android-instances-helpers.ts"],"names":[],"mappings":"OACO,EAGL,gBAAgB,IAAI,yBAAyB,GAC9C;AAED,MAAM,OAAO,gBAAiB,SAAQ,yBAAyB;IAC7D,KAAK,CAAC,WAAW,CAAC,MAAmC,EAAE,OAAwB;QAC7E,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpG,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC,CAAC;QAC/F,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,IAAI,CAChC;YACE,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAClD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;iBACxC,IAAI,CAAC,GAAG,CAAC;YACZ,KAAK,EAAE,OAAO;SACf,EACD,OAAO,CACR,CAAC;QACF,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC;QACvB,CAAC;QACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as AndroidInstancesAPI from "./android-instances.mjs";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
4
|
export declare class AndroidInstances extends APIResource {
|
|
@@ -45,8 +44,7 @@ export declare namespace AndroidInstance {
|
|
|
45
44
|
inactivityTimeout: string;
|
|
46
45
|
/**
|
|
47
46
|
* The region where the instance will be created. If not given, will be decided
|
|
48
|
-
* based on
|
|
49
|
-
* availability.
|
|
47
|
+
* based on scheduling clues and availability.
|
|
50
48
|
*/
|
|
51
49
|
region: string;
|
|
52
50
|
/**
|
|
@@ -57,12 +55,11 @@ export declare namespace AndroidInstance {
|
|
|
57
55
|
}
|
|
58
56
|
interface Status {
|
|
59
57
|
token: string;
|
|
60
|
-
state:
|
|
58
|
+
state: 'unknown' | 'creating' | 'ready' | 'terminated';
|
|
61
59
|
adbWebSocketUrl?: string;
|
|
62
60
|
endpointWebSocketUrl?: string;
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
|
-
export type AndroidInstanceState = 'unknown' | 'creating' | 'ready' | 'terminated';
|
|
66
63
|
export type AndroidInstanceListResponse = Array<AndroidInstance>;
|
|
67
64
|
export interface AndroidInstanceCreateParams {
|
|
68
65
|
/**
|
|
@@ -131,9 +128,9 @@ export interface AndroidInstanceListParams {
|
|
|
131
128
|
/**
|
|
132
129
|
* State filter to apply to Android instances to return.
|
|
133
130
|
*/
|
|
134
|
-
state?:
|
|
131
|
+
state?: 'unknown' | 'creating' | 'ready' | 'terminated';
|
|
135
132
|
}
|
|
136
133
|
export declare namespace AndroidInstances {
|
|
137
|
-
export { type AndroidInstance as AndroidInstance, type
|
|
134
|
+
export { type AndroidInstance as AndroidInstance, type AndroidInstanceListResponse as AndroidInstanceListResponse, type AndroidInstanceCreateParams as AndroidInstanceCreateParams, type AndroidInstanceListParams as AndroidInstanceListParams, };
|
|
138
135
|
}
|
|
139
136
|
//# sourceMappingURL=android-instances.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances.d.mts","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,
|
|
1
|
+
{"version":3,"file":"android-instances.d.mts","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as AndroidInstancesAPI from "./android-instances.js";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
4
|
export declare class AndroidInstances extends APIResource {
|
|
@@ -45,8 +44,7 @@ export declare namespace AndroidInstance {
|
|
|
45
44
|
inactivityTimeout: string;
|
|
46
45
|
/**
|
|
47
46
|
* The region where the instance will be created. If not given, will be decided
|
|
48
|
-
* based on
|
|
49
|
-
* availability.
|
|
47
|
+
* based on scheduling clues and availability.
|
|
50
48
|
*/
|
|
51
49
|
region: string;
|
|
52
50
|
/**
|
|
@@ -57,12 +55,11 @@ export declare namespace AndroidInstance {
|
|
|
57
55
|
}
|
|
58
56
|
interface Status {
|
|
59
57
|
token: string;
|
|
60
|
-
state:
|
|
58
|
+
state: 'unknown' | 'creating' | 'ready' | 'terminated';
|
|
61
59
|
adbWebSocketUrl?: string;
|
|
62
60
|
endpointWebSocketUrl?: string;
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
|
-
export type AndroidInstanceState = 'unknown' | 'creating' | 'ready' | 'terminated';
|
|
66
63
|
export type AndroidInstanceListResponse = Array<AndroidInstance>;
|
|
67
64
|
export interface AndroidInstanceCreateParams {
|
|
68
65
|
/**
|
|
@@ -131,9 +128,9 @@ export interface AndroidInstanceListParams {
|
|
|
131
128
|
/**
|
|
132
129
|
* State filter to apply to Android instances to return.
|
|
133
130
|
*/
|
|
134
|
-
state?:
|
|
131
|
+
state?: 'unknown' | 'creating' | 'ready' | 'terminated';
|
|
135
132
|
}
|
|
136
133
|
export declare namespace AndroidInstances {
|
|
137
|
-
export { type AndroidInstance as AndroidInstance, type
|
|
134
|
+
export { type AndroidInstance as AndroidInstance, type AndroidInstanceListResponse as AndroidInstanceListResponse, type AndroidInstanceCreateParams as AndroidInstanceCreateParams, type AndroidInstanceListParams as AndroidInstanceListParams, };
|
|
138
135
|
}
|
|
139
136
|
//# sourceMappingURL=android-instances.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances.d.ts","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,
|
|
1
|
+
{"version":3,"file":"android-instances.d.ts","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances.js","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"android-instances.js","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;OAEG;IACH,MAAM,CAAC,MAAmC,EAAE,OAAwB;QAClE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,EAAE,EAAE;YAC5D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF;AAnCD,4CAmCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-instances.mjs","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"android-instances.mjs","sourceRoot":"","sources":["../src/resources/android-instances.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;OAEG;IACH,MAAM,CAAC,MAAmC,EAAE,OAAwB;QAClE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,EAAE,EAAE,EAAE;YAC5D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,yBAAyB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { type AndroidInstance, type AndroidInstanceListResponse, type AndroidInstanceCreateParams, type AndroidInstanceListParams, } from "./android-instances.mjs";
|
|
2
2
|
export { type Asset, type AssetListResponse, type AssetGetOrCreateResponse, type AssetListParams, type AssetGetParams, type AssetGetOrCreateParams, } from "./assets.mjs";
|
|
3
|
+
export { AndroidInstances } from "./android-instances-helpers.mjs";
|
|
3
4
|
export { Assets, AssetGetOrUploadParams, AssetGetOrUploadResponse } from "./assets-helpers.mjs";
|
|
4
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC5B;OAEM,EAAE,gBAAgB,EAAE;OAEpB,EAAE,MAAM,EAAE,sBAAsB,EAAE,wBAAwB,EAAE"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { type AndroidInstance, type AndroidInstanceListResponse, type AndroidInstanceCreateParams, type AndroidInstanceListParams, } from "./android-instances.js";
|
|
2
2
|
export { type Asset, type AssetListResponse, type AssetGetOrCreateResponse, type AssetListParams, type AssetGetParams, type AssetGetOrCreateParams, } from "./assets.js";
|
|
3
|
+
export { AndroidInstances } from "./android-instances-helpers.js";
|
|
3
4
|
export { Assets, AssetGetOrUploadParams, AssetGetOrUploadResponse } from "./assets-helpers.js";
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|