@tstdl/base 0.84.20 → 0.84.21
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.
|
@@ -6,7 +6,6 @@ import { AuthenticationTokenPayloadProvider } from './authentication-token-paylo
|
|
|
6
6
|
import { AuthenticationService, AuthenticationServiceOptions } from './authentication.service.js';
|
|
7
7
|
export type AuthenticationModuleConfig = {
|
|
8
8
|
serviceOptions?: AuthenticationServiceOptions | Provider<AuthenticationServiceOptions>;
|
|
9
|
-
serviceOptionsProvider?: Provider<AuthenticationServiceOptions>;
|
|
10
9
|
credentialsRepository: InjectionToken<AuthenticationCredentialsRepository>;
|
|
11
10
|
sessionRepository: InjectionToken<AuthenticationSessionRepository>;
|
|
12
11
|
/** override default AuthenticationService */
|
|
@@ -30,9 +30,7 @@ var import_authentication_token_payload_provider = require("./authentication-tok
|
|
|
30
30
|
var import_authentication_service = require("./authentication.service.js");
|
|
31
31
|
function configureAuthenticationServer(config) {
|
|
32
32
|
if ((0, import_type_guards.isDefined)(config.serviceOptions)) {
|
|
33
|
-
import_container.container.register(import_authentication_service.AuthenticationServiceOptions, { useValue: config.serviceOptions });
|
|
34
|
-
} else if ((0, import_type_guards.isDefined)(config.serviceOptionsProvider)) {
|
|
35
|
-
import_container.container.register(import_authentication_service.AuthenticationServiceOptions, config.serviceOptionsProvider);
|
|
33
|
+
import_container.container.register(import_authentication_service.AuthenticationServiceOptions, (0, import_container.isProvider)(config.serviceOptions) ? config.serviceOptions : { useValue: config.serviceOptions });
|
|
36
34
|
} else {
|
|
37
35
|
throw new Error("Either serviceOptions or serviceOptionsToken must be provided.");
|
|
38
36
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LaunchOptions } from 'playwright';
|
|
1
2
|
import type { Injectable } from '../container/interfaces.js';
|
|
2
3
|
import { afterResolve, resolveArgumentType } from '../container/interfaces.js';
|
|
3
4
|
import type { AsyncDisposable } from '../disposable/disposable.js';
|
|
@@ -12,6 +13,7 @@ export type BrowserServiceArgument = BrowserServiceOptions;
|
|
|
12
13
|
export type NewBrowserOptions = {
|
|
13
14
|
browser?: 'chromium' | 'firefox' | 'webkit';
|
|
14
15
|
headless?: boolean | 'new';
|
|
16
|
+
proxy?: LaunchOptions['proxy'];
|
|
15
17
|
windowSize?: {
|
|
16
18
|
width: number;
|
|
17
19
|
height: number;
|
|
@@ -85,7 +85,7 @@ let BrowserService = class BrowserService2 {
|
|
|
85
85
|
...launchOptions,
|
|
86
86
|
locale: mergedContextOptions.locale,
|
|
87
87
|
viewport: mergedContextOptions.viewport,
|
|
88
|
-
proxy: mergedContextOptions.proxy,
|
|
88
|
+
proxy: mergedContextOptions.proxy ?? mergedBrowserOptions.proxy,
|
|
89
89
|
userAgent: mergedContextOptions.userAgent,
|
|
90
90
|
colorScheme: mergedContextOptions.colorScheme,
|
|
91
91
|
extraHTTPHeaders: (0, import_type_guards.isDefined)(mergedContextOptions.extraHttpHeaders) ? (0, import_object.filterUndefinedFromRecord)(mergedContextOptions.extraHttpHeaders) : void 0
|
package/browser/utils.js
CHANGED
|
@@ -32,7 +32,8 @@ function getLaunchOptions(options) {
|
|
|
32
32
|
return {
|
|
33
33
|
ignoreDefaultArgs: options.headless == "new" ? ["--headless"] : void 0,
|
|
34
34
|
headless: headless != false,
|
|
35
|
-
args
|
|
35
|
+
args,
|
|
36
|
+
proxy: options.proxy
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
function mergeNewBrowserContextOptions(a, b, c) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.21",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"luxon": "^3.3",
|
|
24
24
|
"reflect-metadata": "^0.1",
|
|
25
25
|
"rxjs": "^7.8",
|
|
26
|
-
"type-fest": "^3.
|
|
26
|
+
"type-fest": "^3.11"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/chroma-js": "2.4",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@typescript-eslint/parser": "5.59",
|
|
38
38
|
"concurrently": "8.0",
|
|
39
39
|
"esbuild": "0.17",
|
|
40
|
-
"eslint": "8.
|
|
40
|
+
"eslint": "8.41",
|
|
41
41
|
"eslint-import-resolver-typescript": "3.5",
|
|
42
42
|
"eslint-plugin-import": "2.27",
|
|
43
43
|
"tsc-alias": "1.8",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"mjml": "^4.14",
|
|
61
61
|
"mongodb": "^5.5",
|
|
62
62
|
"nodemailer": "^6.9",
|
|
63
|
-
"playwright": "^1.
|
|
64
|
-
"preact": "^10.
|
|
63
|
+
"playwright": "^1.34",
|
|
64
|
+
"preact": "^10.15",
|
|
65
65
|
"preact-render-to-string": "^6.0",
|
|
66
66
|
"undici": "^5.22",
|
|
67
67
|
"urlpattern-polyfill": "^8.0"
|