@keymanapp/developer-utils 19.0.19-alpha → 19.0.21-alpha
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/build/src/compiler-interfaces.d.ts +3 -2
- package/build/src/compiler-interfaces.d.ts.map +1 -1
- package/build/src/compiler-interfaces.js +5 -4
- package/build/src/compiler-interfaces.js.map +1 -1
- package/build/src/{common-messages.d.ts → developer-utils-messages.d.ts} +12 -2
- package/build/src/developer-utils-messages.d.ts.map +1 -0
- package/build/src/{common-messages.js → developer-utils-messages.js} +16 -10
- package/build/src/developer-utils-messages.js.map +1 -0
- package/build/src/index.d.ts +2 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +4 -5
- package/build/src/index.js.map +1 -1
- package/build/src/project-loader.d.ts +4 -0
- package/build/src/project-loader.d.ts.map +1 -0
- package/build/src/project-loader.js +34 -0
- package/build/src/project-loader.js.map +1 -0
- package/build/src/types/kps/kps-file-reader.js +4 -4
- package/build/src/types/kps/kps-file-reader.js.map +1 -1
- package/build/src/types/ldml-keyboard/ldml-keyboard-xml-reader.js +11 -11
- package/build/src/types/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -1
- package/build/test/helpers/index.js +5 -5
- package/build/test/helpers/index.js.map +1 -1
- package/build/test/kps/kps-file-reader.tests.js +4 -4
- package/build/test/kps/kps-file-reader.tests.js.map +1 -1
- package/build/test/ldml/ldml-keyboard-xml-reader.tests.js +10 -10
- package/build/test/ldml/ldml-keyboard-xml-reader.tests.js.map +1 -1
- package/build/test/tsconfig.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/build/src/common-messages.d.ts.map +0 -1
- package/build/src/common-messages.js.map +0 -1
- package/build/src/utils/KeymanSentry.d.ts +0 -18
- package/build/src/utils/KeymanSentry.d.ts.map +0 -1
- package/build/src/utils/KeymanSentry.js +0 -95
- package/build/src/utils/KeymanSentry.js.map +0 -1
- package/build/src/utils/options.d.ts +0 -44
- package/build/src/utils/options.d.ts.map +0 -1
- package/build/src/utils/options.js +0 -59
- package/build/src/utils/options.js.map +0 -1
package/package.json
CHANGED
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"/build/"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@keymanapp/common-types": "19.0.
|
|
13
|
-
"@sentry/node": "^7.57.0",
|
|
12
|
+
"@keymanapp/common-types": "19.0.21-alpha",
|
|
14
13
|
"eventemitter3": "^5.0.0",
|
|
15
14
|
"fast-xml-parser": "^5.0.9",
|
|
16
15
|
"path-browserify": "^1.0.1",
|
|
@@ -47,5 +46,5 @@
|
|
|
47
46
|
"type": "git",
|
|
48
47
|
"url": "git+https://github.com/keymanapp/keyman.git"
|
|
49
48
|
},
|
|
50
|
-
"version": "19.0.
|
|
49
|
+
"version": "19.0.21-alpha"
|
|
51
50
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-messages.d.ts","sourceRoot":"","sources":["../../src/common-messages.ts"],"names":[],"mappings":"AAaA,qBAAa,mBAAmB;IAE9B,MAAM,CAAC,2BAA2B,SAAqB;IACvD,MAAM,CAAC,2BAA2B,MAAM;QAAC,YAAY,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,sDACK;IAEnH,MAAM,CAAC,uBAAuB,SAAqB;IACnD,MAAM,CAAC,uBAAuB,MAAO;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,sDAEmD;IAEtI,MAAM,CAAC,uBAAuB,SAAqB;IACnD,MAAM,CAAC,uBAAuB,MAAO;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,sD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EAAE,EAAE,CAAC,CAAC;IAEtF,MAAM,CAAC,wBAAwB,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,MAAM,CAAC,wBAAwB,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAChD,IAAI,CAAC,wBAAwB,EAC7B,mCAAmC,CAAC,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,QAAQ,EAAE,EAAE,CACzE,CAAC;;AACH,CAAC","debug_id":"7e7adecd-04cb-5435-8625-11c3e48ddcb5"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Sentry from "@sentry/node";
|
|
2
|
-
export type SentryNodeOptions = Sentry.NodeOptions;
|
|
3
|
-
export declare class KeymanSentry {
|
|
4
|
-
static isEnabled(): boolean;
|
|
5
|
-
static init(options?: SentryNodeOptions): void;
|
|
6
|
-
private static writeSentryMessage;
|
|
7
|
-
static reportException(e: any, silent?: boolean): Promise<string>;
|
|
8
|
-
static captureMessage(message: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* capture an exception for Sentry; note that in local environments, this will normally
|
|
11
|
-
* throw the exception rather than sending to Sentry
|
|
12
|
-
* @param e
|
|
13
|
-
* @param force if true, reports to Sentry even in local environments
|
|
14
|
-
*/
|
|
15
|
-
static captureException(e: any, force?: boolean): Promise<never>;
|
|
16
|
-
static close(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=KeymanSentry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeymanSentry.d.ts","sourceRoot":"","sources":["../../../src/utils/KeymanSentry.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAIlC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAAC;AAUnD,qBAAa,YAAY;IAEvB,MAAM,CAAC,SAAS;IAWhB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB;IAWvC,OAAO,CAAC,MAAM,CAAC,kBAAkB;WASpB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAE,OAAc;IAW3D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM;IAQrC;;;;;OAKG;WACU,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;WAqBzD,KAAK;CASnB"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8afaa85c-5b8b-5de3-86e1-cc3aa95e030a")}catch(e){}}();
|
|
3
|
-
import Sentry from "@sentry/node";
|
|
4
|
-
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
|
5
|
-
import { getOption } from "./options.js";
|
|
6
|
-
/**
|
|
7
|
-
* Maximum delay on shutdown of process to send pending events
|
|
8
|
-
* to Sentry, in msec
|
|
9
|
-
*/
|
|
10
|
-
const CLOSE_TIMEOUT = 2000;
|
|
11
|
-
let isInit = false;
|
|
12
|
-
export class KeymanSentry {
|
|
13
|
-
static isEnabled() {
|
|
14
|
-
if (process.argv.includes('--no-error-reporting')) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (process.argv.includes('--error-reporting')) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
return getOption('automatically report errors', true);
|
|
21
|
-
}
|
|
22
|
-
static init(options) {
|
|
23
|
-
options = options ?? {};
|
|
24
|
-
Sentry.init({
|
|
25
|
-
...options,
|
|
26
|
-
dsn: 'https://39b25a09410349a58fe12aaf721565af@o1005580.ingest.sentry.io/5983519', // Keyman Developer
|
|
27
|
-
environment: KEYMAN_VERSION.VERSION_ENVIRONMENT,
|
|
28
|
-
release: KEYMAN_VERSION.VERSION_GIT_TAG,
|
|
29
|
-
});
|
|
30
|
-
isInit = true;
|
|
31
|
-
}
|
|
32
|
-
static writeSentryMessage(eventId) {
|
|
33
|
-
process.stderr.write(`
|
|
34
|
-
This error has been automatically reported to the Keyman team.
|
|
35
|
-
Identifier: ${eventId}
|
|
36
|
-
Application: Keyman Developer
|
|
37
|
-
Reported at: https://sentry.io/organizations/keyman/projects/keyman-developer/events/${eventId}/
|
|
38
|
-
`);
|
|
39
|
-
}
|
|
40
|
-
static async reportException(e, silent = true) {
|
|
41
|
-
if (isInit) {
|
|
42
|
-
const eventId = await Sentry.captureException(e);
|
|
43
|
-
if (!silent) {
|
|
44
|
-
this.writeSentryMessage(eventId);
|
|
45
|
-
}
|
|
46
|
-
return eventId;
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
static captureMessage(message) {
|
|
51
|
-
if (isInit) {
|
|
52
|
-
return Sentry.captureMessage(message);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* capture an exception for Sentry; note that in local environments, this will normally
|
|
60
|
-
* throw the exception rather than sending to Sentry
|
|
61
|
-
* @param e
|
|
62
|
-
* @param force if true, reports to Sentry even in local environments
|
|
63
|
-
*/
|
|
64
|
-
static async captureException(e, force) {
|
|
65
|
-
if (isInit) {
|
|
66
|
-
// For local development, we don't want to bury the trace; we need the cast to avoid
|
|
67
|
-
// TS2367 (comparison appears to be unintentional)
|
|
68
|
-
if (!force && KEYMAN_VERSION.VERSION_ENVIRONMENT == 'local') {
|
|
69
|
-
throw e;
|
|
70
|
-
}
|
|
71
|
-
const eventId = Sentry.captureException(e);
|
|
72
|
-
process.stderr.write(`
|
|
73
|
-
Fatal error: ${(e ?? '').toString()}
|
|
74
|
-
`);
|
|
75
|
-
this.writeSentryMessage(eventId);
|
|
76
|
-
await this.close();
|
|
77
|
-
process.exit(1);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
throw e;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
static async close() {
|
|
84
|
-
if (isInit) {
|
|
85
|
-
try {
|
|
86
|
-
await Sentry.close(CLOSE_TIMEOUT);
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
// ignore any errors here
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=KeymanSentry.js.map
|
|
95
|
-
//# debugId=8afaa85c-5b8b-5de3-86e1-cc3aa95e030a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeymanSentry.js","sources":["../../../src/utils/KeymanSentry.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC;;;GAGG;AACH,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,MAAM,OAAO,YAAY;IAEvB,MAAM,CAAC,SAAS;QACd,IAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;YACjD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,SAAS,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,OAA2B;QACrC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC;YACV,GAAG,OAAO;YACV,GAAG,EAAE,4EAA4E,EAAG,mBAAmB;YACvG,WAAW,EAAE,cAAc,CAAC,mBAAmB;YAC/C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AC;YACjC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YAEnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAK;QAChB,IAAG,MAAM,EAAE,CAAC;YACV,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YACpC,CAAC;YAAC,OAAM,CAAC,EAAE,CAAC;gBACV,yBAAyB;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;CACF","debug_id":"8afaa85c-5b8b-5de3-86e1-cc3aa95e030a"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export interface KeymanDeveloperOptions {
|
|
2
|
-
"use tab char"?: boolean;
|
|
3
|
-
"link font sizes"?: boolean;
|
|
4
|
-
"indent size"?: number;
|
|
5
|
-
"use old debugger"?: boolean;
|
|
6
|
-
"editor theme"?: string;
|
|
7
|
-
"debugger break when exiting line"?: boolean;
|
|
8
|
-
"debugger single step after break"?: boolean;
|
|
9
|
-
"debugger show store offset"?: boolean;
|
|
10
|
-
"debugger recompile with debug info"?: boolean;
|
|
11
|
-
"debugger auto reset before compilng"?: boolean;
|
|
12
|
-
"auto save before compiling"?: boolean;
|
|
13
|
-
"osk auto save before importing"?: boolean;
|
|
14
|
-
"web host port"?: number;
|
|
15
|
-
"server keep alive"?: boolean;
|
|
16
|
-
"server use local addresses"?: boolean;
|
|
17
|
-
"server ngrok token"?: string;
|
|
18
|
-
"server ngrok region"?: string;
|
|
19
|
-
"server use ngrok"?: boolean;
|
|
20
|
-
"server show console window"?: boolean;
|
|
21
|
-
"char map disable database lookups"?: boolean;
|
|
22
|
-
"char map auto lookup"?: boolean;
|
|
23
|
-
"open keyboard files in source view"?: boolean;
|
|
24
|
-
"display theme"?: string;
|
|
25
|
-
"external editor path"?: string;
|
|
26
|
-
"smtp server"?: string;
|
|
27
|
-
"test email addresses"?: string;
|
|
28
|
-
"web ladder length"?: number;
|
|
29
|
-
"default project path"?: string;
|
|
30
|
-
"automatically report errors"?: boolean;
|
|
31
|
-
"automatically report usage"?: boolean;
|
|
32
|
-
"toolbar visible"?: boolean;
|
|
33
|
-
"active project"?: string;
|
|
34
|
-
"prompt to upgrade projects"?: boolean;
|
|
35
|
-
}
|
|
36
|
-
type KeymanDeveloperOption = keyof KeymanDeveloperOptions;
|
|
37
|
-
export declare function loadOptions(): Promise<KeymanDeveloperOptions>;
|
|
38
|
-
export declare function getOption<T extends KeymanDeveloperOption>(valueName: T, defaultValue: KeymanDeveloperOptions[T]): KeymanDeveloperOptions[T];
|
|
39
|
-
/**
|
|
40
|
-
* unit tests will clear options before running, for consistency
|
|
41
|
-
*/
|
|
42
|
-
export declare function clearOptions(): void;
|
|
43
|
-
export {};
|
|
44
|
-
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/utils/options.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,sBAAsB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oCAAoC,CAAC,EAAE,OAAO,CAAC;IAC/C,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,oCAAoC,CAAC,EAAE,OAAO,CAAC;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,KAAK,qBAAqB,GAAG,MAAM,sBAAsB,CAAC;AAS1D,wBAAsB,WAAW,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAiCnE;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,qBAAqB,EAAE,SAAS,EAAE,CAAC,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAE3I;AAED;;GAEG;AACH,wBAAgB,YAAY,SAG3B"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="81a18df7-3e5e-51d2-940f-fc01518ccf02")}catch(e){}}();
|
|
3
|
-
import * as os from 'node:os';
|
|
4
|
-
import * as fs from 'node:fs';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
|
-
;
|
|
7
|
-
// Default has no options set, and unit tests will use the defaults (won't call
|
|
8
|
-
// `loadOptions()`)
|
|
9
|
-
let options = {};
|
|
10
|
-
// We only load the options from disk once on first use
|
|
11
|
-
let optionsLoaded = false;
|
|
12
|
-
export async function loadOptions() {
|
|
13
|
-
if (optionsLoaded) {
|
|
14
|
-
return options;
|
|
15
|
-
}
|
|
16
|
-
options = {};
|
|
17
|
-
try {
|
|
18
|
-
const optionsFile = path.join(os.homedir(), '.keymandeveloper', 'options.json');
|
|
19
|
-
if (fs.existsSync(optionsFile)) {
|
|
20
|
-
for (let i = 0; i < 5; i++) {
|
|
21
|
-
try {
|
|
22
|
-
const data = JSON.parse(fs.readFileSync(optionsFile, 'utf-8'));
|
|
23
|
-
if (typeof data == 'object') {
|
|
24
|
-
options = data;
|
|
25
|
-
}
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
catch (e) {
|
|
29
|
-
if (e?.code == 'EBUSY') {
|
|
30
|
-
await new Promise(resolve => setTimeout(resolve, 500));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
// give up, nothing to report here
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (e) {
|
|
41
|
-
// Nothing to report here, sadly -- because we cannot rely on Sentry at this
|
|
42
|
-
// low level.
|
|
43
|
-
options = {};
|
|
44
|
-
}
|
|
45
|
-
optionsLoaded = true;
|
|
46
|
-
return options;
|
|
47
|
-
}
|
|
48
|
-
export function getOption(valueName, defaultValue) {
|
|
49
|
-
return options[valueName] ?? defaultValue;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* unit tests will clear options before running, for consistency
|
|
53
|
-
*/
|
|
54
|
-
export function clearOptions() {
|
|
55
|
-
options = {};
|
|
56
|
-
optionsLoaded = true;
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=options.js.map
|
|
59
|
-
//# debugId=81a18df7-3e5e-51d2-940f-fc01518ccf02
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sources":["../../../src/utils/options.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAoCjC,CAAC;AAIF,+EAA+E;AAC/E,mBAAmB;AACnB,IAAI,OAAO,GAA2B,EAAE,CAAC;AAEzC,uDAAuD;AACvD,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,IAAG,aAAa,EAAE,CAAC;QACjB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,GAAG,EAAE,CAAC;IACb,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;QAChF,IAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC9B,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC1B,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;oBAC/D,IAAG,OAAO,IAAI,IAAI,QAAQ,EAAE,CAAC;wBAC3B,OAAO,GAAG,IAAI,CAAC;oBACjB,CAAC;oBACD,MAAM;gBACR,CAAC;gBAAC,OAAM,CAAC,EAAE,CAAC;oBACV,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