@antasphere/chassis-server 1.5.0 → 1.5.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antasphere/chassis-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
"ulid": "^3.0.2",
|
|
144
144
|
"yazl": "^3.3.1",
|
|
145
145
|
"zod": "^4.1.0",
|
|
146
|
-
"@antasphere/chassis-
|
|
147
|
-
"@antasphere/chassis-
|
|
146
|
+
"@antasphere/chassis-contract": "1.5.1",
|
|
147
|
+
"@antasphere/chassis-db": "1.5.1"
|
|
148
148
|
},
|
|
149
149
|
"devDependencies": {
|
|
150
150
|
"@better-auth/core": "1.6.22",
|
|
@@ -18,7 +18,11 @@ import { nextIp, ssoLogin } from './sso-helpers.js';
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The Apps page's route (`GET /apps`, `src/apps/`, PRDCT-3493) through the
|
|
21
|
-
* REAL boot of the minimal tool, on both editions
|
|
21
|
+
* REAL boot of the minimal tool, on both editions. The suite runs in every
|
|
22
|
+
* tool against its own host, so the other tools it lists carry invented slugs
|
|
23
|
+
* (ledger-tool, people-tool) that no real tool has: a real slug would be the
|
|
24
|
+
* host's own in that tool and read as "this tool" (chassis 1.5.0 named finance
|
|
25
|
+
* and hiring, and the finance and hiring tools' suites went red on it).
|
|
22
26
|
*
|
|
23
27
|
* - self-hosted, with an operator's file: a browser session reads the list
|
|
24
28
|
* (this tool marked current, the account from the file's `account` entry,
|
|
@@ -75,13 +79,13 @@ describe('GET /apps on a self-hosted instance with an operator file', () => {
|
|
|
75
79
|
JSON.stringify([
|
|
76
80
|
{ slug: 'account', name: 'Antasphere account', launchUrl: 'https://account.example.com' },
|
|
77
81
|
{
|
|
78
|
-
slug: '
|
|
79
|
-
name: 'Antasphere
|
|
80
|
-
launchUrl: 'https://
|
|
82
|
+
slug: 'ledger-tool',
|
|
83
|
+
name: 'Antasphere Ledger Tool',
|
|
84
|
+
launchUrl: 'https://ledger-tool.example.com',
|
|
81
85
|
...DESCRIPTOR
|
|
82
86
|
},
|
|
83
87
|
{ slug: host.identity.slug, name: 'This Tool', launchUrl: 'https://thistool.example.com' },
|
|
84
|
-
{ slug: '
|
|
88
|
+
{ slug: 'bad-url-tool', name: 'Antasphere Bad URL Tool', launchUrl: 'javascript:alert(1)' }
|
|
85
89
|
])
|
|
86
90
|
);
|
|
87
91
|
app = await createTestApp(await createDatabase(container, 'apps_route_oss'), { APPS_FILE: appsFile });
|
|
@@ -115,7 +119,7 @@ describe('GET /apps on a self-hosted instance with an operator file', () => {
|
|
|
115
119
|
expect(body.source).toBe('file');
|
|
116
120
|
expect(body.hub).toEqual({ url: 'https://account.example.com/', name: 'Antasphere account' });
|
|
117
121
|
expect(body.apps.map((a: { slug: string; current: boolean }) => [a.slug, a.current])).toEqual([
|
|
118
|
-
['
|
|
122
|
+
['ledger-tool', false],
|
|
119
123
|
[host.identity.slug, true]
|
|
120
124
|
]);
|
|
121
125
|
expect(body.apps[0].descriptor).toEqual(DESCRIPTOR);
|
|
@@ -169,20 +173,20 @@ describe('GET /apps on the cloud edition, against the hub', () => {
|
|
|
169
173
|
hub = await FakeHub.start({ clientId: host.hubClientId });
|
|
170
174
|
hub.setTools([
|
|
171
175
|
{
|
|
172
|
-
slug: '
|
|
173
|
-
name: 'Antasphere
|
|
174
|
-
launchUrl: 'https://
|
|
176
|
+
slug: 'ledger-tool',
|
|
177
|
+
name: 'Antasphere Ledger Tool',
|
|
178
|
+
launchUrl: 'https://ledger-tool.example.com',
|
|
175
179
|
descriptor: DESCRIPTOR
|
|
176
180
|
},
|
|
177
181
|
{
|
|
178
|
-
slug: '
|
|
179
|
-
name: 'Antasphere
|
|
180
|
-
launchUrl: 'https://
|
|
182
|
+
slug: 'people-tool',
|
|
183
|
+
name: 'Antasphere People Tool',
|
|
184
|
+
launchUrl: 'https://people-tool.example.com',
|
|
181
185
|
descriptor: { icon: 'users' }
|
|
182
186
|
},
|
|
183
187
|
{ slug: host.identity.slug, name: 'This Tool', launchUrl: 'https://thistool.example.com' }
|
|
184
188
|
]);
|
|
185
|
-
hub.setToolClosed(omar.sub, '
|
|
189
|
+
hub.setToolClosed(omar.sub, 'people-tool', ORG);
|
|
186
190
|
app = await createTestApp(await createDatabase(container, 'apps_route_cloud'), {
|
|
187
191
|
EDITION: 'cloud',
|
|
188
192
|
HUB_ISSUER_URL: hub.issuer,
|
|
@@ -204,8 +208,8 @@ describe('GET /apps on the cloud edition, against the hub', () => {
|
|
|
204
208
|
expect(body.source).toBe('hub');
|
|
205
209
|
expect(body.hub).toEqual({ url: `${hub.issuer}/`, name: 'Antasphere Account' });
|
|
206
210
|
expect(body.apps.map((a: { slug: string; current: boolean }) => [a.slug, a.current])).toEqual([
|
|
207
|
-
['
|
|
208
|
-
['
|
|
211
|
+
['ledger-tool', false],
|
|
212
|
+
['people-tool', false],
|
|
209
213
|
[host.identity.slug, true]
|
|
210
214
|
]);
|
|
211
215
|
expect(body.apps[0].descriptor).toEqual(DESCRIPTOR);
|
|
@@ -220,7 +224,7 @@ describe('GET /apps on the cloud edition, against the hub', () => {
|
|
|
220
224
|
const cookie = await ssoLogin(app, hub, omar);
|
|
221
225
|
const body = await readJson(await send(app, 'GET', '/apps', { cookie }));
|
|
222
226
|
expect(body.source).toBe('hub');
|
|
223
|
-
expect(body.apps.map((a: { slug: string }) => a.slug)).toEqual(['
|
|
227
|
+
expect(body.apps.map((a: { slug: string }) => a.slug)).toEqual(['ledger-tool', host.identity.slug]);
|
|
224
228
|
});
|
|
225
229
|
|
|
226
230
|
it('a person whose organization the hub suspended reads an empty list that says so, never the tools', async () => {
|