@playwright-orchestrator/mongo 1.1.1 → 1.1.2
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/dist/create-args.d.ts +4 -1
- package/dist/index.js +5 -2
- package/dist/mongo-db-adapter.js +7 -4
- package/package.json +1 -1
package/dist/create-args.d.ts
CHANGED
|
@@ -4,8 +4,11 @@ export interface CreateArgs {
|
|
|
4
4
|
collectionNamePrefix: string;
|
|
5
5
|
tls?: boolean;
|
|
6
6
|
tlsCA?: string;
|
|
7
|
-
tlsCert?: string;
|
|
8
7
|
tlsKey?: string;
|
|
8
|
+
tlsKeyPassword?: string;
|
|
9
9
|
tlsPassphrase?: string;
|
|
10
|
+
tlsAllowInvalidCertificates?: boolean;
|
|
11
|
+
tlsAllowInvalidHostnames?: boolean;
|
|
12
|
+
tlsInsecure?: boolean;
|
|
10
13
|
debug?: boolean;
|
|
11
14
|
}
|
package/dist/index.js
CHANGED
|
@@ -11,12 +11,15 @@ export function createOptions(command) {
|
|
|
11
11
|
.addOption(new Option('--connection-string <string>', 'Connection string')
|
|
12
12
|
.makeOptionMandatory()
|
|
13
13
|
.env('CONNECTION_STRING'))
|
|
14
|
-
.addOption(new Option('--db <string>', 'Database name').env('DB')
|
|
14
|
+
.addOption(new Option('--db <string>', 'Database name').env('DB'))
|
|
15
15
|
.addOption(new Option('--tls', 'Enable TLS').env('TLS'))
|
|
16
16
|
.addOption(new Option('--tls-ca <string>', 'TLS CA').env('TLS_CA'))
|
|
17
|
-
.addOption(new Option('--tls-
|
|
17
|
+
.addOption(new Option('--tls-key-password <string>', 'TLS key password').env('TLS_KEY_PASSWORD'))
|
|
18
18
|
.addOption(new Option('--tls-key <string>', 'TLS key').env('TLS_KEY'))
|
|
19
19
|
.addOption(new Option('--tls-passphrase <string>', 'TLS passphrase').env('TLS_PASSPHRASE'))
|
|
20
|
+
.addOption(new Option('--tls-allow-invalid-certificates', 'Allow invalid certificates').env('TLS_ALLOW_INVALID_CERTIFICATES'))
|
|
21
|
+
.addOption(new Option('--tls-allow-invalid-hostnames', 'Allow invalid hostnames').env('TLS_ALLOW_INVALID_HOSTNAMES'))
|
|
22
|
+
.addOption(new Option('--tls-insecure', 'Insecure').env('TLS_INSECURE'))
|
|
20
23
|
.addOption(new Option('--debug', 'Add extra fields for some collections').env('DEBUG'));
|
|
21
24
|
}
|
|
22
25
|
export const description = 'MongoDB storage adapter';
|
package/dist/mongo-db-adapter.js
CHANGED
|
@@ -9,14 +9,17 @@ export class MongoDbAdapter extends Adapter {
|
|
|
9
9
|
db;
|
|
10
10
|
client;
|
|
11
11
|
constructor(args) {
|
|
12
|
-
const { connectionString, collectionNamePrefix, db, tls, tlsCA,
|
|
12
|
+
const { connectionString, collectionNamePrefix, db, tls, tlsCA, tlsKey, tlsPassphrase, tlsAllowInvalidCertificates, tlsAllowInvalidHostnames, tlsInsecure, tlsKeyPassword, debug, } = args;
|
|
13
13
|
super();
|
|
14
14
|
this.client = new MongoClient(connectionString, {
|
|
15
15
|
tls,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
tlsCAFile: tlsCA,
|
|
17
|
+
tlsCertificateKeyFile: tlsKey,
|
|
18
|
+
tlsCertificateKeyFilePassword: tlsKeyPassword,
|
|
19
19
|
passphrase: tlsPassphrase,
|
|
20
|
+
tlsAllowInvalidCertificates,
|
|
21
|
+
tlsAllowInvalidHostnames,
|
|
22
|
+
tlsInsecure,
|
|
20
23
|
});
|
|
21
24
|
this.db = this.client.db(db);
|
|
22
25
|
this.runsCollection = `${collectionNamePrefix}_test_runs`;
|