@sasjs/api 0.24.0 → 0.25.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 +10 -0
- package/build/browser.js +655 -93
- package/build/cjs/appstream/bundle.js +124 -0
- package/build/cjs/appstream/identity.js +69 -0
- package/build/cjs/appstream/service.js +226 -0
- package/build/cjs/appstream/store.js +69 -0
- package/build/cjs/appstream/web.js +248 -0
- package/build/cjs/corpus/deploy.js +83 -28
- package/build/cjs/corpus/runner.js +30 -18
- package/build/cjs/host/dispatch.js +38 -9
- package/build/cjs/index.js +25 -4
- package/build/cjs/routes/generated.js +2 -8
- package/build/cjs/routes/overlay.js +2 -2
- package/build/esm/appstream/bundle.d.ts +46 -0
- package/build/esm/appstream/bundle.d.ts.map +1 -0
- package/build/esm/appstream/bundle.js +118 -0
- package/build/esm/appstream/identity.d.ts +27 -0
- package/build/esm/appstream/identity.d.ts.map +1 -0
- package/build/esm/appstream/identity.js +63 -0
- package/build/esm/appstream/service.d.ts +96 -0
- package/build/esm/appstream/service.d.ts.map +1 -0
- package/build/esm/appstream/service.js +218 -0
- package/build/esm/appstream/store.d.ts +6 -0
- package/build/esm/appstream/store.d.ts.map +1 -0
- package/build/esm/appstream/store.js +65 -0
- package/build/esm/appstream/web.d.ts +74 -0
- package/build/esm/appstream/web.d.ts.map +1 -0
- package/build/esm/appstream/web.js +241 -0
- package/build/esm/corpus/deploy.d.ts +5 -5
- package/build/esm/corpus/deploy.d.ts.map +1 -1
- package/build/esm/corpus/deploy.js +83 -28
- package/build/esm/corpus/runner.d.ts.map +1 -1
- package/build/esm/corpus/runner.js +14 -2
- package/build/esm/host/dispatch.d.ts +5 -4
- package/build/esm/host/dispatch.d.ts.map +1 -1
- package/build/esm/host/dispatch.js +38 -9
- package/build/esm/index.d.ts +8 -2
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +5 -1
- package/build/esm/routes/generated.d.ts.map +1 -1
- package/build/esm/routes/generated.js +2 -8
- package/build/esm/routes/overlay.js +2 -2
- package/package.json +5 -4
- package/build/cjs/drive/registry.js +0 -38
- package/build/esm/drive/registry.d.ts +0 -52
- package/build/esm/drive/registry.d.ts.map +0 -1
- package/build/esm/drive/registry.js +0 -33
package/build/esm/index.d.ts
CHANGED
|
@@ -63,10 +63,16 @@ export type { ProgramSource, RunOutcome, RunRequest, RunnerSession, RuntimeReque
|
|
|
63
63
|
export { MemorySessionRunner } from './runtime/memory-runner.js';
|
|
64
64
|
export type { MemoryRunnerOptions } from './runtime/memory-runner.js';
|
|
65
65
|
export { RUNTIME_CORPUS } from './corpus/runtime.js';
|
|
66
|
-
export { MemoryAppStreamRegistry, unpublishAppStream } from './drive/registry.js';
|
|
67
|
-
export type { AppStreamRegistry, UnpublishBody } from './drive/registry.js';
|
|
68
66
|
export { RECORD_CORPUS, ADMIN_SIGNED_IN, PROVIDER_MANAGED } from './corpus/records.js';
|
|
69
67
|
export type { CorpusCase } from './corpus/drive.js';
|
|
70
68
|
export { runCase, servicesFor } from './corpus/runner.js';
|
|
71
69
|
export type { CaseResult } from './corpus/runner.js';
|
|
70
|
+
export { appSummary, createAppStreamService, defaultAppName, MemoryAppStreamStore } from './appstream/service.js';
|
|
71
|
+
export type { AppStreamEntry, AppStreamService, AppStreamStore, PublishAppRequest } from './appstream/service.js';
|
|
72
|
+
export { APP_MANIFEST, parseAppManifest, publishRequestFor, splitAppBundle } from './appstream/bundle.js';
|
|
73
|
+
export type { AppBundle, AppManifest, DeployPublish } from './appstream/bundle.js';
|
|
74
|
+
export { APP_STREAM_INDEX, createDriveAppStreamStore } from './appstream/store.js';
|
|
75
|
+
export { DEFAULT_APP_PATH, NO_SUCH_APP, cacheControlFor, contentTypeFor, createAppStreamWebService, escapeHtml } from './appstream/web.js';
|
|
76
|
+
export type { AppFilter, AppStreamApp, AppStreamPage, AppStreamRequest, AppStreamWebOptions, AppStreamWebService } from './appstream/web.js';
|
|
77
|
+
export { isAppId, newAppId, normaliseAppLoc } from './appstream/identity.js';
|
|
72
78
|
//# sourceMappingURL=index.d.ts.map
|
package/build/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,YAAY,CAAA;AAC1B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACR,MAAM,EACP,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACX,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACV,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAChE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAG7D,cAAc,2BAA2B,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE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W,EACX,aAAa,EACd,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,UAAU,EACX,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA"}
|
package/build/esm/index.js
CHANGED
|
@@ -47,6 +47,10 @@ export { DEFAULT_SESSIONS, MemorySessionHost } from './session/memory-host.js';
|
|
|
47
47
|
export { CODE_DEBUG, DOCUMENTED_RUN_TIMES, createRuntimeService } from './runtime/service.js';
|
|
48
48
|
export { MemorySessionRunner } from './runtime/memory-runner.js';
|
|
49
49
|
export { RUNTIME_CORPUS } from './corpus/runtime.js';
|
|
50
|
-
export { MemoryAppStreamRegistry, unpublishAppStream } from './drive/registry.js';
|
|
51
50
|
export { RECORD_CORPUS, ADMIN_SIGNED_IN, PROVIDER_MANAGED } from './corpus/records.js';
|
|
52
51
|
export { runCase, servicesFor } from './corpus/runner.js';
|
|
52
|
+
export { appSummary, createAppStreamService, defaultAppName, MemoryAppStreamStore } from './appstream/service.js';
|
|
53
|
+
export { APP_MANIFEST, parseAppManifest, publishRequestFor, splitAppBundle } from './appstream/bundle.js';
|
|
54
|
+
export { APP_STREAM_INDEX, createDriveAppStreamStore } from './appstream/store.js';
|
|
55
|
+
export { DEFAULT_APP_PATH, NO_SUCH_APP, cacheControlFor, contentTypeFor, createAppStreamWebService, escapeHtml } from './appstream/web.js';
|
|
56
|
+
export { isAppId, newAppId, normaliseAppLoc } from './appstream/identity.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../src/routes/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../src/routes/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAghE5C,CAAA"}
|
|
@@ -505,13 +505,7 @@ export const GENERATED_ROUTES = [
|
|
|
505
505
|
summary: 'Remove an app stream entry',
|
|
506
506
|
params: [
|
|
507
507
|
{
|
|
508
|
-
name: '
|
|
509
|
-
in: 'body',
|
|
510
|
-
required: true,
|
|
511
|
-
type: 'string'
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
name: 'streamServiceName',
|
|
508
|
+
name: 'id',
|
|
515
509
|
in: 'body',
|
|
516
510
|
required: true,
|
|
517
511
|
type: 'string'
|
|
@@ -529,7 +523,7 @@ export const GENERATED_ROUTES = [
|
|
|
529
523
|
},
|
|
530
524
|
{
|
|
531
525
|
status: 404,
|
|
532
|
-
description: 'No app is published
|
|
526
|
+
description: 'No app is published with that id'
|
|
533
527
|
}
|
|
534
528
|
]
|
|
535
529
|
},
|
|
@@ -248,8 +248,8 @@ export const OVERLAY = {
|
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
250
|
'POST /SASjsApi/drive/deploy/upload': { implemented: true },
|
|
251
|
-
// `404` is
|
|
252
|
-
//
|
|
251
|
+
// `404` is an id the index does not hold - the id is the app, and its label and
|
|
252
|
+
// folder are not handles - and the drive's content is deliberately left alone.
|
|
253
253
|
'DELETE /SASjsApi/drive/deploy': { implemented: true },
|
|
254
254
|
// Group - members and the groups themselves
|
|
255
255
|
'GET /SASjsApi/group': { implemented: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sasjs/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "The SASjs Server API, described once - a generated route table, the services behind it, and the conformance corpus both hosts run",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SASjs",
|
|
@@ -38,11 +38,12 @@
|
|
|
38
38
|
"test": "jest --coverage",
|
|
39
39
|
"coverage:comment": "node scripts/coverage-comment.mjs",
|
|
40
40
|
"test:watch": "jest --watch",
|
|
41
|
-
"lint": "prettier --check \"{src,spec,scripts}/**/*.{ts,mjs,md}\" \"*.{json,md}\"",
|
|
42
|
-
"lint:fix": "prettier --write \"{src,spec,scripts}/**/*.{ts,mjs,md}\" \"*.{json,md}\"",
|
|
41
|
+
"lint": "prettier --check \"{src,spec,scripts}/**/*.{ts,mjs,cjs,md}\" \"*.{json,md}\"",
|
|
42
|
+
"lint:fix": "prettier --write \"{src,spec,scripts}/**/*.{ts,mjs,cjs,md}\" \"*.{json,md}\"",
|
|
43
43
|
"sync:routes": "node scripts/sync-routes.mjs",
|
|
44
44
|
"check:routes": "node scripts/sync-routes.mjs --check",
|
|
45
|
-
"audit:gate": "node scripts/audit.mjs"
|
|
45
|
+
"audit:gate": "node scripts/audit.mjs",
|
|
46
|
+
"check:appstream": "node scripts/appstream-browser-check.cjs"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MemoryAppStreamRegistry = exports.unpublishAppStream = void 0;
|
|
4
|
-
const types_js_1 = require("../types.js");
|
|
5
|
-
/**
|
|
6
|
-
* `DELETE /SASjsApi/drive/deploy`.
|
|
7
|
-
*
|
|
8
|
-
* The document requires both body values, so both are checked - a caller that
|
|
9
|
-
* names a stream but not the folder has not said what to remove. Only the folder
|
|
10
|
-
* reaches the registry, because that is what identifies the app.
|
|
11
|
-
*
|
|
12
|
-
* The checks are here rather than in the transport because this is the one
|
|
13
|
-
* implementation of the operation: a host calling it directly gets the same
|
|
14
|
-
* refusals in the same order, and with the same messages the document states.
|
|
15
|
-
*/
|
|
16
|
-
const unpublishAppStream = async (registry, body) => {
|
|
17
|
-
if (!body?.streamServiceName)
|
|
18
|
-
throw new types_js_1.ApiError(400, '"streamServiceName" is required');
|
|
19
|
-
if (!body.appLoc)
|
|
20
|
-
throw new types_js_1.ApiError(400, '"appLoc" is required');
|
|
21
|
-
if (!(await registry.unpublish(body.appLoc)))
|
|
22
|
-
throw new types_js_1.ApiError(404, 'No app is published at that folder.');
|
|
23
|
-
return { status: 'success' };
|
|
24
|
-
};
|
|
25
|
-
exports.unpublishAppStream = unpublishAppStream;
|
|
26
|
-
/**
|
|
27
|
-
* The registry the corpus and the package's own tests read: one published app,
|
|
28
|
-
* identified by its folder alone.
|
|
29
|
-
*/
|
|
30
|
-
class MemoryAppStreamRegistry {
|
|
31
|
-
constructor(folders = ['/Public/myApp']) {
|
|
32
|
-
this.folders = new Set(folders);
|
|
33
|
-
}
|
|
34
|
-
async unpublish(appLoc) {
|
|
35
|
-
return this.folders.delete(appLoc);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.MemoryAppStreamRegistry = MemoryAppStreamRegistry;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The app streams a host has published, as the API needs to unpublish one.
|
|
3
|
-
*
|
|
4
|
-
* A published stream is the host's own record - a directory convention, a
|
|
5
|
-
* registry table, whatever it uses to know that `/Public/myApp` is served at
|
|
6
|
-
* `/Public/myApp/index.html`. The package cannot invent it, so the route takes
|
|
7
|
-
* this port and answers 501 without it, the same way the session routes do.
|
|
8
|
-
*/
|
|
9
|
-
export interface AppStreamRegistry {
|
|
10
|
-
/**
|
|
11
|
-
* Removes the app published at `appLoc`.
|
|
12
|
-
*
|
|
13
|
-
* **The folder is the identity.** An app is one thing to deploy and one thing
|
|
14
|
-
* to delete, and what it is called is a label on it: two apps can share a
|
|
15
|
-
* folder only as a special case, and they are still one thing to load or
|
|
16
|
-
* remove. So the lookup is by folder, and a name that no longer matches the
|
|
17
|
-
* one recorded does not turn a correct deletion into a `404`.
|
|
18
|
-
*
|
|
19
|
-
* `false` when nothing is published at that folder, which the route reports as
|
|
20
|
-
* a 404 - a delete that silently succeeded on a folder nobody deployed would
|
|
21
|
-
* hide a caller's typo.
|
|
22
|
-
*/
|
|
23
|
-
unpublish(appLoc: string): Promise<boolean>;
|
|
24
|
-
}
|
|
25
|
-
export interface UnpublishBody {
|
|
26
|
-
streamServiceName?: string;
|
|
27
|
-
appLoc?: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* `DELETE /SASjsApi/drive/deploy`.
|
|
31
|
-
*
|
|
32
|
-
* The document requires both body values, so both are checked - a caller that
|
|
33
|
-
* names a stream but not the folder has not said what to remove. Only the folder
|
|
34
|
-
* reaches the registry, because that is what identifies the app.
|
|
35
|
-
*
|
|
36
|
-
* The checks are here rather than in the transport because this is the one
|
|
37
|
-
* implementation of the operation: a host calling it directly gets the same
|
|
38
|
-
* refusals in the same order, and with the same messages the document states.
|
|
39
|
-
*/
|
|
40
|
-
export declare const unpublishAppStream: (registry: AppStreamRegistry, body: UnpublishBody | undefined) => Promise<{
|
|
41
|
-
status: "success";
|
|
42
|
-
}>;
|
|
43
|
-
/**
|
|
44
|
-
* The registry the corpus and the package's own tests read: one published app,
|
|
45
|
-
* identified by its folder alone.
|
|
46
|
-
*/
|
|
47
|
-
export declare class MemoryAppStreamRegistry implements AppStreamRegistry {
|
|
48
|
-
private readonly folders;
|
|
49
|
-
constructor(folders?: string[]);
|
|
50
|
-
unpublish(appLoc: string): Promise<boolean>;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/drive/registry.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC5C;AAED,MAAM,WAAW,aAAa;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,iBAAiB,EAC3B,MAAM,aAAa,GAAG,SAAS,KAC9B,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAU/B,CAAA;AAED;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,iBAAiB;IAC/D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;gBAEzB,OAAO,GAAE,MAAM,EAAsB;IAI3C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGlD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ApiError } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* `DELETE /SASjsApi/drive/deploy`.
|
|
4
|
-
*
|
|
5
|
-
* The document requires both body values, so both are checked - a caller that
|
|
6
|
-
* names a stream but not the folder has not said what to remove. Only the folder
|
|
7
|
-
* reaches the registry, because that is what identifies the app.
|
|
8
|
-
*
|
|
9
|
-
* The checks are here rather than in the transport because this is the one
|
|
10
|
-
* implementation of the operation: a host calling it directly gets the same
|
|
11
|
-
* refusals in the same order, and with the same messages the document states.
|
|
12
|
-
*/
|
|
13
|
-
export const unpublishAppStream = async (registry, body) => {
|
|
14
|
-
if (!body?.streamServiceName)
|
|
15
|
-
throw new ApiError(400, '"streamServiceName" is required');
|
|
16
|
-
if (!body.appLoc)
|
|
17
|
-
throw new ApiError(400, '"appLoc" is required');
|
|
18
|
-
if (!(await registry.unpublish(body.appLoc)))
|
|
19
|
-
throw new ApiError(404, 'No app is published at that folder.');
|
|
20
|
-
return { status: 'success' };
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* The registry the corpus and the package's own tests read: one published app,
|
|
24
|
-
* identified by its folder alone.
|
|
25
|
-
*/
|
|
26
|
-
export class MemoryAppStreamRegistry {
|
|
27
|
-
constructor(folders = ['/Public/myApp']) {
|
|
28
|
-
this.folders = new Set(folders);
|
|
29
|
-
}
|
|
30
|
-
async unpublish(appLoc) {
|
|
31
|
-
return this.folders.delete(appLoc);
|
|
32
|
-
}
|
|
33
|
-
}
|