@nymphjs/tilmeld-setup 1.0.0-beta.86 → 1.0.0-beta.87
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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/dist/app/index.js +21 -7
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-beta.87](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.86...v1.0.0-beta.87) (2025-01-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
9
|
+
|
|
6
10
|
# [1.0.0-beta.86](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.85...v1.0.0-beta.86) (2024-12-28)
|
|
7
11
|
|
|
8
12
|
### Features
|
package/README.md
CHANGED
package/dist/app/index.js
CHANGED
|
@@ -19682,8 +19682,9 @@
|
|
|
19682
19682
|
* Nymph and return it. You can then use this class's constructor and methods,
|
|
19683
19683
|
* which will use this instance of Nymph.
|
|
19684
19684
|
*
|
|
19685
|
-
* Because this creates a subclass, don't use the class
|
|
19686
|
-
*
|
|
19685
|
+
* Because this creates a subclass, don't use the class returned from
|
|
19686
|
+
* `getEntityClass` to check with `instanceof`. Instead, use the base class
|
|
19687
|
+
* that you passed into this method.
|
|
19687
19688
|
*/
|
|
19688
19689
|
addEntityClass(entityClass) {
|
|
19689
19690
|
const nymph = this;
|
|
@@ -20200,7 +20201,6 @@
|
|
|
20200
20201
|
}
|
|
20201
20202
|
}
|
|
20202
20203
|
|
|
20203
|
-
let currentToken = null;
|
|
20204
20204
|
let User$1 = class User extends Entity {
|
|
20205
20205
|
static stores = new WeakMap();
|
|
20206
20206
|
// The name of the server class
|
|
@@ -20376,8 +20376,13 @@
|
|
|
20376
20376
|
return await store.clientConfigPromise;
|
|
20377
20377
|
}
|
|
20378
20378
|
static handleToken(response) {
|
|
20379
|
+
const store = User.stores.get(this.nymph);
|
|
20380
|
+
if (store == null) {
|
|
20381
|
+
throw new Error('This user class was never initialized with an instance of Nymph');
|
|
20382
|
+
}
|
|
20379
20383
|
let token = null;
|
|
20380
20384
|
let switchToken = null;
|
|
20385
|
+
let hasNoCookie = typeof document === 'undefined' || typeof document.cookie === 'undefined';
|
|
20381
20386
|
const authCookiePattern = /(?:(?:^|.*;\s*)TILMELDAUTH\s*=\s*([^;]*).*$)|^.*$/;
|
|
20382
20387
|
const switchCookiePattern = /(?:(?:^|.*;\s*)TILMELDSWITCH\s*=\s*([^;]*).*$)|^.*$/;
|
|
20383
20388
|
if (response && response.headers.has('X-TILMELDAUTH')) {
|
|
@@ -20392,14 +20397,16 @@
|
|
|
20392
20397
|
else {
|
|
20393
20398
|
return;
|
|
20394
20399
|
}
|
|
20395
|
-
if (currentToken
|
|
20400
|
+
if (store.currentToken != token) {
|
|
20396
20401
|
if (token == null || token === '') {
|
|
20397
|
-
if (currentToken != null) {
|
|
20402
|
+
if (store.currentToken != null) {
|
|
20398
20403
|
delete this.nymph.headers['X-Xsrf-Token'];
|
|
20404
|
+
delete this.nymph.headers['X-TILMELDAUTH'];
|
|
20405
|
+
delete this.nymph.headers['X-TILMELDSWITCH'];
|
|
20399
20406
|
if (this.nymph.pubsub) {
|
|
20400
20407
|
this.nymph.pubsub.authenticate(null);
|
|
20401
20408
|
}
|
|
20402
|
-
currentToken
|
|
20409
|
+
delete store.currentToken;
|
|
20403
20410
|
}
|
|
20404
20411
|
}
|
|
20405
20412
|
else {
|
|
@@ -20410,10 +20417,17 @@
|
|
|
20410
20417
|
: atob(base64); // browser
|
|
20411
20418
|
const jwt = JSON.parse(json);
|
|
20412
20419
|
this.nymph.headers['X-Xsrf-Token'] = jwt.xsrfToken;
|
|
20420
|
+
if (hasNoCookie) {
|
|
20421
|
+
this.nymph.headers['X-TILMELDAUTH'] = token;
|
|
20422
|
+
delete this.nymph.headers['X-TILMELDSWITCH'];
|
|
20423
|
+
if (switchToken != null) {
|
|
20424
|
+
this.nymph.headers['X-TILMELDSWITCH'] = switchToken;
|
|
20425
|
+
}
|
|
20426
|
+
}
|
|
20413
20427
|
if (this.nymph.pubsub) {
|
|
20414
20428
|
this.nymph.pubsub.authenticate(token, switchToken);
|
|
20415
20429
|
}
|
|
20416
|
-
currentToken = token;
|
|
20430
|
+
store.currentToken = token;
|
|
20417
20431
|
}
|
|
20418
20432
|
}
|
|
20419
20433
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nymphjs/tilmeld-setup",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.87",
|
|
4
4
|
"description": "Nymph.js - Tilmeld Setup App",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nymphjs/nymph": "^1.0.0-beta.
|
|
39
|
-
"@nymphjs/tilmeld": "^1.0.0-beta.
|
|
38
|
+
"@nymphjs/nymph": "^1.0.0-beta.87",
|
|
39
|
+
"@nymphjs/tilmeld": "^1.0.0-beta.87",
|
|
40
40
|
"express": "^4.21.2",
|
|
41
41
|
"locutus": "^2.0.32"
|
|
42
42
|
},
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@material/elevation": "^14.0.0",
|
|
45
45
|
"@material/typography": "^14.0.0",
|
|
46
46
|
"@mdi/js": "^7.4.47",
|
|
47
|
-
"@nymphjs/client": "^1.0.0-beta.
|
|
48
|
-
"@nymphjs/driver-sqlite3": "^1.0.0-beta.
|
|
49
|
-
"@nymphjs/query-parser": "^1.0.0-beta.
|
|
50
|
-
"@nymphjs/server": "^1.0.0-beta.
|
|
51
|
-
"@nymphjs/tilmeld-client": "^1.0.0-beta.
|
|
52
|
-
"@nymphjs/tilmeld-components": "^1.0.0-beta.
|
|
47
|
+
"@nymphjs/client": "^1.0.0-beta.87",
|
|
48
|
+
"@nymphjs/driver-sqlite3": "^1.0.0-beta.87",
|
|
49
|
+
"@nymphjs/query-parser": "^1.0.0-beta.87",
|
|
50
|
+
"@nymphjs/server": "^1.0.0-beta.87",
|
|
51
|
+
"@nymphjs/tilmeld-client": "^1.0.0-beta.87",
|
|
52
|
+
"@nymphjs/tilmeld-components": "^1.0.0-beta.87",
|
|
53
53
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
54
54
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
55
55
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"tslib": "^2.8.1",
|
|
92
92
|
"typescript": "^5.7.2"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "0125c8ff146f2962ef30b7b579286c70c555e7f4"
|
|
95
95
|
}
|