@elaraai/e3-cloud-client 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -1
- package/dist/src/files.d.ts +69 -9
- package/dist/src/files.d.ts.map +1 -1
- package/dist/src/files.js +262 -12
- package/dist/src/files.js.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/platform.d.ts +25 -0
- package/dist/src/platform.d.ts.map +1 -0
- package/dist/src/platform.js +35 -0
- package/dist/src/platform.js.map +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
HTTP client library for the e3 cloud API: what e3's own API client
|
|
4
4
|
(`@elaraai/e3-api-client`) doesn't cover — users and roles, schedules, task
|
|
5
5
|
configs, secrets, record history and backups, feedback, apps, releases and
|
|
6
|
-
staging,
|
|
6
|
+
staging, Files, rack delegation, and which releases a deployment runs.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
@@ -44,6 +44,16 @@ await removeUser('https://e3.example.com', 'my-repo', 'user-id', options);
|
|
|
44
44
|
|
|
45
45
|
Get current user info.
|
|
46
46
|
|
|
47
|
+
### `platformVersions(url, options): Promise<PlatformVersions | null>`
|
|
48
|
+
|
|
49
|
+
What a deployment runs (`GET /api/platform`, anyone signed in): its e3 cloud
|
|
50
|
+
release (`e3Cloud`, none where its deploy named none), the e3 release its
|
|
51
|
+
platform and runners run (`e3`), and each next e3 an app's bundle is staged
|
|
52
|
+
for in the repositories the caller manages (`staged`); `null` from a
|
|
53
|
+
deployment that predates it. e3 refuses a package a newer e3 exported, so a
|
|
54
|
+
project can tell here, before a deploy fails, whether it fits.
|
|
55
|
+
`e3-cloud whoami <server>` prints it.
|
|
56
|
+
|
|
47
57
|
### `repoUsers(url, repo, options): Promise<RepoUser[]>`
|
|
48
58
|
|
|
49
59
|
List the people of a repository (owner or admin).
|
|
@@ -211,6 +221,46 @@ A release throws `ApiError` with `not_found`, `not_staging`, `workspace_busy`
|
|
|
211
221
|
`releasePlanRefusalLines` print a plan's problems; the `Release*` types and
|
|
212
222
|
`RELEASE_CARRY_MAX` are re-exported from `@elaraai/e3-cloud-types`.
|
|
213
223
|
|
|
224
|
+
### Files
|
|
225
|
+
|
|
226
|
+
A workspace's Files (owners and admins): the inputs a solution fills from
|
|
227
|
+
files in a bucket, and its records seeded or fed from them, declared with
|
|
228
|
+
`@elaraai/e3-cloud-files`.
|
|
229
|
+
|
|
230
|
+
| Function | Answers |
|
|
231
|
+
|---|---|
|
|
232
|
+
| `getFiles(url, repo, ws, options)` | `FilesWorkspace`: the declarations, bindings and last sync, what each mapping holds (and whether its record is pending), where the repository's bindings may point, and the sync under way |
|
|
233
|
+
| `deployFiles(url, repo, ws, manifest, options, { dryRun?, force? })` | `deployed` (with the targets the next sync takes again whole), `checked` (a dry run) or `refused` with every problem; `workspace_protected` for a protected workspace, unforced |
|
|
234
|
+
| `bindFilesSource(url, repo, ws, binding, options)` | `bound` (with the targets taken again whole) or `refused` |
|
|
235
|
+
| `startFilesSync(url, repo, ws, { dryRun?, targets?, reset? }, options)` | `started` with the sync's id, or `running` with the one under way |
|
|
236
|
+
| `getFilesSync(url, repo, ws, id, options)`, `filesSyncWait(url, repo, ws, id, options, { onProgress?, signal?, refresh?, deadlineMs? })` | `FilesSyncJob`: where the sync is and its report per target; the wait polls it to its end (250 ms, backing off to 2 s, and to 5 s once it has run a minute) |
|
|
237
|
+
| `planFilesPush(url, repo, ws, { files, as }, options)` | `FilesPushPlan`: per file `put` (its target, source, key, and how to upload it: `single`, `multipart` or `external`), `unchanged` or `refused` (`filesPushRefusalText`), and the bindings the puts go to; at most 1,000 files |
|
|
238
|
+
| `uploadFilesPush(url, repo, ws, plan, put, bytes, options, refresh?)` | Uploads one put through the platform: `single` as one PUT with the plan's headers, `multipart` part by part, completed under the object's key in its bucket (the binding's prefix, then the plan's key); throws for `external` (your own credentials) |
|
|
239
|
+
| `completeFilesPush(url, repo, ws, { key, uploadId, parts }, options)` | A multipart upload's completion (`uploadFilesPush` makes it): `{ etag }` |
|
|
240
|
+
|
|
241
|
+
A push offers each file with its name, size, SHA-256 and beast2 header type.
|
|
242
|
+
A workspace's dataset is offered as the file of its value: its
|
|
243
|
+
`dataset` names its workspace, its name and the hash of the value read, its
|
|
244
|
+
bytes are the value as `e3 dataset get -f beast2` writes it, and it is
|
|
245
|
+
matched to the `file` or `latest` mapping filling the input or record of its
|
|
246
|
+
name (a `latest`'s key `<name>.beast2` under its prefix); its signed put
|
|
247
|
+
carries where it came from (`e3-dataset`, `e3-dataset-hash`), which the
|
|
248
|
+
seed's or feed's history names. `bytes` is a `FilesPushBytes`:
|
|
249
|
+
|
|
250
|
+
- `size`: the bytes the plan was given;
|
|
251
|
+
- `read(start)`: the bytes from `start` to the end, read afresh each time;
|
|
252
|
+
- `ranged`: whether a read may start anywhere for nothing. A file on disk
|
|
253
|
+
is, so a multipart upload sends four parts at a time, each read from its
|
|
254
|
+
own start; a dataset's value streams from its repository (`ranged: false`),
|
|
255
|
+
its parts sent one after another from one read, a part sent again read
|
|
256
|
+
again from its start, the value never held whole.
|
|
257
|
+
|
|
258
|
+
A source that throws as its bytes end (a dataset a run wrote again while it
|
|
259
|
+
was read) is raised as it is: its last bytes are sent only once it has
|
|
260
|
+
ended, so no request of other bytes than the planned ones is ever whole, and
|
|
261
|
+
its upload is never completed. `e3-cloud files push` does all of this, then
|
|
262
|
+
syncs the targets put.
|
|
263
|
+
|
|
214
264
|
## Error Handling
|
|
215
265
|
|
|
216
266
|
All API functions throw on failure. Two error types are re-exported from `@elaraai/e3-api-client`:
|
package/dist/src/files.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import { type FilesBindResponse, type FilesBinding, type FilesDeployResponse, type FilesManifest, type FilesPushCompleteRequest, type FilesPushCompleteResponse, type FilesPushPlan, type FilesPushRequest, type FilesSyncJob, type FilesSyncStart, type FilesTarget, type FilesWorkspace } from '@elaraai/e3-cloud-types';
|
|
5
|
+
import { type FilesBindResponse, type FilesBinding, type FilesDeployResponse, type FilesManifest, type FilesPushCompleteRequest, type FilesPushCompleteResponse, type FilesPushOutcome, type FilesPushPlan, type FilesPushRequest, type FilesSyncJob, type FilesSyncStart, type FilesTarget, type FilesWorkspace } from '@elaraai/e3-cloud-types';
|
|
6
6
|
import { type RequestOptions } from '@elaraai/e3-api-client';
|
|
7
7
|
/**
|
|
8
8
|
* A workspace's Files: its declarations, its bindings and its last sync,
|
|
@@ -79,18 +79,27 @@ export interface FilesSyncOptions {
|
|
|
79
79
|
*/
|
|
80
80
|
export declare function startFilesSync(url: string, repo: string, ws: string, request: FilesSyncOptions, options: RequestOptions): Promise<FilesSyncStart>;
|
|
81
81
|
/**
|
|
82
|
-
* Plan a push of files
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
82
|
+
* Plan a push of files into a source: each file matched to the mapping that
|
|
83
|
+
* takes it (by its name, or the target named), checked against the mapping's
|
|
84
|
+
* type and limit, and answered `put` with how to upload it (a presigned PUT
|
|
85
|
+
* bound to its SHA-256, a multipart upload with a URL per part, or `external`
|
|
86
|
+
* for a bucket the platform does not write), `unchanged` when the source
|
|
87
|
+
* holds those bytes already, or `refused`. The plan writes nothing; the sync
|
|
88
|
+
* that follows takes the files in.
|
|
89
|
+
*
|
|
90
|
+
* A file may be a workspace's dataset: its `dataset` names the
|
|
91
|
+
* dataset's workspace and name in the repository it was read from and the
|
|
92
|
+
* hash of the value read, and its bytes are the value as `e3 dataset get -f
|
|
93
|
+
* beast2` writes it, its `type` the value's. It is matched by its name, the
|
|
94
|
+
* mapping filling an input or a record of the dataset's name, at the
|
|
95
|
+
* mapping's key (a `latest`'s, `<name>.beast2` under its prefix); a folder
|
|
96
|
+
* or a listing takes none. A signed put carries where it came from, which
|
|
97
|
+
* the seed's or the feed's history names.
|
|
89
98
|
*
|
|
90
99
|
* @param url - Base URL of the e3 API server
|
|
91
100
|
* @param repo - Repository name
|
|
92
101
|
* @param ws - Workspace name
|
|
93
|
-
* @param request - The files (name, size, SHA-256, beast2 type), and the target they are all for, if named
|
|
102
|
+
* @param request - The files (name, size, SHA-256, beast2 type, and a dataset's own), and the target they are all for, if named
|
|
94
103
|
* @param options - Request options including auth token
|
|
95
104
|
* @returns The plan
|
|
96
105
|
* @throws {ApiError} `bad_request` for more than 1,000 files, or a workspace
|
|
@@ -109,6 +118,57 @@ export declare function planFilesPush(url: string, repo: string, ws: string, req
|
|
|
109
118
|
* @throws {ApiError} `not_found` for an upload the bucket does not know; `bad_request` for a key outside the repository's folder
|
|
110
119
|
*/
|
|
111
120
|
export declare function completeFilesPush(url: string, repo: string, ws: string, completion: FilesPushCompleteRequest, options: RequestOptions): Promise<FilesPushCompleteResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* A file's bytes as a push uploads them: how many, and the bytes from an
|
|
123
|
+
* offset to the end, read afresh each time they are asked for.
|
|
124
|
+
*
|
|
125
|
+
* A file on disk is read by range (`ranged`), so a multipart upload sends
|
|
126
|
+
* four parts at a time, each read from its own start. A dataset's value
|
|
127
|
+
* streams from its repository a segment at a time, so its parts go one
|
|
128
|
+
* after another from one read, a part sent again read again from its start,
|
|
129
|
+
* and the value is never held whole. A source that may change under a read
|
|
130
|
+
* (a dataset a run writes again) throws as its bytes end when they are not
|
|
131
|
+
* the bytes planned: its last bytes are sent only once it has ended, so a
|
|
132
|
+
* request of other bytes is never whole and their upload never completed.
|
|
133
|
+
*/
|
|
134
|
+
export interface FilesPushBytes {
|
|
135
|
+
/** How many bytes: the size the plan was given */
|
|
136
|
+
readonly size: number;
|
|
137
|
+
/**
|
|
138
|
+
* The bytes from `start` to the end, in order.
|
|
139
|
+
*
|
|
140
|
+
* @param start - The first byte's offset
|
|
141
|
+
*/
|
|
142
|
+
read(start: number): AsyncIterable<Uint8Array>;
|
|
143
|
+
/** Whether a read may start anywhere for nothing, as a file's does */
|
|
144
|
+
readonly ranged: boolean;
|
|
145
|
+
}
|
|
146
|
+
/** A put a push's plan answers: its target, its source, its key under the source's binding, and how to upload it. */
|
|
147
|
+
export type FilesPushPut = Extract<FilesPushOutcome, {
|
|
148
|
+
type: 'put';
|
|
149
|
+
}>['value'];
|
|
150
|
+
/**
|
|
151
|
+
* Upload a file a push's plan says to put through the platform: `single`, one
|
|
152
|
+
* PUT with the plan's headers (its SHA-256, and for a dataset where it came
|
|
153
|
+
* from); or `multipart`, part by part to each part's URL, then completed
|
|
154
|
+
* through the API ({@link completeFilesPush}) under the object's key in its
|
|
155
|
+
* bucket. A request that fails as e3's do is sent again with its bytes read
|
|
156
|
+
* again; a source that throws (a dataset that moved while it was read) is
|
|
157
|
+
* raised as it is, and its upload is never completed.
|
|
158
|
+
*
|
|
159
|
+
* @param url - Base URL of the e3 API server
|
|
160
|
+
* @param repo - Repository name
|
|
161
|
+
* @param ws - Workspace name
|
|
162
|
+
* @param plan - The plan ({@link planFilesPush}), whose bindings say where each put goes
|
|
163
|
+
* @param put - One of its puts
|
|
164
|
+
* @param bytes - Its bytes
|
|
165
|
+
* @param options - Request options including auth token
|
|
166
|
+
* @param refresh - The request options for the completion, read afresh once the parts are sent (a token refreshed as it expires); absent, `options`
|
|
167
|
+
* @throws {Error} For an `external` put, which the caller makes with its own
|
|
168
|
+
* credentials to the bucket; when a request is refused; or what the source
|
|
169
|
+
* throws
|
|
170
|
+
*/
|
|
171
|
+
export declare function uploadFilesPush(url: string, repo: string, ws: string, plan: FilesPushPlan, put: FilesPushPut, bytes: FilesPushBytes, options: RequestOptions, refresh?: () => Promise<RequestOptions>): Promise<void>;
|
|
112
172
|
/**
|
|
113
173
|
* A sync: where it is, and what it has taken, its rounds' together.
|
|
114
174
|
*
|
package/dist/src/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/files.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/files.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,OAAO,EAaL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAkC,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM7F;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAEtH;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,cAAc,EACvB,MAAM,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GACjD,OAAO,CAAC,mBAAmB,CAAC,CAE9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,OAAO,EAAE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ository's bindings point.
|
|
18
18
|
* - {@link startFilesSync}, {@link getFilesSync}, {@link filesSyncWait}: a
|
|
19
19
|
* sync, which the platform runs in rounds, and what it took.
|
|
20
|
-
* - {@link planFilesPush}, {@link completeFilesPush}:
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* - {@link planFilesPush}, {@link uploadFilesPush}, {@link completeFilesPush}:
|
|
21
|
+
* a push of files into a source, from disk or from a workspace's dataset:
|
|
22
|
+
* the plan, with a signed upload for each file the deployment's own bucket
|
|
23
|
+
* takes; the upload of a file's bytes, or a dataset's as they stream with
|
|
24
|
+
* its type; and a multipart upload's completion.
|
|
23
25
|
*
|
|
24
26
|
* Owners and admins alone; anyone else is refused `forbidden`. A sync takes
|
|
25
27
|
* the workspace's inputs and records only: the dataflow runs as e3's does
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
*/
|
|
28
30
|
import { none, some } from '@elaraai/east';
|
|
29
31
|
import { FilesBindResponseType, FilesBindingType, FilesDeployRequestType, FilesDeployResponseType, FilesPushCompleteRequestType, FilesPushCompleteResponseType, FilesPushPlanType, FilesPushRequestType, FilesSyncJobType, FilesSyncRequestType, FilesSyncStartType, FilesWorkspaceType, } from '@elaraai/e3-cloud-types';
|
|
30
|
-
import { get, post, put } from '@elaraai/e3-api-client';
|
|
32
|
+
import { fetchWithRetry, get, post, put } from '@elaraai/e3-api-client';
|
|
31
33
|
const enc = encodeURIComponent;
|
|
32
34
|
const filesBase = (repo, ws) => `/repos/${enc(repo)}/workspaces/${enc(ws)}/files`;
|
|
33
35
|
/**
|
|
@@ -105,18 +107,27 @@ export async function startFilesSync(url, repo, ws, request, options) {
|
|
|
105
107
|
}, FilesSyncRequestType, FilesSyncStartType, options);
|
|
106
108
|
}
|
|
107
109
|
/**
|
|
108
|
-
* Plan a push of files
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
110
|
+
* Plan a push of files into a source: each file matched to the mapping that
|
|
111
|
+
* takes it (by its name, or the target named), checked against the mapping's
|
|
112
|
+
* type and limit, and answered `put` with how to upload it (a presigned PUT
|
|
113
|
+
* bound to its SHA-256, a multipart upload with a URL per part, or `external`
|
|
114
|
+
* for a bucket the platform does not write), `unchanged` when the source
|
|
115
|
+
* holds those bytes already, or `refused`. The plan writes nothing; the sync
|
|
116
|
+
* that follows takes the files in.
|
|
117
|
+
*
|
|
118
|
+
* A file may be a workspace's dataset: its `dataset` names the
|
|
119
|
+
* dataset's workspace and name in the repository it was read from and the
|
|
120
|
+
* hash of the value read, and its bytes are the value as `e3 dataset get -f
|
|
121
|
+
* beast2` writes it, its `type` the value's. It is matched by its name, the
|
|
122
|
+
* mapping filling an input or a record of the dataset's name, at the
|
|
123
|
+
* mapping's key (a `latest`'s, `<name>.beast2` under its prefix); a folder
|
|
124
|
+
* or a listing takes none. A signed put carries where it came from, which
|
|
125
|
+
* the seed's or the feed's history names.
|
|
115
126
|
*
|
|
116
127
|
* @param url - Base URL of the e3 API server
|
|
117
128
|
* @param repo - Repository name
|
|
118
129
|
* @param ws - Workspace name
|
|
119
|
-
* @param request - The files (name, size, SHA-256, beast2 type), and the target they are all for, if named
|
|
130
|
+
* @param request - The files (name, size, SHA-256, beast2 type, and a dataset's own), and the target they are all for, if named
|
|
120
131
|
* @param options - Request options including auth token
|
|
121
132
|
* @returns The plan
|
|
122
133
|
* @throws {ApiError} `bad_request` for more than 1,000 files, or a workspace
|
|
@@ -139,6 +150,245 @@ export async function planFilesPush(url, repo, ws, request, options) {
|
|
|
139
150
|
export async function completeFilesPush(url, repo, ws, completion, options) {
|
|
140
151
|
return post(url, `${filesBase(repo, ws)}/push/complete`, completion, FilesPushCompleteRequestType, FilesPushCompleteResponseType, options);
|
|
141
152
|
}
|
|
153
|
+
/** Parts of a ranged multipart upload in flight at once. */
|
|
154
|
+
const PUSH_PARTS_IN_FLIGHT = 4;
|
|
155
|
+
/**
|
|
156
|
+
* The key a put's object has in its bucket: its binding's prefix, then the
|
|
157
|
+
* plan's key, which is relative to the binding as a mapping's keys are.
|
|
158
|
+
*/
|
|
159
|
+
function objectKeyOf(plan, put) {
|
|
160
|
+
const binding = plan.bindings.find((b) => b.source === put.source);
|
|
161
|
+
if (binding === undefined)
|
|
162
|
+
throw new Error(`The plan names no binding of ${put.source}, where ${put.key} goes`);
|
|
163
|
+
// `s3://bucket/prefix/`, the prefix empty or ending in a slash
|
|
164
|
+
const prefix = /^s3:\/\/[^/]+\/(.*)$/su.exec(binding.url)?.[1] ?? '';
|
|
165
|
+
return `${prefix}${put.key}`;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Upload a file a push's plan says to put through the platform: `single`, one
|
|
169
|
+
* PUT with the plan's headers (its SHA-256, and for a dataset where it came
|
|
170
|
+
* from); or `multipart`, part by part to each part's URL, then completed
|
|
171
|
+
* through the API ({@link completeFilesPush}) under the object's key in its
|
|
172
|
+
* bucket. A request that fails as e3's do is sent again with its bytes read
|
|
173
|
+
* again; a source that throws (a dataset that moved while it was read) is
|
|
174
|
+
* raised as it is, and its upload is never completed.
|
|
175
|
+
*
|
|
176
|
+
* @param url - Base URL of the e3 API server
|
|
177
|
+
* @param repo - Repository name
|
|
178
|
+
* @param ws - Workspace name
|
|
179
|
+
* @param plan - The plan ({@link planFilesPush}), whose bindings say where each put goes
|
|
180
|
+
* @param put - One of its puts
|
|
181
|
+
* @param bytes - Its bytes
|
|
182
|
+
* @param options - Request options including auth token
|
|
183
|
+
* @param refresh - The request options for the completion, read afresh once the parts are sent (a token refreshed as it expires); absent, `options`
|
|
184
|
+
* @throws {Error} For an `external` put, which the caller makes with its own
|
|
185
|
+
* credentials to the bucket; when a request is refused; or what the source
|
|
186
|
+
* throws
|
|
187
|
+
*/
|
|
188
|
+
export async function uploadFilesPush(url, repo, ws, plan, put, bytes, options, refresh) {
|
|
189
|
+
switch (put.upload.type) {
|
|
190
|
+
case 'single': {
|
|
191
|
+
const { url: target, headers } = put.upload.value;
|
|
192
|
+
const cursor = new PushCursor(bytes);
|
|
193
|
+
try {
|
|
194
|
+
await putRange(target, Object.fromEntries(headers), bytes.size, () => cursor.take(0, bytes.size), options, 'the upload');
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
// What the source threw, rather than the request it cut short
|
|
198
|
+
throw cursor.failure ?? err;
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
cursor.close();
|
|
202
|
+
}
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
case 'multipart': {
|
|
206
|
+
const { uploadId, partBytes, parts } = put.upload.value;
|
|
207
|
+
const key = objectKeyOf(plan, put);
|
|
208
|
+
const etags = await sendParts(bytes, Number(partBytes), parts, options);
|
|
209
|
+
await completeFilesPush(url, repo, ws, { key, uploadId, parts: etags }, refresh === undefined ? options : await refresh());
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
case 'external':
|
|
213
|
+
throw new Error(`${put.key} goes to a bucket the platform does not write: put it with your own credentials to it`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Where a push's read of its bytes has got to, handing out one range at a
|
|
218
|
+
* time: a range that starts where the last ended goes on from the same read,
|
|
219
|
+
* any other opens a read at its start. The last range reads its source to its
|
|
220
|
+
* end before it gives its own last bytes, so a source that checks its bytes as
|
|
221
|
+
* they end (a dataset that moved while it was read) is heard before the
|
|
222
|
+
* request carrying them is whole: no PUT of other bytes than the planned ones
|
|
223
|
+
* ever reaches the length it declared, and the bucket stores none of it.
|
|
224
|
+
*/
|
|
225
|
+
class PushCursor {
|
|
226
|
+
bytes;
|
|
227
|
+
iterator = null;
|
|
228
|
+
/** Where the read is: the next byte it gives; -1 once a range was cut short */
|
|
229
|
+
at = -1;
|
|
230
|
+
/** What the read gave past the last range's end */
|
|
231
|
+
held = null;
|
|
232
|
+
/** What the source threw, which a request sent again raises rather than read again */
|
|
233
|
+
failure = null;
|
|
234
|
+
constructor(bytes) {
|
|
235
|
+
this.bytes = bytes;
|
|
236
|
+
}
|
|
237
|
+
/** `[start, end)` as a stream, for one request's body. */
|
|
238
|
+
take(start, end) {
|
|
239
|
+
if (this.failure !== null)
|
|
240
|
+
throw this.failure;
|
|
241
|
+
let iterator;
|
|
242
|
+
if (this.iterator !== null && this.at === start) {
|
|
243
|
+
iterator = this.iterator;
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
void this.iterator?.return?.();
|
|
247
|
+
iterator = this.bytes.read(start)[Symbol.asyncIterator]();
|
|
248
|
+
this.iterator = iterator;
|
|
249
|
+
this.at = start;
|
|
250
|
+
this.held = null;
|
|
251
|
+
}
|
|
252
|
+
let left = end - start;
|
|
253
|
+
const toEnd = end === this.bytes.size;
|
|
254
|
+
return new ReadableStream({
|
|
255
|
+
pull: async (controller) => {
|
|
256
|
+
try {
|
|
257
|
+
if (left > 0) {
|
|
258
|
+
let chunk = this.held;
|
|
259
|
+
this.held = null;
|
|
260
|
+
if (chunk === null) {
|
|
261
|
+
const next = await iterator.next();
|
|
262
|
+
if (next.done === true)
|
|
263
|
+
throw new Error(`the bytes end ${left} short of the ${this.bytes.size} planned`);
|
|
264
|
+
chunk = next.value;
|
|
265
|
+
}
|
|
266
|
+
if (chunk.length > left) {
|
|
267
|
+
this.held = chunk.subarray(left);
|
|
268
|
+
chunk = chunk.subarray(0, left);
|
|
269
|
+
}
|
|
270
|
+
left -= chunk.length;
|
|
271
|
+
this.at += chunk.length;
|
|
272
|
+
// The source's last bytes wait for its end, where it checks what it gave
|
|
273
|
+
if (left === 0 && toEnd)
|
|
274
|
+
await this.ended(iterator);
|
|
275
|
+
controller.enqueue(chunk);
|
|
276
|
+
if (left > 0)
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
else if (toEnd) {
|
|
280
|
+
await this.ended(iterator);
|
|
281
|
+
}
|
|
282
|
+
controller.close();
|
|
283
|
+
}
|
|
284
|
+
catch (err) {
|
|
285
|
+
this.failure = err;
|
|
286
|
+
this.at = -1;
|
|
287
|
+
controller.error(err);
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
cancel: () => {
|
|
291
|
+
// A request that stopped reading leaves the read where no range starts
|
|
292
|
+
this.at = -1;
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Reads the source past the planned bytes, where a source that checks what
|
|
298
|
+
* it gave throws if they were not its own: it must end there.
|
|
299
|
+
*
|
|
300
|
+
* @throws {Error} When it gives more; or what the source throws
|
|
301
|
+
*/
|
|
302
|
+
async ended(iterator) {
|
|
303
|
+
if (this.held !== null && this.held.length > 0)
|
|
304
|
+
throw new Error(`the bytes run past the ${this.bytes.size} planned`);
|
|
305
|
+
for (;;) {
|
|
306
|
+
const next = await iterator.next();
|
|
307
|
+
if (next.done === true)
|
|
308
|
+
return;
|
|
309
|
+
if (next.value.length > 0)
|
|
310
|
+
throw new Error(`the bytes run past the ${this.bytes.size} planned`);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
/** Ends the read, its source let go (a file's descriptor closed): the upload is done with it. */
|
|
314
|
+
close() {
|
|
315
|
+
void this.iterator?.return?.();
|
|
316
|
+
this.iterator = null;
|
|
317
|
+
this.at = -1;
|
|
318
|
+
this.held = null;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* One PUT of a range to a presigned URL (no auth: the URL is signed), sent
|
|
323
|
+
* again as e3's requests are, its bytes read again for each attempt.
|
|
324
|
+
*/
|
|
325
|
+
async function putRange(target, headers, length, body, options, what) {
|
|
326
|
+
// A stream body needs `duplex: 'half'` and a declared length: undici's
|
|
327
|
+
// runtime contracts, which lib.dom's RequestInit does not name. No window
|
|
328
|
+
// and no redirect followed are what let fetch send the request it is given:
|
|
329
|
+
// any other it sends as a clone (the Fetch Standard's HTTP-network-or-cache
|
|
330
|
+
// fetch), the clone's body a tee of the stream, and the branch left unsent
|
|
331
|
+
// keeps every byte the other sends until the request is done, so a 1 GiB
|
|
332
|
+
// PUT held 1 GiB. A presigned PUT is never redirected, and a stream could
|
|
333
|
+
// not be sent again to follow one.
|
|
334
|
+
const response = await fetchWithRetry(target, () => ({ method: 'PUT', headers: { ...headers, 'content-length': String(length) }, body: body(), duplex: 'half', window: null, redirect: 'error' }), { idempotent: true, retry: options.retry, fetch: options.fetch });
|
|
335
|
+
if (!response.ok)
|
|
336
|
+
throw new Error(`${what} answered HTTP ${response.status}: ${(await response.text()).slice(0, 200)}`);
|
|
337
|
+
return response;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Sends a multipart upload's parts: four at a time, each read from its start,
|
|
341
|
+
* for a ranged source; else one after another from one read.
|
|
342
|
+
*
|
|
343
|
+
* @returns Each part's number and ETag, in order
|
|
344
|
+
*/
|
|
345
|
+
async function sendParts(bytes, partBytes, parts, options) {
|
|
346
|
+
const etags = new Array(parts.length);
|
|
347
|
+
const send = async (i, cursor) => {
|
|
348
|
+
const part = parts[i];
|
|
349
|
+
const start = i * partBytes;
|
|
350
|
+
const end = Math.min(bytes.size, start + partBytes);
|
|
351
|
+
let response;
|
|
352
|
+
try {
|
|
353
|
+
response = await putRange(part.url, {}, end - start, () => cursor.take(start, end), options, `part ${part.number}`);
|
|
354
|
+
}
|
|
355
|
+
catch (err) {
|
|
356
|
+
// What the source threw, rather than the request it cut short
|
|
357
|
+
throw cursor.failure ?? err;
|
|
358
|
+
}
|
|
359
|
+
const etag = response.headers.get('etag');
|
|
360
|
+
if (etag === null)
|
|
361
|
+
throw new Error(`part ${part.number} answered no ETag`);
|
|
362
|
+
etags[i] = { number: part.number, etag: etag.replace(/^"|"$/g, '') };
|
|
363
|
+
};
|
|
364
|
+
if (bytes.ranged) {
|
|
365
|
+
let next = 0;
|
|
366
|
+
const worker = async () => {
|
|
367
|
+
for (let i = next++; i < parts.length; i = next++) {
|
|
368
|
+
// A part's own read, let go once the part is sent
|
|
369
|
+
const cursor = new PushCursor(bytes);
|
|
370
|
+
try {
|
|
371
|
+
await send(i, cursor);
|
|
372
|
+
}
|
|
373
|
+
finally {
|
|
374
|
+
cursor.close();
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
await Promise.all(Array.from({ length: Math.min(PUSH_PARTS_IN_FLIGHT, parts.length) }, worker));
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
const cursor = new PushCursor(bytes);
|
|
382
|
+
try {
|
|
383
|
+
for (let i = 0; i < parts.length; i++)
|
|
384
|
+
await send(i, cursor);
|
|
385
|
+
}
|
|
386
|
+
finally {
|
|
387
|
+
cursor.close();
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return etags;
|
|
391
|
+
}
|
|
142
392
|
/**
|
|
143
393
|
* A sync: where it is, and what it has taken, its rounds' together.
|
|
144
394
|
*
|
package/dist/src/files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/files.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC7B,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GAanB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAuB,MAAM,wBAAwB,CAAC;AAE7E,MAAM,GAAG,GAAG,kBAAkB,CAAC;AAE/B,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC;A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G,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7H,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC;QAC7C,WAAW,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC;QACjC,IAAI,WAAW,CAAC,UAAU,KAAK,SAAS,IAAI,GAAG,IAAI,WAAW,CAAC,UAAU,EAAE,CAAC;YAC1E,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE,2BAA2B,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACrH,CAAC;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,kBAAkB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5G,CAAC;AACH,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -47,12 +47,15 @@ export { listSecrets, putSecret, deleteSecret } from './secrets.js';
|
|
|
47
47
|
export { listInvitations, revokeInvitation, isInvitedSentinel } from './invitations.js';
|
|
48
48
|
export { listAdminUsers, disableUser, enableUser, lookupPeople } from './admin-users.js';
|
|
49
49
|
export { myMemberships } from './me.js';
|
|
50
|
+
export { platformVersions } from './platform.js';
|
|
51
|
+
export type { PlatformVersions } from '@elaraai/e3-cloud-types';
|
|
50
52
|
export { listRoles, getRole, putRole, deleteRole, myAccess, previewRole } from './roles.js';
|
|
51
53
|
export type { Person, PersonList, RepositorySettings, WorkspaceSettings, WorkspaceLastRun, RepoRole, RepoUser, AddUserRequest, WhoamiResponse, AuthzErrorCode, Schedule, ScheduleRequest, ComputeSize, ComputeConfigMap, TaskTimeout, TimeoutConfigMap, TaskConfigs, } from '@elaraai/e3-cloud-types';
|
|
52
54
|
export { getDelegationPolicy, setDelegationPolicy, getRackSecurityPolicy, setRackSecurityPolicy, listRacks, enrollRack, deregisterRack, rackActivity, approveRackBoot, ApproveBootRequestType, EnrollmentTokenType, type EnrollmentToken, } from './deployment-settings.js';
|
|
53
55
|
export { listRecordInfos, recordAudit, recordStateAt, recordStatePage, recordValueChunks, rollbackRecord, listRecordBackups, createRecordBackup, restoreRecordBackup, recordBackupDownload, recordBackupStream, recordBackupValue, deleteRecordBackup, type RecordClientSource, type RecordStateAt, } from './records.js';
|
|
54
56
|
export type { RecordList, RecordInfo, RecordAuditPage, RecordAuditEntry, RecordAuditDetail, RecordAuditFile, RecordBackupInfo, RecordBackupList, RecordBackupDownload, } from '@elaraai/e3-cloud-types';
|
|
55
|
-
export { getFiles, deployFiles, bindFilesSource, startFilesSync, getFilesSync, filesSyncWait, planFilesPush, completeFilesPush, type FilesSyncOptions, type FilesSyncWaitOptions, } from './files.js';
|
|
57
|
+
export { getFiles, deployFiles, bindFilesSource, startFilesSync, getFilesSync, filesSyncWait, planFilesPush, uploadFilesPush, completeFilesPush, type FilesPushBytes, type FilesPushPut, type FilesSyncOptions, type FilesSyncWaitOptions, } from './files.js';
|
|
58
|
+
export type { FilesPushDataset, FilesDatasetOrigin } from '@elaraai/e3-cloud-types';
|
|
56
59
|
export { getFeedbackSettings, putFeedbackSettings, addFeedback, listMyFeedback, listFeedback, getFeedback, feedbackScreenshotUrl, closeFeedback, reopenFeedback, type FeedbackStatusName, type FeedbackListOptions, type FeedbackNoteOptions, } from './feedback.js';
|
|
57
60
|
export { feedbackId, FEEDBACK_NOTE_MAX_CHARS, FEEDBACK_TEXT_MAX_CHARS, FEEDBACK_URL_MAX_CHARS, FEEDBACK_SHORT_MAX_CHARS, FEEDBACK_DATASETS_MAX, FEEDBACK_NOTE_MAX_BYTES, FEEDBACK_SCREENSHOT_MAX_BYTES, FEEDBACK_SCREENSHOT_TYPES, FEEDBACK_SUMMARY_CHARS, FEEDBACK_PAGE_DEFAULT, FEEDBACK_PAGE_MAX, } from '@elaraai/e3-cloud-types';
|
|
58
61
|
export type { FeedbackSendRequest, FeedbackSent, FeedbackPage, FeedbackPart, FeedbackPartKind, FeedbackScope, FeedbackRect, FeedbackPoint, FeedbackData, FeedbackImage, FeedbackScreenshotRequest, FeedbackNote, FeedbackSender, FeedbackScreenshot, FeedbackStatus, FeedbackSummary, FeedbackList, FeedbackMine, FeedbackCounts, FeedbackSettings, } from '@elaraai/e3-cloud-types';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGlF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EACL,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EACnE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,kBAAkB,EACvF,eAAe,EACf,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAC/C,sBAAsB,EAAE,qBAAqB,EAAE,wBAAwB,EACvE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAC/B,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe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CAAC;AACjC,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,WAAW,GACZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACN,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,MAAM,EACN,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,GACZ,MAAM,yBAAyB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -49,13 +49,15 @@ export { listSecrets, putSecret, deleteSecret } from './secrets.js';
|
|
|
49
49
|
export { listInvitations, revokeInvitation, isInvitedSentinel } from './invitations.js';
|
|
50
50
|
export { listAdminUsers, disableUser, enableUser, lookupPeople } from './admin-users.js';
|
|
51
51
|
export { myMemberships } from './me.js';
|
|
52
|
+
// What a deployment runs: its e3 cloud release, its e3, and the next e3 staged
|
|
53
|
+
export { platformVersions } from './platform.js';
|
|
52
54
|
// Business roles: a repository's roles, and what the caller's grant them
|
|
53
55
|
export { listRoles, getRole, putRole, deleteRole, myAccess, previewRole } from './roles.js';
|
|
54
56
|
export { getDelegationPolicy, setDelegationPolicy, getRackSecurityPolicy, setRackSecurityPolicy, listRacks, enrollRack, deregisterRack, rackActivity, approveRackBoot, ApproveBootRequestType, EnrollmentTokenType, } from './deployment-settings.js';
|
|
55
57
|
// Record history, rollback & backups
|
|
56
58
|
export { listRecordInfos, recordAudit, recordStateAt, recordStatePage, recordValueChunks, rollbackRecord, listRecordBackups, createRecordBackup, restoreRecordBackup, recordBackupDownload, recordBackupStream, recordBackupValue, deleteRecordBackup, } from './records.js';
|
|
57
59
|
// Files: a deployed workspace's inputs from files in a bucket
|
|
58
|
-
export { getFiles, deployFiles, bindFilesSource, startFilesSync, getFilesSync, filesSyncWait, planFilesPush, completeFilesPush, } from './files.js';
|
|
60
|
+
export { getFiles, deployFiles, bindFilesSource, startFilesSync, getFilesSync, filesSyncWait, planFilesPush, uploadFilesPush, completeFilesPush, } from './files.js';
|
|
59
61
|
// Feedback on components
|
|
60
62
|
export { getFeedbackSettings, putFeedbackSettings, addFeedback, listMyFeedback, listFeedback, getFeedback, feedbackScreenshotUrl, closeFeedback, reopenFeedback, } from './feedback.js';
|
|
61
63
|
export { feedbackId, FEEDBACK_NOTE_MAX_CHARS, FEEDBACK_TEXT_MAX_CHARS, FEEDBACK_URL_MAX_CHARS, FEEDBACK_SHORT_MAX_CHARS, FEEDBACK_DATASETS_MAX, FEEDBACK_NOTE_MAX_BYTES, FEEDBACK_SCREENSHOT_MAX_BYTES, FEEDBACK_SCREENSHOT_TYPES, FEEDBACK_SUMMARY_CHARS, FEEDBACK_PAGE_DEFAULT, FEEDBACK_PAGE_MAX, } from '@elaraai/e3-cloud-types';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,8CAA8C;AAC9C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAuB,MAAM,wBAAwB,CAAC;AAElF,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EACL,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EACnE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,kBAAkB,EACvF,eAAe,EACf,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAC/C,sBAAsB,EAAE,qBAAqB,EAAE,wBAAwB,EACvE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAC/B,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,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What a deployment runs: its e3 cloud release, the e3 inside it, and
|
|
7
|
+
* each next e3 a bundle is staged for, so a client knows before an install or
|
|
8
|
+
* a deploy fails whether a project fits it (e3 refuses a package a newer e3
|
|
9
|
+
* exported).
|
|
10
|
+
*/
|
|
11
|
+
import { type PlatformVersions } from '@elaraai/e3-cloud-types';
|
|
12
|
+
import { type RequestOptions } from '@elaraai/e3-api-client';
|
|
13
|
+
/**
|
|
14
|
+
* What a deployment runs: its e3 cloud release (none when its deploy named
|
|
15
|
+
* none), the e3 release its platform and runners run, and each next e3 a
|
|
16
|
+
* bundle is staged for (`e3-cloud app deploy … --for-platform`) in the
|
|
17
|
+
* repositories the caller manages. Anyone signed in may ask.
|
|
18
|
+
*
|
|
19
|
+
* @param url - Base URL of the e3 API server
|
|
20
|
+
* @param options - Request options including auth token
|
|
21
|
+
* @returns The versions; null for a deployment from before it says
|
|
22
|
+
* @throws {AuthError} On 401 Unauthorized
|
|
23
|
+
*/
|
|
24
|
+
export declare function platformVersions(url: string, options: RequestOptions): Promise<PlatformVersions | null>;
|
|
25
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAQ7G"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What a deployment runs: its e3 cloud release, the e3 inside it, and
|
|
7
|
+
* each next e3 a bundle is staged for, so a client knows before an install or
|
|
8
|
+
* a deploy fails whether a project fits it (e3 refuses a package a newer e3
|
|
9
|
+
* exported).
|
|
10
|
+
*/
|
|
11
|
+
import { PlatformVersionsType } from '@elaraai/e3-cloud-types';
|
|
12
|
+
import { ApiError, get } from '@elaraai/e3-api-client';
|
|
13
|
+
/**
|
|
14
|
+
* What a deployment runs: its e3 cloud release (none when its deploy named
|
|
15
|
+
* none), the e3 release its platform and runners run, and each next e3 a
|
|
16
|
+
* bundle is staged for (`e3-cloud app deploy … --for-platform`) in the
|
|
17
|
+
* repositories the caller manages. Anyone signed in may ask.
|
|
18
|
+
*
|
|
19
|
+
* @param url - Base URL of the e3 API server
|
|
20
|
+
* @param options - Request options including auth token
|
|
21
|
+
* @returns The versions; null for a deployment from before it says
|
|
22
|
+
* @throws {AuthError} On 401 Unauthorized
|
|
23
|
+
*/
|
|
24
|
+
export async function platformVersions(url, options) {
|
|
25
|
+
try {
|
|
26
|
+
return await get(url, '/platform', PlatformVersionsType, options);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
// A deployment from before the route has none, at its gateway or its API
|
|
30
|
+
if (err instanceof ApiError && err.code === 'not_found')
|
|
31
|
+
return null;
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAyB,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAuB,MAAM,wBAAwB,CAAC;AAE5E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAW,EAAE,OAAuB;IACzE,IAAI,CAAC;QACH,OAAO,MAAM,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,yEAAyE;QACzE,IAAI,GAAG,YAAY,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QACrE,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/e3-cloud-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "HTTP client library for the e3 cloud API",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"types": "dist/src/index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@elaraai/e3-api-client": "1.0.
|
|
11
|
-
"@elaraai/e3-types": "1.0.
|
|
12
|
-
"@elaraai/e3-cloud-types": "1.1.
|
|
10
|
+
"@elaraai/e3-api-client": "1.0.101",
|
|
11
|
+
"@elaraai/e3-types": "1.0.101",
|
|
12
|
+
"@elaraai/e3-cloud-types": "1.1.1"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@elaraai/east": "1.0.
|
|
15
|
+
"@elaraai/east": "1.0.101"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/src/**/*",
|