@tstdl/base 0.91.15 → 0.91.18

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/.eslintrc.json CHANGED
@@ -123,7 +123,6 @@
123
123
  "import/newline-after-import": ["warn"],
124
124
  "import/no-absolute-path": ["warn"],
125
125
  "import/no-anonymous-default-export": ["warn"],
126
- "import/no-cycle": ["off", { "ignoreExternal": true }],
127
126
  "import/no-duplicates": ["warn", { "prefer-inline": true }],
128
127
  "import/no-empty-named-blocks": ["warn"],
129
128
  "import/no-extraneous-dependencies": ["off", { "devDependencies": false, "includeTypes": true }],
@@ -34,6 +34,7 @@ const impersonatorAuthenticationDataStorageKey = 'AuthenticationService:imperson
34
34
  const tokenUpdateBusName = 'AuthenticationService:tokenUpdate';
35
35
  const loggedOutBusName = 'AuthenticationService:loggedOut';
36
36
  const refreshLockResource = 'AuthenticationService:refresh';
37
+ const localStorage = globalThis.localStorage;
37
38
  let AuthenticationClientService = class AuthenticationClientService {
38
39
  client = inject(AUTHENTICATION_API_CLIENT);
39
40
  errorSubject = new Subject();
@@ -60,29 +61,29 @@ let AuthenticationClientService = class AuthenticationClientService {
60
61
  isLoggedIn$ = toObservable(this.isLoggedIn);
61
62
  loggedOut$ = this.loggedOutBus.allMessages$;
62
63
  get authenticationData() {
63
- const data = localStorage.getItem(authenticationDataStorageKey);
64
+ const data = localStorage?.getItem(authenticationDataStorageKey);
64
65
  return isNullOrUndefined(data) ? undefined : JSON.parse(data);
65
66
  }
66
67
  set authenticationData(data) {
67
68
  if (isUndefined(data)) {
68
- localStorage.removeItem(authenticationDataStorageKey);
69
+ localStorage?.removeItem(authenticationDataStorageKey);
69
70
  }
70
71
  else {
71
72
  const json = JSON.stringify(data);
72
- localStorage.setItem(authenticationDataStorageKey, json);
73
+ localStorage?.setItem(authenticationDataStorageKey, json);
73
74
  }
74
75
  }
75
76
  get impersonatorAuthenticationData() {
76
- const data = localStorage.getItem(impersonatorAuthenticationDataStorageKey);
77
+ const data = localStorage?.getItem(impersonatorAuthenticationDataStorageKey);
77
78
  return isNullOrUndefined(data) ? undefined : JSON.parse(data);
78
79
  }
79
80
  set impersonatorAuthenticationData(data) {
80
81
  if (isUndefined(data)) {
81
- localStorage.removeItem(impersonatorAuthenticationDataStorageKey);
82
+ localStorage?.removeItem(impersonatorAuthenticationDataStorageKey);
82
83
  }
83
84
  else {
84
85
  const json = JSON.stringify(data);
85
- localStorage.setItem(impersonatorAuthenticationDataStorageKey, json);
86
+ localStorage?.setItem(impersonatorAuthenticationDataStorageKey, json);
86
87
  }
87
88
  }
88
89
  get definedToken() {
@@ -200,18 +201,15 @@ let AuthenticationClientService = class AuthenticationClientService {
200
201
  }
201
202
  saveToken(token) {
202
203
  if (isNullOrUndefined(token)) {
203
- localStorage.removeItem(tokenStorageKey);
204
+ localStorage?.removeItem(tokenStorageKey);
204
205
  }
205
206
  else {
206
207
  const serialized = JSON.stringify(token);
207
- localStorage.setItem(tokenStorageKey, serialized);
208
+ localStorage?.setItem(tokenStorageKey, serialized);
208
209
  }
209
210
  }
210
211
  loadToken() {
211
- if (isUndefined(localStorage)) {
212
- return;
213
- }
214
- const existingSerializedToken = localStorage.getItem(tokenStorageKey);
212
+ const existingSerializedToken = localStorage?.getItem(tokenStorageKey);
215
213
  const token = isString(existingSerializedToken)
216
214
  ? JSON.parse(existingSerializedToken)
217
215
  : undefined;
@@ -1,6 +1,7 @@
1
1
  import { disposeAsync } from '../disposable/disposable.js';
2
2
  import { filterUndefinedFromRecord } from '../utils/object/object.js';
3
3
  import { readableStreamFromPromise } from '../utils/stream/readable-stream-from-promise.js';
4
+ import { toReadableStream } from '../utils/stream/to-readable-stream.js';
4
5
  import { withTimeout } from '../utils/timing.js';
5
6
  import { isDefined, isNull, isObject, isUndefined } from '../utils/type-guards.js';
6
7
  import { millisecondsPerSecond } from '../utils/units.js';
@@ -122,12 +123,7 @@ export class PageController extends DocumentController {
122
123
  renderPdfStream(options = {}) {
123
124
  return readableStreamFromPromise(async () => {
124
125
  const buffer = await this.renderPdf(options);
125
- return new ReadableStream({
126
- pull(controller) {
127
- controller.enqueue(buffer);
128
- controller.close();
129
- }
130
- });
126
+ return toReadableStream(buffer);
131
127
  });
132
128
  }
133
129
  attachLogger(logger) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.91.15",
3
+ "version": "0.91.18",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -85,7 +85,7 @@
85
85
  "./serializer/handlers": "./serializer/handlers/index.js",
86
86
  "./signals": "./signals/index.js",
87
87
  "./signals/implementation": "./signals/implementation/index.js",
88
- "./spawn": "./spawn/index.js",
88
+ "./process": "./process/index.js",
89
89
  "./sse": "./sse/index.js",
90
90
  "./templates": "./templates/index.js",
91
91
  "./templates/providers": "./templates/providers/index.js",
@@ -116,7 +116,7 @@
116
116
  },
117
117
  "devDependencies": {
118
118
  "@mxssfd/typedoc-theme": "1.1",
119
- "@stylistic/eslint-plugin": "2.6",
119
+ "@stylistic/eslint-plugin": "2.8",
120
120
  "@types/chroma-js": "2.4",
121
121
  "@types/koa__router": "12.0",
122
122
  "@types/luxon": "3.4",
@@ -125,10 +125,10 @@
125
125
  "@types/node": "22",
126
126
  "@types/nodemailer": "6.4",
127
127
  "@typescript-eslint/eslint-plugin": "7.17",
128
- "concurrently": "8.2",
128
+ "concurrently": "9.0",
129
129
  "eslint": "8.57",
130
130
  "eslint-import-resolver-typescript": "3.6",
131
- "eslint-plugin-import": "2.29",
131
+ "eslint-plugin-import": "2.30",
132
132
  "tsc-alias": "1.8",
133
133
  "typedoc": "0.26",
134
134
  "typedoc-plugin-missing-exports": "3.0",
@@ -136,7 +136,7 @@
136
136
  },
137
137
  "peerDependencies": {
138
138
  "@elastic/elasticsearch": "^8.15",
139
- "@koa/router": "^13.0",
139
+ "@koa/router": "^13.1",
140
140
  "@tstdl/angular": "^0.91",
141
141
  "@zxcvbn-ts/core": "^3.0",
142
142
  "@zxcvbn-ts/language-common": "^3.0",
@@ -148,11 +148,11 @@
148
148
  "koa": "^2.15",
149
149
  "minio": "^8.0",
150
150
  "mjml": "^4.15",
151
- "mongodb": "^6.8",
151
+ "mongodb": "^6.9",
152
152
  "nodemailer": "^6.9",
153
- "pg": "^8.12",
154
- "playwright": "^1.46",
155
- "preact": "^10.23",
153
+ "pg": "^8.13",
154
+ "playwright": "^1.47",
155
+ "preact": "^10.24",
156
156
  "preact-render-to-string": "^6.5",
157
157
  "undici": "^6.19",
158
158
  "urlpattern-polyfill": "^10.0"