@sasjs/api 0.18.0 → 0.19.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 +717 -18
- package/build/cjs/admin/service.js +209 -0
- package/build/cjs/authconfig/service.js +139 -0
- package/build/cjs/corpus/admin.js +101 -0
- package/build/cjs/corpus/authconfig.js +47 -0
- package/build/cjs/corpus/directory.js +31 -0
- package/build/cjs/corpus/runner.js +13 -0
- package/build/cjs/directory/service.js +116 -0
- package/build/cjs/host/dispatch.js +39 -0
- package/build/cjs/identity/memory-store.js +4 -1
- package/build/cjs/index.js +8 -2
- package/build/cjs/info/service.js +13 -8
- package/build/cjs/routes/generated.js +56 -0
- package/build/cjs/routes/overlay.js +86 -12
- package/build/esm/admin/service.d.ts +123 -0
- package/build/esm/admin/service.d.ts.map +1 -0
- package/build/esm/admin/service.js +201 -0
- package/build/esm/authconfig/service.d.ts +92 -0
- package/build/esm/authconfig/service.d.ts.map +1 -0
- package/build/esm/authconfig/service.js +134 -0
- package/build/esm/corpus/admin.d.ts +22 -0
- package/build/esm/corpus/admin.d.ts.map +1 -0
- package/build/esm/corpus/admin.js +98 -0
- package/build/esm/corpus/authconfig.d.ts +31 -0
- package/build/esm/corpus/authconfig.d.ts.map +1 -0
- package/build/esm/corpus/authconfig.js +44 -0
- package/build/esm/corpus/directory.d.ts +20 -0
- package/build/esm/corpus/directory.d.ts.map +1 -0
- package/build/esm/corpus/directory.js +28 -0
- package/build/esm/corpus/runner.d.ts.map +1 -1
- package/build/esm/corpus/runner.js +13 -0
- package/build/esm/directory/service.d.ts +71 -0
- package/build/esm/directory/service.d.ts.map +1 -0
- package/build/esm/directory/service.js +112 -0
- package/build/esm/host/dispatch.d.ts +18 -0
- package/build/esm/host/dispatch.d.ts.map +1 -1
- package/build/esm/host/dispatch.js +39 -0
- package/build/esm/identity/memory-store.d.ts.map +1 -1
- package/build/esm/identity/memory-store.js +4 -1
- package/build/esm/identity/types.d.ts +5 -0
- package/build/esm/identity/types.d.ts.map +1 -1
- package/build/esm/index.d.ts +3 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +3 -0
- package/build/esm/info/service.d.ts +14 -6
- package/build/esm/info/service.d.ts.map +1 -1
- package/build/esm/info/service.js +12 -7
- package/build/esm/routes/generated.d.ts.map +1 -1
- package/build/esm/routes/generated.js +56 -0
- package/build/esm/routes/overlay.d.ts.map +1 -1
- package/build/esm/routes/overlay.js +86 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/routes/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGzD,yDAAyD;AACzD,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE,UAAU,EAAE,CAAA;IAC3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GACtC,CAAC;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElE,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAczD,CAAA;
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/routes/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGzD,yDAAyD;AACzD,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE,UAAU,EAAE,CAAA;IAC3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GACtC,CAAC;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElE,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAczD,CAAA;AAsBD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsThD,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,OAAO,EAAE,UAAU,EAA8C,CAAA"}
|
|
@@ -22,9 +22,6 @@ export const TAG_CAPABILITIES = {
|
|
|
22
22
|
* operation waits on, and thirty copies of the same sentence would say the same
|
|
23
23
|
* thing thirty times.
|
|
24
24
|
*/
|
|
25
|
-
const DIRECTORY = 'Synchronising with an external auth provider needs a directory port, which this package does not have: a host decides which directory it holds accounts in, and answers this itself.';
|
|
26
|
-
const HOST_CONFIG = "The body is the host's own provider configuration - the directory URL, bind DN and which secrets are set - which a mock states for itself and this package cannot know.";
|
|
27
|
-
const HOST_OWNED = "The host owns this report: it describes the host's own process and files, which a browser build has no equivalent of.";
|
|
28
25
|
const WEB_BUNDLE = 'The host serves its own web bundle; there is no API decision here for this package to answer.';
|
|
29
26
|
const success = { status: 'success' };
|
|
30
27
|
const user = {
|
|
@@ -53,12 +50,71 @@ export const OVERLAY = {
|
|
|
53
50
|
hostResponses: [500],
|
|
54
51
|
responses: { 200: 'OK!' }
|
|
55
52
|
},
|
|
56
|
-
// Admin - the host's own process and files
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
// Admin - the host's own process and files, over the reports it supplies.
|
|
54
|
+
// The administrator check is the host's mount point (sasjs/server puts
|
|
55
|
+
// authenticateAccessToken and verifyAdmin in front of all three), so its 401
|
|
56
|
+
// - and the 500 a genuine failure answers - are host-only statuses.
|
|
57
|
+
'GET /SASjsApi/admin/diagnostics': {
|
|
58
|
+
implemented: true,
|
|
59
|
+
hostResponses: [401, 500],
|
|
60
|
+
responses: {
|
|
61
|
+
200: {
|
|
62
|
+
build: { version: '', gitHash: '', buildDate: null },
|
|
63
|
+
server: {
|
|
64
|
+
mode: 'desktop',
|
|
65
|
+
uptimeSeconds: 0,
|
|
66
|
+
startedAt: '',
|
|
67
|
+
pid: 0,
|
|
68
|
+
nodeVersion: '',
|
|
69
|
+
platform: '',
|
|
70
|
+
arch: '',
|
|
71
|
+
cpuCount: 0,
|
|
72
|
+
cpuModel: '',
|
|
73
|
+
loadAverage: [],
|
|
74
|
+
runTimes: [],
|
|
75
|
+
sasjsRoot: ''
|
|
76
|
+
},
|
|
77
|
+
memory: {
|
|
78
|
+
rssBytes: 0,
|
|
79
|
+
heapTotalBytes: 0,
|
|
80
|
+
heapUsedBytes: 0,
|
|
81
|
+
externalBytes: 0,
|
|
82
|
+
systemTotalBytes: 0,
|
|
83
|
+
systemFreeBytes: 0
|
|
84
|
+
},
|
|
85
|
+
filesystem: null,
|
|
86
|
+
folders: [],
|
|
87
|
+
logs: {
|
|
88
|
+
folder: '',
|
|
89
|
+
fileCount: 0,
|
|
90
|
+
totalBytes: 0,
|
|
91
|
+
newestFile: null,
|
|
92
|
+
newestModified: null
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
'GET /SASjsApi/admin/logs': {
|
|
98
|
+
implemented: true,
|
|
99
|
+
hostResponses: [401, 500],
|
|
100
|
+
responses: { 200: { files: [] } }
|
|
101
|
+
},
|
|
59
102
|
'GET /SASjsApi/admin/logs/{fileName}': {
|
|
60
|
-
implemented:
|
|
61
|
-
|
|
103
|
+
implemented: true,
|
|
104
|
+
// 400 and 404 are the name rule's, and this package answers them before the
|
|
105
|
+
// host is asked for anything
|
|
106
|
+
hostResponses: [401, 500],
|
|
107
|
+
responses: {
|
|
108
|
+
200: {
|
|
109
|
+
fileName: '',
|
|
110
|
+
lines: 0,
|
|
111
|
+
bytesRead: 0,
|
|
112
|
+
truncated: false,
|
|
113
|
+
content: ''
|
|
114
|
+
},
|
|
115
|
+
400: 'Invalid log file name.',
|
|
116
|
+
404: 'Log file not found.'
|
|
117
|
+
}
|
|
62
118
|
},
|
|
63
119
|
// Auth - the token flow, plus a password change the identity store cannot write
|
|
64
120
|
'POST /SASjsApi/auth/token': {
|
|
@@ -76,11 +132,29 @@ export const OVERLAY = {
|
|
|
76
132
|
// has gone, which a host's store can see and this package cannot.
|
|
77
133
|
hostResponses: [404]
|
|
78
134
|
},
|
|
79
|
-
// Auth Config - the providers a host was started with, and an LDAP import
|
|
80
|
-
|
|
135
|
+
// Auth Config - the providers a host was started with, and an LDAP import.
|
|
136
|
+
// Both are administrator routes at the host's mount point, so 401 and the
|
|
137
|
+
// host's own 500 are host-only statuses; the package answers the body, and
|
|
138
|
+
// refuses a secret that a host tries to hand it.
|
|
139
|
+
'GET /SASjsApi/authConfig': {
|
|
140
|
+
implemented: true,
|
|
141
|
+
hostResponses: [401, 403, 500],
|
|
142
|
+
responses: {
|
|
143
|
+
200: {
|
|
144
|
+
ldap: {
|
|
145
|
+
LDAP_URL: '',
|
|
146
|
+
LDAP_BIND_DN: '',
|
|
147
|
+
LDAP_USERS_BASE_DN: '',
|
|
148
|
+
LDAP_GROUPS_BASE_DN: '',
|
|
149
|
+
LDAP_BIND_PASSWORD_SET: true
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
81
154
|
'POST /SASjsApi/authConfig/synchroniseWithLDAP': {
|
|
82
|
-
implemented:
|
|
83
|
-
|
|
155
|
+
implemented: true,
|
|
156
|
+
hostResponses: [401, 403, 500],
|
|
157
|
+
responses: { 200: { userCount: 0, groupCount: 0 } }
|
|
84
158
|
},
|
|
85
159
|
// Client - the OAuth clients the identity store already holds for sign-in
|
|
86
160
|
'GET /SASjsApi/client': { implemented: true },
|
package/package.json
CHANGED