@run-cloud/sdk 0.1.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/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @run-cloud/sdk
2
+
3
+ TypeScript client for the run.cloud API.
4
+
5
+ ```bash
6
+ npm install @run-cloud/sdk
7
+ export RUN_CLOUD_API_KEY="rc_live_..."
8
+ ```
9
+
10
+ ```ts
11
+ import { Client } from "@run-cloud/sdk";
12
+
13
+ const cloud = new Client();
14
+
15
+ const ios = await cloud.ios.create({ displayName: "CI smoke" });
16
+ await cloud.ios.openUrl(ios.id, "https://example.com");
17
+ await cloud.ios.delete(ios.id);
18
+
19
+ const android = await cloud.android.create({ displayName: "Android smoke" });
20
+ await cloud.android.delete(android.id);
21
+ ```
22
+
23
+ The client reads `RUN_CLOUD_API_KEY` first, then `RUN_CLOUD_API_TOKEN`. Override
24
+ the API origin with `RUN_CLOUD_API_URL` or by passing `new Client({ apiUrl })`.
@@ -0,0 +1,123 @@
1
+ export type SimulatorPlatform = "ios" | "android";
2
+ export interface ClientOptions {
3
+ apiKey?: string;
4
+ apiUrl?: string;
5
+ fetch?: typeof fetch;
6
+ }
7
+ export interface Account {
8
+ products?: unknown[];
9
+ balanceMinutes?: string | number;
10
+ meteringStatus?: string;
11
+ [key: string]: unknown;
12
+ }
13
+ export interface Asset {
14
+ id: string;
15
+ name: string;
16
+ filename: string;
17
+ contentType: string;
18
+ byteSize: number;
19
+ createdAt: string;
20
+ }
21
+ export interface CreateSessionOptions {
22
+ model?: string;
23
+ region?: string;
24
+ displayName?: string;
25
+ labels?: Record<string, string>;
26
+ installAssets?: string[];
27
+ inactivityTimeout?: string | null;
28
+ hardTimeout?: string | null;
29
+ codec?: "auto" | "mjpeg" | "webrtc";
30
+ }
31
+ export interface SimulatorStream {
32
+ codec: string;
33
+ viewerCodec: string;
34
+ hostCodec: string;
35
+ host?: Record<string, unknown>;
36
+ }
37
+ export interface SimulatorSession {
38
+ id: string;
39
+ platform: SimulatorPlatform;
40
+ status: "active" | "released" | "failed" | string;
41
+ model?: string | null;
42
+ region?: string | null;
43
+ displayName?: string | null;
44
+ labels: Record<string, string>;
45
+ url?: string | null;
46
+ baseUrl?: string | null;
47
+ device?: string | null;
48
+ leaseId?: string | null;
49
+ codec: string;
50
+ stream: SimulatorStream;
51
+ checkedHosts: unknown[];
52
+ inactivityTimeoutSeconds?: number | null;
53
+ inactivityCountdownSeconds?: number | null;
54
+ createdAt: string;
55
+ releasedAt?: string | null;
56
+ expiresAt?: string | null;
57
+ queued?: boolean;
58
+ queueWaitMs?: number;
59
+ queueAttempts?: number;
60
+ metering?: Record<string, unknown>;
61
+ }
62
+ export declare class RunCloudError extends Error {
63
+ readonly status: number;
64
+ readonly detail: string;
65
+ constructor(status: number, detail: string);
66
+ }
67
+ export declare class Client {
68
+ readonly ios: SimulatorClient;
69
+ readonly android: SimulatorClient;
70
+ readonly simulators: SimulatorsClient;
71
+ readonly assets: AssetsClient;
72
+ private readonly apiKey;
73
+ private readonly apiUrl;
74
+ private readonly fetchImpl;
75
+ constructor(options?: ClientOptions);
76
+ account(): Promise<Account>;
77
+ request<T>(method: string, path: string, body?: unknown): Promise<T>;
78
+ uploadForm<T>(path: string, form: FormData): Promise<T>;
79
+ }
80
+ export declare class SimulatorClient {
81
+ private readonly client;
82
+ readonly platform: SimulatorPlatform;
83
+ constructor(client: Client, platform: SimulatorPlatform);
84
+ create(options?: CreateSessionOptions): Promise<SimulatorSession>;
85
+ list(options?: {
86
+ all?: boolean;
87
+ }): Promise<SimulatorSession[]>;
88
+ get(id: string): Promise<SimulatorSession>;
89
+ delete(id: string): Promise<SimulatorSession>;
90
+ openUrl(id: string, url: string): Promise<Record<string, unknown>>;
91
+ }
92
+ export declare class SimulatorsClient {
93
+ private readonly client;
94
+ constructor(client: Client);
95
+ create(options?: CreateSessionOptions & {
96
+ platform?: SimulatorPlatform;
97
+ }): Promise<SimulatorSession>;
98
+ list(options?: {
99
+ platform?: SimulatorPlatform;
100
+ all?: boolean;
101
+ }): Promise<SimulatorSession[]>;
102
+ get(id: string, options?: {
103
+ platform?: SimulatorPlatform;
104
+ }): Promise<SimulatorSession>;
105
+ delete(id: string, options?: {
106
+ platform?: SimulatorPlatform;
107
+ }): Promise<SimulatorSession>;
108
+ openUrl(id: string, url: string, options?: {
109
+ platform?: SimulatorPlatform;
110
+ }): Promise<Record<string, unknown>>;
111
+ }
112
+ export declare class AssetsClient {
113
+ private readonly client;
114
+ constructor(client: Client);
115
+ list(): Promise<Asset[]>;
116
+ upload(file: Blob, options?: {
117
+ name?: string;
118
+ filename?: string;
119
+ }): Promise<Asset>;
120
+ delete(id: string): Promise<{
121
+ deleted: boolean;
122
+ }>;
123
+ }
package/dist/index.js ADDED
@@ -0,0 +1,154 @@
1
+ export class RunCloudError extends Error {
2
+ status;
3
+ detail;
4
+ constructor(status, detail) {
5
+ super(`run.cloud API ${status}: ${detail}`);
6
+ this.status = status;
7
+ this.detail = detail;
8
+ }
9
+ }
10
+ function env(name) {
11
+ const processEnv = globalThis.process?.env;
12
+ const value = processEnv?.[name];
13
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
14
+ }
15
+ function apiKeyFromEnv() {
16
+ return env("RUN_CLOUD_API_KEY") ?? env("RUN_CLOUD_API_TOKEN");
17
+ }
18
+ function apiUrlFromEnv() {
19
+ return (env("RUN_CLOUD_API_URL") ?? "https://api.newly.app").replace(/\/+$/, "");
20
+ }
21
+ async function errorDetail(response) {
22
+ const text = await response.text();
23
+ try {
24
+ const parsed = JSON.parse(text);
25
+ for (const value of [parsed.detail, parsed.error, parsed.message]) {
26
+ if (typeof value === "string")
27
+ return value;
28
+ if (value !== undefined)
29
+ return JSON.stringify(value);
30
+ }
31
+ }
32
+ catch {
33
+ // plain text
34
+ }
35
+ return text || response.statusText;
36
+ }
37
+ export class Client {
38
+ ios;
39
+ android;
40
+ simulators;
41
+ assets;
42
+ apiKey;
43
+ apiUrl;
44
+ fetchImpl;
45
+ constructor(options = {}) {
46
+ const apiKey = options.apiKey ?? apiKeyFromEnv();
47
+ if (!apiKey) {
48
+ throw new Error("Run Cloud API key required. Set RUN_CLOUD_API_KEY or pass new Client({ apiKey }).");
49
+ }
50
+ this.apiKey = apiKey;
51
+ this.apiUrl = (options.apiUrl ?? apiUrlFromEnv()).replace(/\/+$/, "");
52
+ this.fetchImpl = options.fetch ?? fetch;
53
+ this.ios = new SimulatorClient(this, "ios");
54
+ this.android = new SimulatorClient(this, "android");
55
+ this.simulators = new SimulatorsClient(this);
56
+ this.assets = new AssetsClient(this);
57
+ }
58
+ async account() {
59
+ return await this.request("GET", "/run-cloud/account");
60
+ }
61
+ async request(method, path, body) {
62
+ const response = await this.fetchImpl(`${this.apiUrl}${path}`, {
63
+ method,
64
+ headers: {
65
+ Authorization: `Bearer ${this.apiKey}`,
66
+ ...(body === undefined ? {} : { "Content-Type": "application/json" }),
67
+ },
68
+ body: body === undefined ? undefined : JSON.stringify(body),
69
+ });
70
+ if (!response.ok)
71
+ throw new RunCloudError(response.status, await errorDetail(response));
72
+ const contentType = response.headers.get("content-type") ?? "";
73
+ return contentType.includes("application/json")
74
+ ? (await response.json())
75
+ : (await response.text());
76
+ }
77
+ async uploadForm(path, form) {
78
+ const response = await this.fetchImpl(`${this.apiUrl}${path}`, {
79
+ method: "POST",
80
+ headers: { Authorization: `Bearer ${this.apiKey}` },
81
+ body: form,
82
+ });
83
+ if (!response.ok)
84
+ throw new RunCloudError(response.status, await errorDetail(response));
85
+ return (await response.json());
86
+ }
87
+ }
88
+ export class SimulatorClient {
89
+ client;
90
+ platform;
91
+ constructor(client, platform) {
92
+ this.client = client;
93
+ this.platform = platform;
94
+ }
95
+ async create(options = {}) {
96
+ return await this.client.request("POST", `/run-cloud/${this.platform}`, options);
97
+ }
98
+ async list(options = {}) {
99
+ const query = options.all ? "?all=1" : "";
100
+ return await this.client.request("GET", `/run-cloud/${this.platform}${query}`);
101
+ }
102
+ async get(id) {
103
+ return await this.client.request("GET", `/run-cloud/${this.platform}/${encodeURIComponent(id)}`);
104
+ }
105
+ async delete(id) {
106
+ return await this.client.request("DELETE", `/run-cloud/${this.platform}/${encodeURIComponent(id)}`);
107
+ }
108
+ async openUrl(id, url) {
109
+ return await this.client.request("POST", `/run-cloud/${this.platform}/${encodeURIComponent(id)}/open-url`, { url });
110
+ }
111
+ }
112
+ export class SimulatorsClient {
113
+ client;
114
+ constructor(client) {
115
+ this.client = client;
116
+ }
117
+ async create(options = {}) {
118
+ const { platform = "ios", ...rest } = options;
119
+ return await new SimulatorClient(this.client, platform).create(rest);
120
+ }
121
+ async list(options = {}) {
122
+ const { platform = "ios", all } = options;
123
+ return await new SimulatorClient(this.client, platform).list({ all });
124
+ }
125
+ async get(id, options = {}) {
126
+ return await new SimulatorClient(this.client, options.platform ?? "ios").get(id);
127
+ }
128
+ async delete(id, options = {}) {
129
+ return await new SimulatorClient(this.client, options.platform ?? "ios").delete(id);
130
+ }
131
+ async openUrl(id, url, options = {}) {
132
+ return await new SimulatorClient(this.client, options.platform ?? "ios").openUrl(id, url);
133
+ }
134
+ }
135
+ export class AssetsClient {
136
+ client;
137
+ constructor(client) {
138
+ this.client = client;
139
+ }
140
+ async list() {
141
+ return await this.client.request("GET", "/run-cloud/assets");
142
+ }
143
+ async upload(file, options = {}) {
144
+ const form = new FormData();
145
+ form.set("file", file, options.filename ?? "app.bin");
146
+ if (options.name)
147
+ form.set("name", options.name);
148
+ return await this.client.uploadForm("/run-cloud/assets", form);
149
+ }
150
+ async delete(id) {
151
+ return await this.client.request("DELETE", `/run-cloud/assets/${encodeURIComponent(id)}`);
152
+ }
153
+ }
154
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoEA,MAAM,OAAO,aAAc,SAAQ,KAAK;IAEpB;IACA;IAFlB,YACkB,MAAc,EACd,MAAc;QAE9B,KAAK,CAAC,iB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,CAAQ;IAAG,CAAC;IAE/C,KAAK,CAAC,IAAI;QACR,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAU,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAU,EAAE,UAAgD,EAAE;QACzE,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;QACtD,IAAI,OAAO,CAAC,IAAI;YAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAQ,mBAAmB,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuB,QAAQ,EAAE,qBAAqB,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAClH,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@run-cloud/sdk",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript client for run.cloud simulators and assets",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/newly-app/natively-dev.git",
13
+ "directory": "run-cloud/sdk"
14
+ },
15
+ "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "README.md"
26
+ ],
27
+ "engines": {
28
+ "node": ">=20"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.json",
32
+ "prepack": "npm run build"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "^5.0.0"
36
+ }
37
+ }