@sasjs/api 0.5.0 → 0.6.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 +2 -1
- package/build/browser.js +355 -7
- package/build/cjs/corpus/drive.js +119 -0
- package/build/cjs/corpus/runner.js +18 -2
- package/build/cjs/drive/deploy.js +309 -0
- package/build/cjs/drive/service.js +5 -0
- package/build/cjs/host/dispatch.js +8 -0
- package/build/cjs/index.js +10 -1
- package/build/cjs/routes/generated.js +8 -0
- package/build/cjs/routes/overlay.js +21 -3
- package/build/cjs/types.js +11 -1
- package/build/esm/corpus/drive.d.ts +6 -0
- package/build/esm/corpus/drive.d.ts.map +1 -1
- package/build/esm/corpus/drive.js +119 -0
- package/build/esm/corpus/runner.d.ts.map +1 -1
- package/build/esm/corpus/runner.js +18 -2
- package/build/esm/drive/deploy.d.ts +153 -0
- package/build/esm/drive/deploy.d.ts.map +1 -0
- package/build/esm/drive/deploy.js +301 -0
- package/build/esm/drive/service.d.ts +8 -0
- package/build/esm/drive/service.d.ts.map +1 -1
- package/build/esm/drive/service.js +5 -0
- package/build/esm/host/dispatch.d.ts.map +1 -1
- package/build/esm/host/dispatch.js +8 -0
- package/build/esm/index.d.ts +2 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/routes/generated.d.ts.map +1 -1
- package/build/esm/routes/generated.js +8 -0
- package/build/esm/routes/overlay.d.ts.map +1 -1
- package/build/esm/routes/overlay.js +21 -3
- package/build/esm/types.d.ts +19 -1
- package/build/esm/types.d.ts.map +1 -1
- package/build/esm/types.js +11 -1
- package/package.json +1 -1
package/build/esm/types.d.ts
CHANGED
|
@@ -14,9 +14,27 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class ApiError extends Error {
|
|
16
16
|
readonly status: number;
|
|
17
|
+
/**
|
|
18
|
+
* The body the route renders instead of the bare message.
|
|
19
|
+
*
|
|
20
|
+
* Most drive routes send the message as text (`res.status(code).send(err)`),
|
|
21
|
+
* and that stays the default: a body here is for the routes that answer an
|
|
22
|
+
* envelope, which today is the two deploy routes and their
|
|
23
|
+
* `{status: 'failure', message}`.
|
|
24
|
+
*/
|
|
25
|
+
readonly body?: unknown | undefined;
|
|
17
26
|
/** Told apart by marker rather than `instanceof` - see `isApiError`. */
|
|
18
27
|
readonly apiError = true;
|
|
19
|
-
constructor(status: number, message: string
|
|
28
|
+
constructor(status: number, message: string,
|
|
29
|
+
/**
|
|
30
|
+
* The body the route renders instead of the bare message.
|
|
31
|
+
*
|
|
32
|
+
* Most drive routes send the message as text (`res.status(code).send(err)`),
|
|
33
|
+
* and that stays the default: a body here is for the routes that answer an
|
|
34
|
+
* envelope, which today is the two deploy routes and their
|
|
35
|
+
* `{status: 'failure', message}`.
|
|
36
|
+
*/
|
|
37
|
+
body?: unknown | undefined);
|
|
20
38
|
}
|
|
21
39
|
/**
|
|
22
40
|
* `instanceof` survives here (the package targets ES2020, not ES5), but a
|
package/build/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAK/B,QAAQ,CAAC,MAAM,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAK/B,QAAQ,CAAC,MAAM,EAAE,MAAM;IAEvB;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO;IAdzB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,QAAO;gBAGb,MAAM,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM;IACf;;;;;;;OAOG;IACM,IAAI,CAAC,EAAE,OAAO,YAAA;C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
|
14
14
|
*/
|
|
15
15
|
export class ApiError extends Error {
|
|
16
|
-
constructor(status, message
|
|
16
|
+
constructor(status, message,
|
|
17
|
+
/**
|
|
18
|
+
* The body the route renders instead of the bare message.
|
|
19
|
+
*
|
|
20
|
+
* Most drive routes send the message as text (`res.status(code).send(err)`),
|
|
21
|
+
* and that stays the default: a body here is for the routes that answer an
|
|
22
|
+
* envelope, which today is the two deploy routes and their
|
|
23
|
+
* `{status: 'failure', message}`.
|
|
24
|
+
*/
|
|
25
|
+
body) {
|
|
17
26
|
super(message);
|
|
18
27
|
this.status = status;
|
|
28
|
+
this.body = body;
|
|
19
29
|
/** Told apart by marker rather than `instanceof` - see `isApiError`. */
|
|
20
30
|
this.apiError = true;
|
|
21
31
|
this.name = 'ApiError';
|
package/package.json
CHANGED