@sasjs/api 0.44.6 → 0.45.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/build/browser.js +20 -2
- package/build/cjs/index.js +4 -3
- package/build/cjs/viya/surface.js +37 -7
- package/build/cjs/viya/unrecorded.js +4 -0
- package/build/esm/index.d.ts +1 -1
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/viya/surface.d.ts +24 -6
- package/build/esm/viya/surface.d.ts.map +1 -1
- package/build/esm/viya/surface.js +36 -6
- package/build/esm/viya/unrecorded.d.ts.map +1 -1
- package/build/esm/viya/unrecorded.js +4 -0
- package/package.json +1 -1
package/build/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @sasjs/api 0.
|
|
1
|
+
/* @sasjs/api 0.45.0 - the SASjs Server API, for a service worker. https://github.com/sasjs/api */
|
|
2
2
|
"use strict";
|
|
3
3
|
var SASjsApi = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -75,6 +75,7 @@ var SASjsApi = (() => {
|
|
|
75
75
|
STATIC_AUTHORIZED_ROUTES: () => STATIC_AUTHORIZED_ROUTES,
|
|
76
76
|
SURFACE: () => SURFACE,
|
|
77
77
|
SURFACE_ADAPTER_VERSION: () => SURFACE_ADAPTER_VERSION,
|
|
78
|
+
SURFACE_CLI_VERSION: () => SURFACE_CLI_VERSION,
|
|
78
79
|
TAG_CAPABILITIES: () => TAG_CAPABILITIES,
|
|
79
80
|
TOP_LEVEL_ROUTES: () => TOP_LEVEL_ROUTES,
|
|
80
81
|
UNRECORDED: () => UNRECORDED,
|
|
@@ -3819,7 +3820,8 @@ var SASjsApi = (() => {
|
|
|
3819
3820
|
};
|
|
3820
3821
|
|
|
3821
3822
|
// src/viya/surface.ts
|
|
3822
|
-
var SURFACE_ADAPTER_VERSION = "6.
|
|
3823
|
+
var SURFACE_ADAPTER_VERSION = "6.1.2";
|
|
3824
|
+
var SURFACE_CLI_VERSION = "8.0.5";
|
|
3823
3825
|
var SURFACE = [
|
|
3824
3826
|
// sas9
|
|
3825
3827
|
{
|
|
@@ -3828,6 +3830,12 @@ var SASjsApi = (() => {
|
|
|
3828
3830
|
decision: "declined",
|
|
3829
3831
|
reason: "a default config value the client falls back to, not a call"
|
|
3830
3832
|
},
|
|
3833
|
+
{
|
|
3834
|
+
path: "/host/boot.js",
|
|
3835
|
+
family: "sasjs-api",
|
|
3836
|
+
decision: "declined",
|
|
3837
|
+
reason: "the mock host's own boot script: the adapter reads it off a page's script tag to tell whether the mock service worker is serving, so it is never a request to an estate"
|
|
3838
|
+
},
|
|
3831
3839
|
{
|
|
3832
3840
|
path: "/SASJobExecution",
|
|
3833
3841
|
family: "sas9",
|
|
@@ -3841,6 +3849,12 @@ var SASjsApi = (() => {
|
|
|
3841
3849
|
decision: "in",
|
|
3842
3850
|
reason: "the auth flow the client speaks, and the reason the emulated paths cannot be renamed"
|
|
3843
3851
|
},
|
|
3852
|
+
{
|
|
3853
|
+
path: "/SASLogon/authorize",
|
|
3854
|
+
family: "viya-auth",
|
|
3855
|
+
decision: "in",
|
|
3856
|
+
reason: "the transport the CLI signs in with: it posts the credential here for a code, and this server answers it as its own auth route rather than the emulator"
|
|
3857
|
+
},
|
|
3844
3858
|
{
|
|
3845
3859
|
path: "/SASLogon/login",
|
|
3846
3860
|
family: "viya-auth",
|
|
@@ -4930,6 +4944,10 @@ var SASjsApi = (() => {
|
|
|
4930
4944
|
path: "/SASLogon",
|
|
4931
4945
|
reason: "no capture: the pass authenticates outside the adapter, so the login root is never requested through the client"
|
|
4932
4946
|
},
|
|
4947
|
+
{
|
|
4948
|
+
path: "/SASLogon/authorize",
|
|
4949
|
+
reason: "no capture: this is the CLI's sign-in against this server's own auth route, which a Viya estate does not serve"
|
|
4950
|
+
},
|
|
4933
4951
|
{
|
|
4934
4952
|
path: "/SASLogon/login",
|
|
4935
4953
|
reason: "no capture: an interactive login; the pass presents a token instead of a form"
|
package/build/cjs/index.js
CHANGED
|
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.normaliseAppLoc = exports.newAppId = exports.isAppId = exports.escapeHtml = exports.createAppStreamWebService = exports.contentTypeFor = exports.cacheControlFor = exports.appRootOf = exports.NO_SUCH_APP = exports.DEFAULT_APP_PATH = exports.createDriveAppStreamStore = exports.APP_STREAM_INDEX = exports.splitAppBundle = exports.publishRequestFor = exports.parseAppManifest = exports.FRONTEND_FOLDER = exports.BACKEND_FOLDER = void 0;
|
|
17
|
+
exports.HOME_CORPUS = exports.DIRECTORY_CORPUS = exports.AUTH_CONFIG_CORPUS = exports.ADMIN_CORPUS = exports.INFO_CORPUS = exports.CODE_CORPUS = exports.sanitiseDisplayName = exports.createRecordService = exports.createIdentityService = exports.HANDLED_ROUTES = exports.dispatch = exports.VIYA_CORPUS = exports.VIYA_HANDLERS = exports.VIYA_OVERLAY = exports.findViyaOperation = exports.dispatchViya = exports.emulatedHeaders = exports.VIYA_TARGET_VERSION = exports.VIYA_CAPTURED_AT = exports.EMULATED_HEADER_VALUE = exports.EMULATED_HEADER = exports.UNRECORDED = exports.VIYA_TABLE = exports.SURFACE_CLI_VERSION = exports.SURFACE_ADAPTER_VERSION = exports.SURFACE = exports.TAG_CAPABILITIES = exports.OVERLAY = exports.findRoute = exports.routeById = exports.ROUTES = exports.MemoryDriveStore = exports.measureDeployTree = exports.isDeployTree = exports.deployTree = exports.decodeBase64 = exports.checkDeployTree = exports.DEPLOY_SUCCESS = exports.DEPLOY_PAYLOAD_BYTES = exports.DEPLOY_LIMITS = exports.ONE_NAME_ONLY = exports.DEPLOYMENT_FILE_ERROR = exports.createDeploymentFileService = exports.assertOneFileName = exports.createDriveService = exports.isRoot = exports.basename = exports.dirname = exports.hasBlockedExtension = exports.normaliseDrivePath = void 0;
|
|
18
|
+
exports.MemoryAppStreamStore = exports.hasFrontendRoot = exports.frontendFolderOf = exports.defaultAppName = exports.createAppStreamService = exports.checkPublishRequest = exports.appSummary = exports.APP_FOLDERS_ROOT = exports.servicesFor = exports.runCase = exports.PROVIDER_MANAGED = exports.ADMIN_SIGNED_IN = exports.RECORD_CORPUS = exports.RUNTIME_CORPUS = exports.MemorySessionRunner = exports.runTimeOfPath = exports.resolveProgram = exports.programNotFound = exports.DOCUMENTED_RUN_TIMES = exports.createRuntimeService = exports.CODE_DEBUG = exports.MemorySessionHost = exports.DEFAULT_SESSIONS = exports.createSessionService = exports.SESSION_CORPUS = exports.APP_CORPUS = exports.DEPLOY_CORPUS = exports.IDENTITY_CORPUS = exports.DRIVE_CORPUS = exports.parseIdentity = exports.IDENTITY_FORMAT = exports.DEFAULT_IDENTITY = exports.MemoryIdentityStore = exports.createDirectoryService = exports.normaliseLogFiles = exports.normaliseDiagnostics = exports.logLines = exports.createAdminService = exports.checkLogFileName = exports.MAX_LOG_LINES = exports.DEFAULT_LOG_LINES = exports.normaliseAuthConfig = exports.createAuthConfigService = exports.normaliseInfo = exports.createInfoService = exports.BROWSER_INFO = exports.withBundleVersion = exports.createHomeService = exports.NO_WEB_BUILD = exports.BUNDLE_NAME = void 0;
|
|
19
|
+
exports.normaliseAppLoc = exports.newAppId = exports.isAppId = exports.escapeHtml = exports.createAppStreamWebService = exports.contentTypeFor = exports.cacheControlFor = exports.appRootOf = exports.NO_SUCH_APP = exports.DEFAULT_APP_PATH = exports.createDriveAppStreamStore = exports.APP_STREAM_INDEX = exports.splitAppBundle = exports.publishRequestFor = exports.parseAppManifest = exports.FRONTEND_FOLDER = exports.BACKEND_FOLDER = exports.APP_MANIFEST = void 0;
|
|
20
20
|
/**
|
|
21
21
|
* `@sasjs/api` - the SASjs Server API described once.
|
|
22
22
|
*
|
|
@@ -69,6 +69,7 @@ Object.defineProperty(exports, "TAG_CAPABILITIES", { enumerable: true, get: func
|
|
|
69
69
|
var surface_js_1 = require("./viya/surface.js");
|
|
70
70
|
Object.defineProperty(exports, "SURFACE", { enumerable: true, get: function () { return surface_js_1.SURFACE; } });
|
|
71
71
|
Object.defineProperty(exports, "SURFACE_ADAPTER_VERSION", { enumerable: true, get: function () { return surface_js_1.SURFACE_ADAPTER_VERSION; } });
|
|
72
|
+
Object.defineProperty(exports, "SURFACE_CLI_VERSION", { enumerable: true, get: function () { return surface_js_1.SURFACE_CLI_VERSION; } });
|
|
72
73
|
var table_js_1 = require("./viya/table.js");
|
|
73
74
|
Object.defineProperty(exports, "VIYA_TABLE", { enumerable: true, get: function () { return table_js_1.VIYA_TABLE; } });
|
|
74
75
|
var unrecorded_js_1 = require("./viya/unrecorded.js");
|
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The clients' call surface, and what this package decides about each entry.
|
|
4
4
|
*
|
|
5
5
|
* Scope decision 3 of sasjs/server#665: the emulator answers the client's calls
|
|
6
|
-
* and nothing else.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* and nothing else. There are two clients - `@sasjs/adapter`, which an
|
|
7
|
+
* application ships, and `@sasjs/cli`, which a deployment is driven with - and
|
|
8
|
+
* between them they are the only callers this package emulates for.
|
|
9
|
+
*
|
|
10
|
+
* This file is that statement in a form a check can read, extracted from
|
|
11
|
+
* `@sasjs/adapter` 6.1.2 and `@sasjs/cli` 8.0.5 rather than from memory, and
|
|
12
|
+
* compared with both again by `npm run check:scope` (extraction) and by
|
|
13
|
+
* `spec/viyaScope.spec.ts` (this file against the committed inventories).
|
|
14
|
+
*
|
|
15
|
+
* One adapter version serves both: 6.1.2 is what `@sasjs/cli` 8.0.5 itself
|
|
16
|
+
* resolves, so the inventory describes the copy `sasjs deploy` actually calls
|
|
17
|
+
* rather than the one that shipped first. The captures in `table.ts` were taken
|
|
18
|
+
* with 6.0.2, and 6.1.2 builds the same routes - the one addition it brings is
|
|
19
|
+
* declined below with its reason.
|
|
20
|
+
*
|
|
21
|
+
* The CLI's own literals are on top of the adapter's, not instead of them: every
|
|
22
|
+
* `deploy`, `folder`, `run`, `flow` and `servicepack` command builds its calls
|
|
23
|
+
* through `@sasjs/adapter`'s `SASViyaApiClient`, so the adapter's inventory is
|
|
24
|
+
* the larger half. What the CLI adds is its auth paths, and they are here
|
|
25
|
+
* because a deployment fails at sign-in before it reaches any of the rest.
|
|
10
26
|
*
|
|
11
27
|
* `decision: 'in'` means a host must answer it, and the table that lands next
|
|
12
28
|
* has to cover it. `declined` means it is out of scope, with the reason that
|
|
13
29
|
* goes into the 501 body if a client ever calls it here.
|
|
14
30
|
*/
|
|
15
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SURFACE = exports.SURFACE_ADAPTER_VERSION = void 0;
|
|
32
|
+
exports.SURFACE = exports.SURFACE_CLI_VERSION = exports.SURFACE_ADAPTER_VERSION = void 0;
|
|
17
33
|
/** Pinned to the adapter the inventory was extracted from. */
|
|
18
|
-
exports.SURFACE_ADAPTER_VERSION = '6.
|
|
34
|
+
exports.SURFACE_ADAPTER_VERSION = '6.1.2';
|
|
35
|
+
/** Pinned to the CLI the inventory was extracted from. */
|
|
36
|
+
exports.SURFACE_CLI_VERSION = '8.0.5';
|
|
19
37
|
exports.SURFACE = [
|
|
20
38
|
// sas9
|
|
21
39
|
{
|
|
@@ -24,6 +42,12 @@ exports.SURFACE = [
|
|
|
24
42
|
decision: 'declined',
|
|
25
43
|
reason: 'a default config value the client falls back to, not a call'
|
|
26
44
|
},
|
|
45
|
+
{
|
|
46
|
+
path: '/host/boot.js',
|
|
47
|
+
family: 'sasjs-api',
|
|
48
|
+
decision: 'declined',
|
|
49
|
+
reason: "the mock host's own boot script: the adapter reads it off a page's script tag to tell whether the mock service worker is serving, so it is never a request to an estate"
|
|
50
|
+
},
|
|
27
51
|
{
|
|
28
52
|
path: '/SASJobExecution',
|
|
29
53
|
family: 'sas9',
|
|
@@ -37,6 +61,12 @@ exports.SURFACE = [
|
|
|
37
61
|
decision: 'in',
|
|
38
62
|
reason: 'the auth flow the client speaks, and the reason the emulated paths cannot be renamed'
|
|
39
63
|
},
|
|
64
|
+
{
|
|
65
|
+
path: '/SASLogon/authorize',
|
|
66
|
+
family: 'viya-auth',
|
|
67
|
+
decision: 'in',
|
|
68
|
+
reason: 'the transport the CLI signs in with: it posts the credential here for a code, and this server answers it as its own auth route rather than the emulator'
|
|
69
|
+
},
|
|
40
70
|
{
|
|
41
71
|
path: '/SASLogon/login',
|
|
42
72
|
family: 'viya-auth',
|
|
@@ -9,6 +9,10 @@ exports.UNRECORDED = [
|
|
|
9
9
|
path: '/SASLogon',
|
|
10
10
|
reason: 'no capture: the pass authenticates outside the adapter, so the login root is never requested through the client'
|
|
11
11
|
},
|
|
12
|
+
{
|
|
13
|
+
path: '/SASLogon/authorize',
|
|
14
|
+
reason: "no capture: this is the CLI's sign-in against this server's own auth route, which a Viya estate does not serve"
|
|
15
|
+
},
|
|
12
16
|
{
|
|
13
17
|
path: '/SASLogon/login',
|
|
14
18
|
reason: 'no capture: an interactive login; the pass presents a token instead of a form'
|
package/build/esm/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { ROUTES, routeById, findRoute } from './routes/index.js';
|
|
|
26
26
|
export type { RouteMatch } from './routes/index.js';
|
|
27
27
|
export { OVERLAY, TAG_CAPABILITIES } from './routes/overlay.js';
|
|
28
28
|
export type { RouteOverlay } from './routes/overlay.js';
|
|
29
|
-
export { SURFACE, SURFACE_ADAPTER_VERSION } from './viya/surface.js';
|
|
29
|
+
export { SURFACE, SURFACE_ADAPTER_VERSION, SURFACE_CLI_VERSION } from './viya/surface.js';
|
|
30
30
|
export type { SurfaceEntry, SurfaceFamily } from './viya/surface.js';
|
|
31
31
|
export { VIYA_TABLE } from './viya/table.js';
|
|
32
32
|
export type { ViyaOperation } from './viya/table.js';
|
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,iBAAiB,EACjB,2BAA2B,EAC3B,qBAAqB,EACrB,aAAa,EACd,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,2BAA2B,CAAA;AAClC,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;AAIvD,OAAO,
|
|
1
|
+
{"version":3,"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C3B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA"}
|
package/build/esm/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export { ROUTES, routeById, findRoute } from './routes/index.js';
|
|
|
23
23
|
export { OVERLAY, TAG_CAPABILITIES } from './routes/overlay.js';
|
|
24
24
|
// the client's call surface, and this package's decision about each entry: a
|
|
25
25
|
// host that refuses an out-of-scope path reads the same statement the guard does
|
|
26
|
-
export { SURFACE, SURFACE_ADAPTER_VERSION } from './viya/surface.js';
|
|
26
|
+
export { SURFACE, SURFACE_ADAPTER_VERSION, SURFACE_CLI_VERSION } from './viya/surface.js';
|
|
27
27
|
export { VIYA_TABLE } from './viya/table.js';
|
|
28
28
|
export { UNRECORDED } from './viya/unrecorded.js';
|
|
29
29
|
export { EMULATED_HEADER, EMULATED_HEADER_VALUE, VIYA_CAPTURED_AT, VIYA_TARGET_VERSION, emulatedHeaders } from './viya/version.js';
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The clients' call surface, and what this package decides about each entry.
|
|
3
3
|
*
|
|
4
4
|
* Scope decision 3 of sasjs/server#665: the emulator answers the client's calls
|
|
5
|
-
* and nothing else.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* and nothing else. There are two clients - `@sasjs/adapter`, which an
|
|
6
|
+
* application ships, and `@sasjs/cli`, which a deployment is driven with - and
|
|
7
|
+
* between them they are the only callers this package emulates for.
|
|
8
|
+
*
|
|
9
|
+
* This file is that statement in a form a check can read, extracted from
|
|
10
|
+
* `@sasjs/adapter` 6.1.2 and `@sasjs/cli` 8.0.5 rather than from memory, and
|
|
11
|
+
* compared with both again by `npm run check:scope` (extraction) and by
|
|
12
|
+
* `spec/viyaScope.spec.ts` (this file against the committed inventories).
|
|
13
|
+
*
|
|
14
|
+
* One adapter version serves both: 6.1.2 is what `@sasjs/cli` 8.0.5 itself
|
|
15
|
+
* resolves, so the inventory describes the copy `sasjs deploy` actually calls
|
|
16
|
+
* rather than the one that shipped first. The captures in `table.ts` were taken
|
|
17
|
+
* with 6.0.2, and 6.1.2 builds the same routes - the one addition it brings is
|
|
18
|
+
* declined below with its reason.
|
|
19
|
+
*
|
|
20
|
+
* The CLI's own literals are on top of the adapter's, not instead of them: every
|
|
21
|
+
* `deploy`, `folder`, `run`, `flow` and `servicepack` command builds its calls
|
|
22
|
+
* through `@sasjs/adapter`'s `SASViyaApiClient`, so the adapter's inventory is
|
|
23
|
+
* the larger half. What the CLI adds is its auth paths, and they are here
|
|
24
|
+
* because a deployment fails at sign-in before it reaches any of the rest.
|
|
9
25
|
*
|
|
10
26
|
* `decision: 'in'` means a host must answer it, and the table that lands next
|
|
11
27
|
* has to cover it. `declined` means it is out of scope, with the reason that
|
|
@@ -21,6 +37,8 @@ export interface SurfaceEntry {
|
|
|
21
37
|
reason: string;
|
|
22
38
|
}
|
|
23
39
|
/** Pinned to the adapter the inventory was extracted from. */
|
|
24
|
-
export declare const SURFACE_ADAPTER_VERSION = "6.
|
|
40
|
+
export declare const SURFACE_ADAPTER_VERSION = "6.1.2";
|
|
41
|
+
/** Pinned to the CLI the inventory was extracted from. */
|
|
42
|
+
export declare const SURFACE_CLI_VERSION = "8.0.5";
|
|
25
43
|
export declare const SURFACE: SurfaceEntry[];
|
|
26
44
|
//# sourceMappingURL=surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/viya/surface.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/viya/surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,WAAW,GACX,WAAW,GACX,cAAc,GACd,YAAY,GACZ,cAAc,GACd,eAAe,GACf,WAAW,CAAA;AAEf,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,EAAE,IAAI,GAAG,UAAU,CAAA;IAC3B,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAA;CACf;AAED,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,UAAU,CAAA;AAE9C,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAE1C,eAAO,MAAM,OAAO,EAAE,YAAY,EAwXjC,CAAA"}
|
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The clients' call surface, and what this package decides about each entry.
|
|
3
3
|
*
|
|
4
4
|
* Scope decision 3 of sasjs/server#665: the emulator answers the client's calls
|
|
5
|
-
* and nothing else.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* and nothing else. There are two clients - `@sasjs/adapter`, which an
|
|
6
|
+
* application ships, and `@sasjs/cli`, which a deployment is driven with - and
|
|
7
|
+
* between them they are the only callers this package emulates for.
|
|
8
|
+
*
|
|
9
|
+
* This file is that statement in a form a check can read, extracted from
|
|
10
|
+
* `@sasjs/adapter` 6.1.2 and `@sasjs/cli` 8.0.5 rather than from memory, and
|
|
11
|
+
* compared with both again by `npm run check:scope` (extraction) and by
|
|
12
|
+
* `spec/viyaScope.spec.ts` (this file against the committed inventories).
|
|
13
|
+
*
|
|
14
|
+
* One adapter version serves both: 6.1.2 is what `@sasjs/cli` 8.0.5 itself
|
|
15
|
+
* resolves, so the inventory describes the copy `sasjs deploy` actually calls
|
|
16
|
+
* rather than the one that shipped first. The captures in `table.ts` were taken
|
|
17
|
+
* with 6.0.2, and 6.1.2 builds the same routes - the one addition it brings is
|
|
18
|
+
* declined below with its reason.
|
|
19
|
+
*
|
|
20
|
+
* The CLI's own literals are on top of the adapter's, not instead of them: every
|
|
21
|
+
* `deploy`, `folder`, `run`, `flow` and `servicepack` command builds its calls
|
|
22
|
+
* through `@sasjs/adapter`'s `SASViyaApiClient`, so the adapter's inventory is
|
|
23
|
+
* the larger half. What the CLI adds is its auth paths, and they are here
|
|
24
|
+
* because a deployment fails at sign-in before it reaches any of the rest.
|
|
9
25
|
*
|
|
10
26
|
* `decision: 'in'` means a host must answer it, and the table that lands next
|
|
11
27
|
* has to cover it. `declined` means it is out of scope, with the reason that
|
|
12
28
|
* goes into the 501 body if a client ever calls it here.
|
|
13
29
|
*/
|
|
14
30
|
/** Pinned to the adapter the inventory was extracted from. */
|
|
15
|
-
export const SURFACE_ADAPTER_VERSION = '6.
|
|
31
|
+
export const SURFACE_ADAPTER_VERSION = '6.1.2';
|
|
32
|
+
/** Pinned to the CLI the inventory was extracted from. */
|
|
33
|
+
export const SURFACE_CLI_VERSION = '8.0.5';
|
|
16
34
|
export const SURFACE = [
|
|
17
35
|
// sas9
|
|
18
36
|
{
|
|
@@ -21,6 +39,12 @@ export const SURFACE = [
|
|
|
21
39
|
decision: 'declined',
|
|
22
40
|
reason: 'a default config value the client falls back to, not a call'
|
|
23
41
|
},
|
|
42
|
+
{
|
|
43
|
+
path: '/host/boot.js',
|
|
44
|
+
family: 'sasjs-api',
|
|
45
|
+
decision: 'declined',
|
|
46
|
+
reason: "the mock host's own boot script: the adapter reads it off a page's script tag to tell whether the mock service worker is serving, so it is never a request to an estate"
|
|
47
|
+
},
|
|
24
48
|
{
|
|
25
49
|
path: '/SASJobExecution',
|
|
26
50
|
family: 'sas9',
|
|
@@ -34,6 +58,12 @@ export const SURFACE = [
|
|
|
34
58
|
decision: 'in',
|
|
35
59
|
reason: 'the auth flow the client speaks, and the reason the emulated paths cannot be renamed'
|
|
36
60
|
},
|
|
61
|
+
{
|
|
62
|
+
path: '/SASLogon/authorize',
|
|
63
|
+
family: 'viya-auth',
|
|
64
|
+
decision: 'in',
|
|
65
|
+
reason: 'the transport the CLI signs in with: it posts the credential here for a code, and this server answers it as its own auth route rather than the emulator'
|
|
66
|
+
},
|
|
37
67
|
{
|
|
38
68
|
path: '/SASLogon/login',
|
|
39
69
|
family: 'viya-auth',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unrecorded.d.ts","sourceRoot":"","sources":["../../../src/viya/unrecorded.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,UAAU,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"unrecorded.d.ts","sourceRoot":"","sources":["../../../src/viya/unrecorded.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,UAAU,EAAE,mBAAmB,EAoE3C,CAAA"}
|
|
@@ -6,6 +6,10 @@ export const UNRECORDED = [
|
|
|
6
6
|
path: '/SASLogon',
|
|
7
7
|
reason: 'no capture: the pass authenticates outside the adapter, so the login root is never requested through the client'
|
|
8
8
|
},
|
|
9
|
+
{
|
|
10
|
+
path: '/SASLogon/authorize',
|
|
11
|
+
reason: "no capture: this is the CLI's sign-in against this server's own auth route, which a Viya estate does not serve"
|
|
12
|
+
},
|
|
9
13
|
{
|
|
10
14
|
path: '/SASLogon/login',
|
|
11
15
|
reason: 'no capture: an interactive login; the pass presents a token instead of a form'
|
package/package.json
CHANGED