@qp-mongosh/types 0.0.0-dev.0 → 0.0.0-dev.3

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/lib/index.js CHANGED
@@ -1,137 +1,137 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CliUserConfigValidator = exports.CliUserConfig = exports.SnippetShellUserConfigValidator = exports.SnippetShellUserConfig = exports.ShellUserConfigValidator = exports.ShellUserConfig = void 0;
4
- class ShellUserConfig {
5
- constructor() {
6
- this.displayBatchSize = 20;
7
- this.maxTimeMS = null;
8
- this.enableTelemetry = false;
9
- this.editor = null;
10
- }
11
- }
12
- exports.ShellUserConfig = ShellUserConfig;
13
- class ShellUserConfigValidator {
14
- static async validate(key, value) {
15
- switch (key) {
16
- case 'displayBatchSize':
17
- if (typeof value !== 'number' || value <= 0) {
18
- return `${key} must be a positive integer`;
19
- }
20
- return null;
21
- case 'maxTimeMS':
22
- if (value !== null && (typeof value !== 'number' || value <= 0)) {
23
- return `${key} must be null or a positive integer`;
24
- }
25
- return null;
26
- case 'enableTelemetry':
27
- if (typeof value !== 'boolean') {
28
- return `${key} must be a boolean`;
29
- }
30
- return null;
31
- case 'editor':
32
- if (typeof value !== 'string' && value !== null) {
33
- return `${key} must be a string or null`;
34
- }
35
- return null;
36
- default:
37
- return `${key} is not a known config option`;
38
- }
39
- }
40
- }
41
- exports.ShellUserConfigValidator = ShellUserConfigValidator;
42
- class SnippetShellUserConfig extends ShellUserConfig {
43
- constructor() {
44
- super(...arguments);
45
- this.snippetIndexSourceURLs = 'https://compass.mongodb.com/mongosh/snippets-index.bson.br';
46
- this.snippetRegistryURL = 'https://registry.npmjs.org';
47
- this.snippetAutoload = true;
48
- }
49
- }
50
- exports.SnippetShellUserConfig = SnippetShellUserConfig;
51
- class SnippetShellUserConfigValidator extends ShellUserConfigValidator {
52
- static async validate(key, value) {
53
- switch (key) {
54
- case 'snippetIndexSourceURLs':
55
- if (typeof value !== 'string' || value.split(';').some(url => url && !isValidUrl(url))) {
56
- return `${key} must be a ;-separated list of valid URLs`;
57
- }
58
- return null;
59
- case 'snippetRegistryURL':
60
- if (typeof value !== 'string' || !isValidUrl(value)) {
61
- return `${key} must be a valid URL`;
62
- }
63
- return null;
64
- case 'snippetAutoload':
65
- if (typeof value !== 'boolean') {
66
- return `${key} must be a boolean`;
67
- }
68
- return null;
69
- default:
70
- return super.validate(key, value);
71
- }
72
- }
73
- }
74
- exports.SnippetShellUserConfigValidator = SnippetShellUserConfigValidator;
75
- class CliUserConfig extends SnippetShellUserConfig {
76
- constructor() {
77
- super(...arguments);
78
- this.userId = '';
79
- this.telemetryAnonymousId = '';
80
- this.disableGreetingMessage = false;
81
- this.forceDisableTelemetry = false;
82
- this.inspectCompact = 3;
83
- this.inspectDepth = 6;
84
- this.historyLength = 1000;
85
- this.showStackTraces = false;
86
- this.redactHistory = 'remove';
87
- }
88
- }
89
- exports.CliUserConfig = CliUserConfig;
90
- class CliUserConfigValidator extends SnippetShellUserConfigValidator {
91
- static async validate(key, value) {
92
- switch (key) {
93
- case 'userId':
94
- case 'telemetryAnonymousId':
95
- case 'disableGreetingMessage':
96
- return null;
97
- case 'inspectCompact':
98
- if (typeof value !== 'boolean' && (typeof value !== 'number' || value < 0)) {
99
- return `${key} must be a boolean or a positive integer`;
100
- }
101
- return null;
102
- case 'inspectDepth':
103
- case 'historyLength':
104
- if (typeof value !== 'number' || value < 0) {
105
- return `${key} must be a positive integer`;
106
- }
107
- return null;
108
- case 'forceDisableTelemetry':
109
- case 'showStackTraces':
110
- if (typeof value !== 'boolean') {
111
- return `${key} must be a boolean`;
112
- }
113
- return null;
114
- case 'redactHistory':
115
- if (value !== 'keep' && value !== 'remove' && value !== 'remove-redact') {
116
- return `${key} must be one of 'keep', 'remove', or 'remove-redact'`;
117
- }
118
- return null;
119
- default:
120
- return super.validate(key, value);
121
- }
122
- }
123
- }
124
- exports.CliUserConfigValidator = CliUserConfigValidator;
125
- function isValidUrl(url) {
126
- if (typeof URL === 'function') {
127
- try {
128
- new URL(url);
129
- return true;
130
- }
131
- catch (_a) {
132
- return false;
133
- }
134
- }
135
- return true;
136
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CliUserConfigValidator = exports.CliUserConfig = exports.SnippetShellUserConfigValidator = exports.SnippetShellUserConfig = exports.ShellUserConfigValidator = exports.ShellUserConfig = void 0;
4
+ class ShellUserConfig {
5
+ constructor() {
6
+ this.displayBatchSize = 20;
7
+ this.maxTimeMS = null;
8
+ this.enableTelemetry = false;
9
+ this.editor = null;
10
+ }
11
+ }
12
+ exports.ShellUserConfig = ShellUserConfig;
13
+ class ShellUserConfigValidator {
14
+ static async validate(key, value) {
15
+ switch (key) {
16
+ case 'displayBatchSize':
17
+ if (typeof value !== 'number' || value <= 0) {
18
+ return `${key} must be a positive integer`;
19
+ }
20
+ return null;
21
+ case 'maxTimeMS':
22
+ if (value !== null && (typeof value !== 'number' || value <= 0)) {
23
+ return `${key} must be null or a positive integer`;
24
+ }
25
+ return null;
26
+ case 'enableTelemetry':
27
+ if (typeof value !== 'boolean') {
28
+ return `${key} must be a boolean`;
29
+ }
30
+ return null;
31
+ case 'editor':
32
+ if (typeof value !== 'string' && value !== null) {
33
+ return `${key} must be a string or null`;
34
+ }
35
+ return null;
36
+ default:
37
+ return `${key} is not a known config option`;
38
+ }
39
+ }
40
+ }
41
+ exports.ShellUserConfigValidator = ShellUserConfigValidator;
42
+ class SnippetShellUserConfig extends ShellUserConfig {
43
+ constructor() {
44
+ super(...arguments);
45
+ this.snippetIndexSourceURLs = 'https://compass.mongodb.com/mongosh/snippets-index.bson.br';
46
+ this.snippetRegistryURL = 'https://registry.npmjs.org';
47
+ this.snippetAutoload = true;
48
+ }
49
+ }
50
+ exports.SnippetShellUserConfig = SnippetShellUserConfig;
51
+ class SnippetShellUserConfigValidator extends ShellUserConfigValidator {
52
+ static async validate(key, value) {
53
+ switch (key) {
54
+ case 'snippetIndexSourceURLs':
55
+ if (typeof value !== 'string' || value.split(';').some(url => url && !isValidUrl(url))) {
56
+ return `${key} must be a ;-separated list of valid URLs`;
57
+ }
58
+ return null;
59
+ case 'snippetRegistryURL':
60
+ if (typeof value !== 'string' || !isValidUrl(value)) {
61
+ return `${key} must be a valid URL`;
62
+ }
63
+ return null;
64
+ case 'snippetAutoload':
65
+ if (typeof value !== 'boolean') {
66
+ return `${key} must be a boolean`;
67
+ }
68
+ return null;
69
+ default:
70
+ return super.validate(key, value);
71
+ }
72
+ }
73
+ }
74
+ exports.SnippetShellUserConfigValidator = SnippetShellUserConfigValidator;
75
+ class CliUserConfig extends SnippetShellUserConfig {
76
+ constructor() {
77
+ super(...arguments);
78
+ this.userId = '';
79
+ this.telemetryAnonymousId = '';
80
+ this.disableGreetingMessage = false;
81
+ this.forceDisableTelemetry = false;
82
+ this.inspectCompact = 3;
83
+ this.inspectDepth = 6;
84
+ this.historyLength = 1000;
85
+ this.showStackTraces = false;
86
+ this.redactHistory = 'remove';
87
+ }
88
+ }
89
+ exports.CliUserConfig = CliUserConfig;
90
+ class CliUserConfigValidator extends SnippetShellUserConfigValidator {
91
+ static async validate(key, value) {
92
+ switch (key) {
93
+ case 'userId':
94
+ case 'telemetryAnonymousId':
95
+ case 'disableGreetingMessage':
96
+ return null;
97
+ case 'inspectCompact':
98
+ if (typeof value !== 'boolean' && (typeof value !== 'number' || value < 0)) {
99
+ return `${key} must be a boolean or a positive integer`;
100
+ }
101
+ return null;
102
+ case 'inspectDepth':
103
+ case 'historyLength':
104
+ if (typeof value !== 'number' || value < 0) {
105
+ return `${key} must be a positive integer`;
106
+ }
107
+ return null;
108
+ case 'forceDisableTelemetry':
109
+ case 'showStackTraces':
110
+ if (typeof value !== 'boolean') {
111
+ return `${key} must be a boolean`;
112
+ }
113
+ return null;
114
+ case 'redactHistory':
115
+ if (value !== 'keep' && value !== 'remove' && value !== 'remove-redact') {
116
+ return `${key} must be one of 'keep', 'remove', or 'remove-redact'`;
117
+ }
118
+ return null;
119
+ default:
120
+ return super.validate(key, value);
121
+ }
122
+ }
123
+ }
124
+ exports.CliUserConfigValidator = CliUserConfigValidator;
125
+ function isValidUrl(url) {
126
+ if (typeof URL === 'function') {
127
+ try {
128
+ new URL(url);
129
+ return true;
130
+ }
131
+ catch (_a) {
132
+ return false;
133
+ }
134
+ }
135
+ return true;
136
+ }
137
137
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "@qp-mongosh/types",
3
- "version": "0.0.0-dev.0",
4
- "description": "Types for mongosh internals",
5
- "author": "Anna Henningsen <anna.henningsen@mongodb.com>",
6
- "homepage": "https://github.com/mongodb-js/mongosh/tree/main/packages/types#readme",
7
- "license": "Apache-2.0",
8
- "main": "lib/index.js",
9
- "types": "lib/index.d.ts",
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "engines": {
14
- "node": ">=12.4.0"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/mongodb-js/mongosh.git"
19
- },
20
- "scripts": {
21
- "check": "npm run lint",
22
- "compile-ts": "tsc -p tsconfig.json",
23
- "lint": "eslint --report-unused-disable-directives \"./{src,test}/**/*.{js,ts,tsx}\"",
24
- "prepublish": "npm run compile-ts",
25
- "test": "mocha --timeout 15000 -r ts-node/register \"./src/*.spec.ts\"",
26
- "test-ci": "node ../../scripts/run-if-package-requested.js npm test"
27
- },
28
- "bugs": {
29
- "url": "https://github.com/mongodb-js/mongosh/issues"
30
- },
31
- "mongosh": {
32
- "unitTestsOnly": true
33
- },
34
- "dependencies": {
35
- "@mongodb-js/devtools-connect": "^1.2.4",
36
- "qp-mongodb": "0.0.0-dev.1"
37
- }
38
- }
1
+ {
2
+ "name": "@qp-mongosh/types",
3
+ "version": "0.0.0-dev.3",
4
+ "description": "Types for mongosh internals",
5
+ "author": "Anna Henningsen <anna.henningsen@mongodb.com>",
6
+ "homepage": "https://github.com/mongodb-js/mongosh/tree/main/packages/types#readme",
7
+ "license": "Apache-2.0",
8
+ "main": "lib/index.js",
9
+ "types": "lib/index.d.ts",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "engines": {
14
+ "node": ">=12.4.0"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/mongodb-js/mongosh.git"
19
+ },
20
+ "scripts": {
21
+ "check": "npm run lint",
22
+ "compile-ts": "tsc -p tsconfig.json",
23
+ "lint": "eslint --report-unused-disable-directives \"./{src,test}/**/*.{js,ts,tsx}\"",
24
+ "prepublish": "npm run compile-ts",
25
+ "test": "mocha --timeout 15000 -r ts-node/register \"./src/*.spec.ts\"",
26
+ "test-ci": "node ../../scripts/run-if-package-requested.js npm test"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/mongodb-js/mongosh/issues"
30
+ },
31
+ "mongosh": {
32
+ "unitTestsOnly": true
33
+ },
34
+ "dependencies": {
35
+ "@mongodb-js/devtools-connect": "^1.2.4",
36
+ "qp-mongodb": "0.0.0-dev.3"
37
+ }
38
+ }
package/src/index.spec.ts CHANGED
@@ -1,69 +1,69 @@
1
- import { CliUserConfig, CliUserConfigValidator } from './';
2
- import { expect } from 'chai';
3
-
4
- describe('config validation', () => {
5
- it('validates config option values', async() => {
6
- const { validate } = CliUserConfigValidator as any;
7
- expect(await validate('userId', 'foo')).to.equal(null);
8
- expect(await validate('telemetryAnonymousId', 'foo')).to.equal(null);
9
- expect(await validate('disableGreetingMessage', 'foo')).to.equal(null);
10
- expect(await validate('inspectDepth', 'foo')).to.equal('inspectDepth must be a positive integer');
11
- expect(await validate('inspectDepth', -1)).to.equal('inspectDepth must be a positive integer');
12
- expect(await validate('inspectDepth', 0)).to.equal(null);
13
- expect(await validate('inspectDepth', 1)).to.equal(null);
14
- expect(await validate('inspectDepth', Infinity)).to.equal(null);
15
- expect(await validate('historyLength', 'foo')).to.equal('historyLength must be a positive integer');
16
- expect(await validate('historyLength', -1)).to.equal('historyLength must be a positive integer');
17
- expect(await validate('historyLength', 0)).to.equal(null);
18
- expect(await validate('historyLength', 1)).to.equal(null);
19
- expect(await validate('historyLength', Infinity)).to.equal(null);
20
- expect(await validate('showStackTraces', 'foo')).to.equal('showStackTraces must be a boolean');
21
- expect(await validate('showStackTraces', -1)).to.equal('showStackTraces must be a boolean');
22
- expect(await validate('showStackTraces', false)).to.equal(null);
23
- expect(await validate('showStackTraces', true)).to.equal(null);
24
- expect(await validate('redactHistory', 'foo')).to.equal("redactHistory must be one of 'keep', 'remove', or 'remove-redact'");
25
- expect(await validate('redactHistory', -1)).to.equal("redactHistory must be one of 'keep', 'remove', or 'remove-redact'");
26
- expect(await validate('redactHistory', false)).to.equal("redactHistory must be one of 'keep', 'remove', or 'remove-redact'");
27
- expect(await validate('redactHistory', 'keep')).to.equal(null);
28
- expect(await validate('redactHistory', 'remove')).to.equal(null);
29
- expect(await validate('redactHistory', 'remove-redact')).to.equal(null);
30
- expect(await validate('displayBatchSize', 'foo')).to.equal('displayBatchSize must be a positive integer');
31
- expect(await validate('displayBatchSize', -1)).to.equal('displayBatchSize must be a positive integer');
32
- expect(await validate('displayBatchSize', 0)).to.equal('displayBatchSize must be a positive integer');
33
- expect(await validate('displayBatchSize', 1)).to.equal(null);
34
- expect(await validate('displayBatchSize', Infinity)).to.equal(null);
35
- expect(await validate('maxTimeMS', 'foo')).to.equal('maxTimeMS must be null or a positive integer');
36
- expect(await validate('maxTimeMS', -1)).to.equal('maxTimeMS must be null or a positive integer');
37
- expect(await validate('maxTimeMS', 0)).to.equal('maxTimeMS must be null or a positive integer');
38
- expect(await validate('maxTimeMS', 1)).to.equal(null);
39
- expect(await validate('maxTimeMS', null)).to.equal(null);
40
- expect(await validate('enableTelemetry', 'foo')).to.equal('enableTelemetry must be a boolean');
41
- expect(await validate('enableTelemetry', -1)).to.equal('enableTelemetry must be a boolean');
42
- expect(await validate('enableTelemetry', false)).to.equal(null);
43
- expect(await validate('enableTelemetry', true)).to.equal(null);
44
- expect(await validate('inspectCompact', 'foo')).to.equal('inspectCompact must be a boolean or a positive integer');
45
- expect(await validate('inspectCompact', -1)).to.equal('inspectCompact must be a boolean or a positive integer');
46
- expect(await validate('inspectCompact', false)).to.equal(null);
47
- expect(await validate('inspectCompact', true)).to.equal(null);
48
- expect(await validate('inspectCompact', 32)).to.equal(null);
49
- expect(await validate('snippetIndexSourceURLs', 'https://example.com/')).to.equal(null);
50
- expect(await validate('snippetIndexSourceURLs', 'foo')).to.equal('snippetIndexSourceURLs must be a ;-separated list of valid URLs');
51
- expect(await validate('snippetIndexSourceURLs', 'https://xyz/;foo')).to.equal('snippetIndexSourceURLs must be a ;-separated list of valid URLs');
52
- expect(await validate('snippetIndexSourceURLs', ';')).to.equal(null);
53
- expect(await validate('snippetIndexSourceURLs', 0)).to.equal('snippetIndexSourceURLs must be a ;-separated list of valid URLs');
54
- expect(await validate('snippetRegistryURL', ';')).to.equal('snippetRegistryURL must be a valid URL');
55
- expect(await validate('snippetRegistryURL', 'https://registry.npmjs.org')).to.equal(null);
56
- expect(await validate('snippetRegistryURL', 0)).to.equal('snippetRegistryURL must be a valid URL');
57
- expect(await validate('snippetAutoload', 'foo')).to.equal('snippetAutoload must be a boolean');
58
- expect(await validate('snippetAutoload', -1)).to.equal('snippetAutoload must be a boolean');
59
- expect(await validate('snippetAutoload', false)).to.equal(null);
60
- expect(await validate('snippetAutoload', true)).to.equal(null);
61
- });
62
-
63
- it('allows default CliUserConfig values', async() => {
64
- const userConfig = new CliUserConfig();
65
- for (const key of Object.keys(userConfig) as (keyof CliUserConfig)[]) {
66
- expect(await CliUserConfigValidator.validate(key, userConfig[key])).to.equal(null);
67
- }
68
- });
69
- });
1
+ import { CliUserConfig, CliUserConfigValidator } from './';
2
+ import { expect } from 'chai';
3
+
4
+ describe('config validation', () => {
5
+ it('validates config option values', async() => {
6
+ const { validate } = CliUserConfigValidator as any;
7
+ expect(await validate('userId', 'foo')).to.equal(null);
8
+ expect(await validate('telemetryAnonymousId', 'foo')).to.equal(null);
9
+ expect(await validate('disableGreetingMessage', 'foo')).to.equal(null);
10
+ expect(await validate('inspectDepth', 'foo')).to.equal('inspectDepth must be a positive integer');
11
+ expect(await validate('inspectDepth', -1)).to.equal('inspectDepth must be a positive integer');
12
+ expect(await validate('inspectDepth', 0)).to.equal(null);
13
+ expect(await validate('inspectDepth', 1)).to.equal(null);
14
+ expect(await validate('inspectDepth', Infinity)).to.equal(null);
15
+ expect(await validate('historyLength', 'foo')).to.equal('historyLength must be a positive integer');
16
+ expect(await validate('historyLength', -1)).to.equal('historyLength must be a positive integer');
17
+ expect(await validate('historyLength', 0)).to.equal(null);
18
+ expect(await validate('historyLength', 1)).to.equal(null);
19
+ expect(await validate('historyLength', Infinity)).to.equal(null);
20
+ expect(await validate('showStackTraces', 'foo')).to.equal('showStackTraces must be a boolean');
21
+ expect(await validate('showStackTraces', -1)).to.equal('showStackTraces must be a boolean');
22
+ expect(await validate('showStackTraces', false)).to.equal(null);
23
+ expect(await validate('showStackTraces', true)).to.equal(null);
24
+ expect(await validate('redactHistory', 'foo')).to.equal("redactHistory must be one of 'keep', 'remove', or 'remove-redact'");
25
+ expect(await validate('redactHistory', -1)).to.equal("redactHistory must be one of 'keep', 'remove', or 'remove-redact'");
26
+ expect(await validate('redactHistory', false)).to.equal("redactHistory must be one of 'keep', 'remove', or 'remove-redact'");
27
+ expect(await validate('redactHistory', 'keep')).to.equal(null);
28
+ expect(await validate('redactHistory', 'remove')).to.equal(null);
29
+ expect(await validate('redactHistory', 'remove-redact')).to.equal(null);
30
+ expect(await validate('displayBatchSize', 'foo')).to.equal('displayBatchSize must be a positive integer');
31
+ expect(await validate('displayBatchSize', -1)).to.equal('displayBatchSize must be a positive integer');
32
+ expect(await validate('displayBatchSize', 0)).to.equal('displayBatchSize must be a positive integer');
33
+ expect(await validate('displayBatchSize', 1)).to.equal(null);
34
+ expect(await validate('displayBatchSize', Infinity)).to.equal(null);
35
+ expect(await validate('maxTimeMS', 'foo')).to.equal('maxTimeMS must be null or a positive integer');
36
+ expect(await validate('maxTimeMS', -1)).to.equal('maxTimeMS must be null or a positive integer');
37
+ expect(await validate('maxTimeMS', 0)).to.equal('maxTimeMS must be null or a positive integer');
38
+ expect(await validate('maxTimeMS', 1)).to.equal(null);
39
+ expect(await validate('maxTimeMS', null)).to.equal(null);
40
+ expect(await validate('enableTelemetry', 'foo')).to.equal('enableTelemetry must be a boolean');
41
+ expect(await validate('enableTelemetry', -1)).to.equal('enableTelemetry must be a boolean');
42
+ expect(await validate('enableTelemetry', false)).to.equal(null);
43
+ expect(await validate('enableTelemetry', true)).to.equal(null);
44
+ expect(await validate('inspectCompact', 'foo')).to.equal('inspectCompact must be a boolean or a positive integer');
45
+ expect(await validate('inspectCompact', -1)).to.equal('inspectCompact must be a boolean or a positive integer');
46
+ expect(await validate('inspectCompact', false)).to.equal(null);
47
+ expect(await validate('inspectCompact', true)).to.equal(null);
48
+ expect(await validate('inspectCompact', 32)).to.equal(null);
49
+ expect(await validate('snippetIndexSourceURLs', 'https://example.com/')).to.equal(null);
50
+ expect(await validate('snippetIndexSourceURLs', 'foo')).to.equal('snippetIndexSourceURLs must be a ;-separated list of valid URLs');
51
+ expect(await validate('snippetIndexSourceURLs', 'https://xyz/;foo')).to.equal('snippetIndexSourceURLs must be a ;-separated list of valid URLs');
52
+ expect(await validate('snippetIndexSourceURLs', ';')).to.equal(null);
53
+ expect(await validate('snippetIndexSourceURLs', 0)).to.equal('snippetIndexSourceURLs must be a ;-separated list of valid URLs');
54
+ expect(await validate('snippetRegistryURL', ';')).to.equal('snippetRegistryURL must be a valid URL');
55
+ expect(await validate('snippetRegistryURL', 'https://registry.npmjs.org')).to.equal(null);
56
+ expect(await validate('snippetRegistryURL', 0)).to.equal('snippetRegistryURL must be a valid URL');
57
+ expect(await validate('snippetAutoload', 'foo')).to.equal('snippetAutoload must be a boolean');
58
+ expect(await validate('snippetAutoload', -1)).to.equal('snippetAutoload must be a boolean');
59
+ expect(await validate('snippetAutoload', false)).to.equal(null);
60
+ expect(await validate('snippetAutoload', true)).to.equal(null);
61
+ });
62
+
63
+ it('allows default CliUserConfig values', async() => {
64
+ const userConfig = new CliUserConfig();
65
+ for (const key of Object.keys(userConfig) as (keyof CliUserConfig)[]) {
66
+ expect(await CliUserConfigValidator.validate(key, userConfig[key])).to.equal(null);
67
+ }
68
+ });
69
+ });