@equinor/fusion-imports 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Equinor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # Fusion Imports
2
+
3
+ This package provides utility functions for handling imports.
4
+
5
+ > [!important]
6
+ > This module is meant for usage of __file__ content, not __url__
7
+
8
+ ## Usage
9
+
10
+ This module is primary for loading configuration from scripts runtime.
11
+
12
+ ### importConfig
13
+
14
+ `importConfig` will resolve the provided basename by looking for `TypeScript`, then `JavaScript` and then `json`. Internally it will call [importScript](#importscript) and [importJSON](#importjson)
15
+
16
+ ```ts
17
+ import { importConfig } from '@equinor/fusion-imports';
18
+
19
+ type MyConfig {
20
+ name: string;
21
+ bar: {
22
+ foobar: number;
23
+ }
24
+ };
25
+
26
+ type ScriptModule = {
27
+ generateConfig: (options: any) => MyConfig;
28
+ }
29
+
30
+ const config = importConfig('my-config', {
31
+ script: {
32
+ resolve: (module: ScriptModule) => {
33
+ return module.generateConfig(someOptions);
34
+ }
35
+ }
36
+ });
37
+ ```
38
+
39
+ __example file: `./my-config.ts`__
40
+ ```ts
41
+ import { base } from './baseConfig.ts'
42
+
43
+ export function generateConfig(options: any): MyConfig {
44
+ return {
45
+ name: 'foo'
46
+ ...base(options)
47
+ }
48
+ }
49
+ ```
50
+
51
+ #### resolve
52
+
53
+ `importConfig` will try to resolve `module.default` as default
54
+
55
+ ```ts
56
+ // my-script.ts
57
+ const config = importConfig<number>('my-config');
58
+
59
+ // my-config.ts
60
+ export default 1;
61
+ ```
62
+
63
+ ### importScript
64
+
65
+ Method for loading a script module. This function will use `EsBuild` under the hood, which is useful for loading external script within runtime of other script since it will transpile within the context of the target script.
66
+
67
+ #### EsBuild
68
+
69
+ `ImportScriptOptions` is a restricted set of `EsBuild.BuildOptions` which means that you could provide options for compiling the import content.
70
+
71
+ **plugins**
72
+
73
+ our implementation does not use any plugins, but working with mono-repos you most likely need to add plugins like:
74
+ - [esbuild-plugin-alias](https://www.npmjs.com/package/esbuild-plugin-alias)
75
+ - [esbuild-plugin-tsc](https://www.npmjs.com/package/esbuild-plugin-tsc)
76
+ - [...more](https://github.com/esbuild/community-plugins)
77
+
78
+
79
+ ### importJSON
80
+
81
+ Method for loading json from disk. Will read content and parse.
@@ -0,0 +1,48 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import path from 'node:path';
11
+ import { importScript } from './import-script';
12
+ import { importJSON } from './import-json';
13
+ import { resolveConfigFile } from './resolve-config-file';
14
+ /**
15
+ * Imports a configuration file based on the provided basename and options.
16
+ *
17
+ * @template C - The type of the configuration content.
18
+ * @template M - The type of the ES module, defaults to `EsmModule`.
19
+ *
20
+ * @param {string} basename - The base name of the configuration file to import.
21
+ * @param {ImportConfigOptions<C, M>} [options={}] - Optional parameters for importing the configuration.
22
+ * @param {string} [options.baseDir] - The base directory to resolve the configuration file from.
23
+ * @param {string[]} [options.extensions] - The list of file extensions to consider when resolving the configuration file.
24
+ * @param {object} [options.script] - Additional script options for importing non-JSON files.
25
+ *
26
+ * @returns {Promise<C>} A promise that resolves to the imported configuration content.
27
+ *
28
+ * @throws Will throw an error if the configuration file cannot be resolved or imported.
29
+ */
30
+ export function importConfig(basename_1) {
31
+ return __awaiter(this, arguments, void 0, function* (basename, options = {}) {
32
+ var _a;
33
+ const { baseDir, extensions, script } = options;
34
+ const filePath = yield resolveConfigFile(basename, { baseDir, extensions });
35
+ const fileExtension = path.extname(filePath);
36
+ switch (fileExtension) {
37
+ case '.json':
38
+ return importJSON(filePath);
39
+ default: {
40
+ const resolve = (_a = script === null || script === void 0 ? void 0 : script.resolve) !== null && _a !== void 0 ? _a : ((module) => module.default);
41
+ const module = yield importScript(filePath, script === null || script === void 0 ? void 0 : script.esBuildOptions);
42
+ return resolve(module);
43
+ }
44
+ }
45
+ });
46
+ }
47
+ export default importConfig;
48
+ //# sourceMappingURL=import-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-config.js","sourceRoot":"","sources":["../../src/import-config.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAA4C,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AA4B1D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAgB,YAAY;yDAChC,QAAgB,EAChB,UAAqC,EAAE;;QAEvC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAChD,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QAC5E,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE7C,QAAQ,aAAa,EAAE,CAAC;YACtB,KAAK,OAAO;gBACV,OAAO,UAAU,CAAI,QAAQ,CAAC,CAAC;YACjC,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,OAAO,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,CAAC,CAAC,MAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAY,CAAC,CAAC;gBACxE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAI,QAAQ,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,cAAc,CAAC,CAAC;gBACvE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { readFile } from 'node:fs/promises';
11
+ /**
12
+ * Asynchronously imports and parses a JSON file.
13
+ *
14
+ * @template T - The expected type of the parsed JSON content. It can be a record, string, or number.
15
+ * @param {string} filePath - The path to the JSON file to be imported.
16
+ * @returns {Promise<T>} A promise that resolves to the parsed JSON content.
17
+ * @throws {Error} If the file cannot be read or the content is not valid JSON.
18
+ */
19
+ export const importJSON = (filePath_1, ...args_1) => __awaiter(void 0, [filePath_1, ...args_1], void 0, function* (filePath, encoding = 'utf-8') {
20
+ try {
21
+ const content = yield readFile(filePath, encoding);
22
+ return JSON.parse(content);
23
+ }
24
+ catch (error) {
25
+ throw new Error(`Failed to parse JSON from file: '${filePath}'`, { cause: error });
26
+ }
27
+ });
28
+ export default importJSON;
29
+ //# sourceMappingURL=import-json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-json.js","sourceRoot":"","sources":["../../src/import-json.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,wBAGZ,EAAE,+DAFd,QAAgB,EAChB,WAA2B,OAAO;IAElC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACrF,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,70 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { build } from 'esbuild';
11
+ import { access } from 'node:fs/promises';
12
+ import path from 'node:path';
13
+ /**
14
+ * Asynchronously imports a script file using esbuild to bundle it.
15
+ *
16
+ * @template M - The type of the module to be imported.
17
+ * @param {string} entryPoint - The path to the script file to be imported.
18
+ * @param {ImportScriptOptions} [options] - Optional build options to customize the bundling process.
19
+ * @returns {Promise<M>} A promise that resolves to the imported module.
20
+ * @throws {Error} Throws an error if the bundling process fails or no output files are generated.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * import { importScript } from './import-script';
25
+ *
26
+ * (async () => {
27
+ * const myModule = await importScript<MyModuleType>('./path/to/my-module.ts');
28
+ * // Use myModule here
29
+ * })();
30
+ * ```
31
+ */
32
+ export const importScript = (entryPoint, options) => __awaiter(void 0, void 0, void 0, function* () {
33
+ var _a;
34
+ const sourceFile = path.resolve(entryPoint);
35
+ try {
36
+ yield access(sourceFile);
37
+ }
38
+ catch (error) {
39
+ throw new Error(`The file '${entryPoint}' does not exist or cannot be accessed`, {
40
+ cause: error,
41
+ });
42
+ }
43
+ try {
44
+ const buildOptions = Object.assign({
45
+ // default options
46
+ platform: 'node',
47
+ }, options, // provided options
48
+ {
49
+ // non-overridable options
50
+ entryPoints: [sourceFile],
51
+ write: false,
52
+ bundle: true,
53
+ format: 'esm',
54
+ });
55
+ const result = yield build(buildOptions);
56
+ // Ensure that at least one output file was generated
57
+ const [output] = (_a = result.outputFiles) !== null && _a !== void 0 ? _a : [];
58
+ if (!output) {
59
+ throw new Error(`No output files generated for '${entryPoint}'`);
60
+ }
61
+ // Create a data URL from the bundled script
62
+ const dataUrl = `data:text/javascript;base64,${Buffer.from(output.text).toString('base64')}`;
63
+ return import(dataUrl);
64
+ }
65
+ catch (error) {
66
+ throw new Error(`Failed to bundle '${entryPoint}' with esbuild. Check for syntax errors or unresolved imports.`, { cause: error });
67
+ }
68
+ });
69
+ export default importScript;
70
+ //# sourceMappingURL=import-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-script.js","sourceRoot":"","sources":["../../src/import-script.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAwB7B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,UAAkB,EAClB,OAA6B,EACjB,EAAE;;IACd,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,aAAa,UAAU,wCAAwC,EAAE;YAC/E,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAChC;YACE,kBAAkB;YAClB,QAAQ,EAAE,MAAM;SACjB,EACD,OAAO,EAAE,mBAAmB;QAC5B;YACE,0BAA0B;YAC1B,WAAW,EAAE,CAAC,UAAU,CAAC;YACzB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd,CACc,CAAC;QAElB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC;QAEzC,qDAAqD;QACrD,MAAM,CAAC,MAAM,CAAC,GAAG,MAAA,MAAM,CAAC,WAAW,mCAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,kCAAkC,UAAU,GAAG,CAAC,CAAC;QACnE,CAAC;QAED,4CAA4C;QAC5C,MAAM,OAAO,GAAG,+BAA+B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAE7F,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,qBAAqB,UAAU,gEAAgE,EAC/F,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { importScript } from './import-script';
2
+ export { importJSON } from './import-json';
3
+ export { default, importConfig } from './import-config';
4
+ export { resolveConfigFile } from './resolve-config-file';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAsB,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,42 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { access } from 'node:fs/promises';
11
+ import { resolve } from 'node:path';
12
+ const defaultExtensions = ['.ts', '.mjs', '.js', '.json'];
13
+ /**
14
+ * Resolves the configuration file path based on the provided base name and options.
15
+ *
16
+ * @param baseName - The base name of the configuration file (without extension).
17
+ * @param options - An object containing optional parameters:
18
+ * @returns A promise that resolves to the path of the found configuration file.
19
+ * @throws Will throw an error if the base name is not a non-empty string.
20
+ * @throws Will throw an error if no configuration file is found with the given base name and extensions.
21
+ */
22
+ export function resolveConfigFile(baseName_1) {
23
+ return __awaiter(this, arguments, void 0, function* (baseName, options = {}) {
24
+ if (!baseName || typeof baseName !== 'string') {
25
+ throw new Error('baseName must be a non-empty string');
26
+ }
27
+ const { baseDir = process.cwd(), extensions = defaultExtensions } = options;
28
+ for (const ext of extensions) {
29
+ const filePath = resolve(baseDir, `${baseName}${ext}`);
30
+ try {
31
+ yield access(filePath);
32
+ return filePath;
33
+ }
34
+ catch (_a) {
35
+ // Continue to the next extension
36
+ }
37
+ }
38
+ throw new Error(`No configuration file found for basename '${baseName}'`);
39
+ });
40
+ }
41
+ export default resolveConfigFile;
42
+ //# sourceMappingURL=resolve-config-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-config-file.js","sourceRoot":"","sources":["../../src/resolve-config-file.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAa1D;;;;;;;;GAQG;AACH,MAAM,UAAgB,iBAAiB;yDACrC,QAAgB,EAChB,UAAoC,EAAE;QAEtC,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QAED,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,GAAG,iBAAiB,EAAE,GAAG,OAAO,CAAC;QAE5E,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,QAAQ,GAAG,GAAG,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACvB,OAAO,QAAQ,CAAC;YAClB,CAAC;YAAC,WAAM,CAAC;gBACP,iCAAiC;YACnC,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,GAAG,CAAC,CAAC;IAC5E,CAAC;CAAA;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ // Generated by genversion.
2
+ export const version = '1.0.0';
3
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/.pnpm/esbuild@0.25.1/node_modules/esbuild/lib/main.d.ts","../src/import-script.ts","../src/import-json.ts","../src/resolve-config-file.ts","../src/import-config.ts","../src/index.ts","../src/version.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/assert.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/header.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/readable.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/file.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/fetch.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/formdata.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/connector.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/client.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/errors.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/global-origin.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/pool.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/handlers.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/agent.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-client.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/api.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/cookies.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/patch.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/filereader.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/websocket.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/content-type.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/cache.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/interceptors.d.ts","../../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/index.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/globals.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/buffer.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/child_process.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/cluster.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/console.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/constants.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/crypto.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/dgram.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/dns.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/domain.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/dom-events.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/events.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/fs.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/http.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/http2.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/https.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/inspector.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/module.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/net.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/os.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/path.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/process.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/punycode.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/querystring.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/readline.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/repl.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/sea.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/stream.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/stream/web.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/test.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/timers.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/tls.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/trace_events.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/tty.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/url.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/util.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/v8.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/vm.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/wasi.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/zlib.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/globals.global.d.ts","../../../../node_modules/.pnpm/@types+node@20.14.12/node_modules/@types/node/index.d.ts"],"fileIdsList":[[88],[124],[125,130,159],[126,131,137,138,145,156,167],[126,127,137,145],[128,168],[129,130,138,146],[130,156,164],[131,133,137,145],[124,132],[133,134],[137],[135,137],[124,137],[137,138,139,156,167],[137,138,139,152,156,159],[122,125,172],[133,137,140,145,156,167],[137,138,140,141,145,156,164,167],[140,142,156,164,167],[88,89,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174],[137,143],[144,167,172],[133,137,145,156],[146],[147],[124,148],[145,146,149,166,172],[150],[151],[137,152,153],[152,154,168,170],[125,137,156,157,158,159],[125,156,158],[156,157],[159],[160],[124,156],[137,162,163],[162,163],[130,145,156,164],[165],[145,166],[125,140,151,167],[130,168],[156,169],[144,170],[171],[125,130,137,139,148,156,167,170,172],[156,173],[99,103,167],[99,156,167],[94],[96,99,164,167],[145,164],[175],[94,175],[96,99,145,167],[91,92,95,98,125,137,156,167],[91,97],[95,99,125,159,167,175],[125,175],[115,125,175],[93,94,175],[99],[93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,116,117,118,119,120,121],[99,106,107],[97,99,107,108],[98],[91,94,99],[99,103,107,108],[103],[97,99,102,167],[91,96,97,99,103,106],[125,156],[94,99,115,125,172,175],[82,83,84,147],[139],[81,139,147],[82,83,84,85],[139,147]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8caba62c0d2ef625f31cbb4fde09d851251af2551086ccf068611b0a69efd81","affectsGlobalScope":true,"impliedFormat":1},{"version":"1e473bb4b589174674bd4f3155b3c5bbb9ea700d53968522e76ce221bff4904e","signature":"0bf3a8e02d394a753b72859971844d3d0c0525d33af84e126b16f12aabadaee7"},{"version":"f9b5ef78a4606908ba98a21bc8300f331271b0852f281fc38b74112dba7f1dad","signature":"5dec9818f4c564f8d528a7b075898e1b1786965b160510d18eaa31f7d8d92c47"},{"version":"b0a96028f9fe2bbad1e404c628c529e0995be8b7c9eefac50e9d320101c1ddac","signature":"5406e8677ca90ace32bc6a8fc959048cb08928bcf7ceb21af5c339df08d7c925"},{"version":"2135a9002741df831f7ab1b48cac3104819574bb203a8ce5617ffbdcc1f2cd55","signature":"56c0137badf9ac5edda04951bc1fcbd4e171b584db913500a048894d5010fd47"},"ddb3eb1925f6d2d45fa16c3c5cbae5882eb2e31aa6d74c69a0daf3b7525eb61f",{"version":"b2bf8da7821c19d30de374ed53447e85299c04019c35df7417bb994cab6d9990","signature":"64c8aebca6fbdba9e0aa77bc7c40f2047b4c08a24b8685029d997fb83ab4c8c8"},{"version":"2db0dd3aaa2ed285950273ce96ae8a450b45423aa9da2d10e194570f1233fa6b","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","impliedFormat":1},{"version":"3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","impliedFormat":1},{"version":"e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","impliedFormat":1},{"version":"471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","impliedFormat":1},{"version":"c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","impliedFormat":1},{"version":"40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","impliedFormat":1},{"version":"8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","impliedFormat":1},{"version":"4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1","impliedFormat":1},{"version":"e7be367719c613d580d4b27fdf8fe64c9736f48217f4b322c0d63b2971460918","affectsGlobalScope":true,"impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"dd78bfe9dfcadb2c4cd3a3a36df38fb3ef8ed2c601b57f6ad9a29e38a17ff39c","affectsGlobalScope":true,"impliedFormat":1},{"version":"62f1c00d3d246e0e3cf0224f91e122d560428ec1ccc36bb51d4574a84f1dbad0","impliedFormat":1},{"version":"53f0960fdcc53d097918adfd8861ffbe0db989c56ffc16c052197bf115da5ed6","impliedFormat":1},{"version":"662163e5327f260b23ca0a1a1ad8a74078aabb587c904fcb5ef518986987eaff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"f85c06e750743acf31f0cfd3be284a364d469761649e29547d0dd6be48875150","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0c0d1d13be149f790a75b381b413490f98558649428bb916fd2d71a3f47a134","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"0364f8bb461d6e84252412d4e5590feda4eb582f77d47f7a024a7a9ff105dfdc","impliedFormat":1},{"version":"5433f7f77cd1fd53f45bd82445a4e437b2f6a72a32070e907530a4fea56c30c8","impliedFormat":1},{"version":"d0ca5d7df114035258a9d01165be309371fcccf0cccd9d57b1453204686d1ed0","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"9a30b7fefd7f8abbca4828d481c61c18e40fe5ff107e113b1c1fcd2c8dcf2743","affectsGlobalScope":true,"impliedFormat":1},{"version":"173b6275a81ebdb283b180654890f46516c21199734fed01a773b1c168b8c45c","impliedFormat":1},{"version":"304f66274aa8119e8d65a49b1cff84cbf803def6afe1b2cc987386e9a9890e22","impliedFormat":1},{"version":"1b9adafe8a7fefaeaf9099a0e06f602903f6268438147b843a33a5233ac71745","impliedFormat":1},{"version":"98273274f2dbb79b0b2009b20f74eca4a7146a3447c912d580cd5d2d94a7ae30","impliedFormat":1},{"version":"c933f7ba4b201c98b14275fd11a14abb950178afd2074703250fe3654fc10cd2","impliedFormat":1},{"version":"2eaa31492906bc8525aff3c3ec2236e22d90b0dfeee77089f196cd0adf0b3e3b","impliedFormat":1},{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f5814f29dbaf8bacd1764aebdf1c8a6eb86381f6a188ddbac0fcbaab855ce52","impliedFormat":1},{"version":"a63d03de72adfb91777784015bd3b4125abd2f5ef867fc5a13920b5649e8f52b","impliedFormat":1},{"version":"d20e003f3d518a7c1f749dbe27c6ab5e3be7b3c905a48361b04a9557de4a6900","impliedFormat":1},{"version":"1d4d78c8b23c9ddaaaa49485e6adc2ec01086dfe5d8d4d36ca4cdc98d2f7e74a","affectsGlobalScope":true,"impliedFormat":1},{"version":"44fc16356b81c0463cc7d7b2b35dcf324d8144136f5bc5ce73ced86f2b3475b5","affectsGlobalScope":true,"impliedFormat":1},{"version":"575fb200043b11b464db8e42cc64379c5fd322b6d787638e005b5ee98a64486d","impliedFormat":1},{"version":"6de2f225d942562733e231a695534b30039bdf1875b377bb7255881f0df8ede8","impliedFormat":1},{"version":"56249fd3ef1f6b90888e606f4ea648c43978ef43a7263aafad64f8d83cd3b8aa","impliedFormat":1},{"version":"139ad1dc93a503da85b7a0d5f615bddbae61ad796bc68fedd049150db67a1e26","impliedFormat":1},{"version":"7b166975fdbd3b37afb64707b98bca88e46577bbc6c59871f9383a7df2daacd1","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"81505c54d7cad0009352eaa21bd923ab7cdee7ec3405357a54d9a5da033a2084","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"3c1f19c7abcda6b3a4cf9438a15c7307a080bd3b51dfd56b198d9f86baf19447","impliedFormat":1},{"version":"2ee1645e0df9d84467cfe1d67b0ad3003c2f387de55874d565094464ee6f2927","impliedFormat":1},{"version":"7da97d603bf3dd0000f56467c56cb6efaf5f94692980474925fae6c33412b12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9cf780e96b687e4bdfd1907ed26a688c18b89797490a00598fa8b8ab683335dd","affectsGlobalScope":true,"impliedFormat":1},{"version":"98e00f3613402504bc2a2c9a621800ab48e0a463d1eed062208a4ae98ad8f84c","impliedFormat":1},{"version":"9ae88ce9f73446c24b2d2452e993b676da1b31fca5ceb7276e7f36279f693ed1","impliedFormat":1},{"version":"e49d7625faff2a7842e4e7b9b197f972633fca685afcf6b4403400c97d087c36","impliedFormat":1},{"version":"b82c38abc53922b1b3670c3af6f333c21b735722a8f156e7d357a2da7c53a0a0","impliedFormat":1},{"version":"b423f53647708043299ded4daa68d95c967a2ac30aa1437adc4442129d7d0a6c","affectsGlobalScope":true,"impliedFormat":1},{"version":"7245af181218216bacb01fbdf51095617a51661f20d77178c69a377e16fb69ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"4f0fc7b7f54422bd97cfaf558ddb4bca86893839367b746a8f86b60ac7619673","impliedFormat":1},{"version":"4cdd8b6b51599180a387cc7c1c50f49eca5ce06595d781638fd0216520d98246","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"8704423bf338bff381ebc951ed819935d0252d90cd6de7dffe5b0a5debb65d07","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c6929fd7cbf38499b6a600b91c3b603d1d78395046dc3499b2b92d01418b94b","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","impliedFormat":1}],"root":[[82,87]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declarationDir":"./types","esModuleInterop":true,"module":7,"outDir":"./esm","preserveConstEnums":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":2},"referencedMap":[[88,1],[89,1],[124,2],[125,3],[126,4],[127,5],[128,6],[129,7],[130,8],[131,9],[132,10],[133,11],[134,11],[136,12],[135,13],[137,14],[138,15],[139,16],[123,17],[140,18],[141,19],[142,20],[175,21],[143,22],[144,23],[145,24],[146,25],[147,26],[148,27],[149,28],[150,29],[151,30],[152,31],[153,31],[154,32],[156,33],[158,34],[157,35],[159,36],[160,37],[161,38],[162,39],[163,40],[164,41],[165,42],[166,43],[167,44],[168,45],[169,46],[170,47],[171,48],[172,49],[173,50],[106,51],[113,52],[105,51],[120,53],[97,54],[96,55],[119,56],[114,57],[117,58],[99,59],[98,60],[94,61],[93,62],[116,63],[95,64],[100,65],[104,65],[122,66],[121,65],[108,67],[109,68],[111,69],[107,70],[110,71],[115,56],[102,72],[103,73],[112,74],[92,75],[118,76],[85,77],[83,78],[82,79],[86,80],[84,81]],"latestChangedDtsFile":"./types/version.d.ts","version":"5.8.2"}
@@ -0,0 +1,40 @@
1
+ import { type ImportScriptOptions, type EsmModule } from './import-script';
2
+ export type ConfigContent = Record<string, unknown> | unknown[] | string | number | boolean | null;
3
+ /**
4
+ * Options for configuring the import behavior.
5
+ *
6
+ * @template C - The type of the configuration content. Defaults to `ConfigContent`.
7
+ * @template M - The type of the ES module. Defaults to `EsmModule`.
8
+ *
9
+ * @property {string} [baseDir] - The base directory to resolve imports from.
10
+ * @property {string[]} [extensions] - An array of file extensions to consider during import resolution.
11
+ * @property {Object} [script] - Configuration for script-based imports.
12
+ * @property {(module: M) => C} [script.resolve] - A function to resolve the imported module into the desired configuration content.
13
+ * @property {ImportScriptOptions} [script.esBuildOptions] - Additional options for configuring the ESBuild process during script imports.
14
+ */
15
+ type ImportConfigOptions<C extends ConfigContent = ConfigContent, M extends EsmModule = EsmModule> = {
16
+ baseDir?: string;
17
+ extensions?: string[];
18
+ script?: {
19
+ resolve?: (module: M) => C;
20
+ esBuildOptions?: ImportScriptOptions;
21
+ };
22
+ };
23
+ /**
24
+ * Imports a configuration file based on the provided basename and options.
25
+ *
26
+ * @template C - The type of the configuration content.
27
+ * @template M - The type of the ES module, defaults to `EsmModule`.
28
+ *
29
+ * @param {string} basename - The base name of the configuration file to import.
30
+ * @param {ImportConfigOptions<C, M>} [options={}] - Optional parameters for importing the configuration.
31
+ * @param {string} [options.baseDir] - The base directory to resolve the configuration file from.
32
+ * @param {string[]} [options.extensions] - The list of file extensions to consider when resolving the configuration file.
33
+ * @param {object} [options.script] - Additional script options for importing non-JSON files.
34
+ *
35
+ * @returns {Promise<C>} A promise that resolves to the imported configuration content.
36
+ *
37
+ * @throws Will throw an error if the configuration file cannot be resolved or imported.
38
+ */
39
+ export declare function importConfig<C extends ConfigContent, M extends EsmModule = EsmModule>(basename: string, options?: ImportConfigOptions<C, M>): Promise<C>;
40
+ export default importConfig;
@@ -0,0 +1,11 @@
1
+ type JSONContent = Record<string, unknown> | string | number | boolean | null | unknown[];
2
+ /**
3
+ * Asynchronously imports and parses a JSON file.
4
+ *
5
+ * @template T - The expected type of the parsed JSON content. It can be a record, string, or number.
6
+ * @param {string} filePath - The path to the JSON file to be imported.
7
+ * @returns {Promise<T>} A promise that resolves to the parsed JSON content.
8
+ * @throws {Error} If the file cannot be read or the content is not valid JSON.
9
+ */
10
+ export declare const importJSON: <T extends JSONContent>(filePath: string, encoding?: BufferEncoding) => Promise<T>;
11
+ export default importJSON;
@@ -0,0 +1,42 @@
1
+ import { type BuildOptions } from 'esbuild';
2
+ /**
3
+ * Represents a Node.js module with an optional default export.
4
+ *
5
+ * @typedef {Object} EsmModule
6
+ * @property {unknown} [default] - The default export of the module, if any.
7
+ * @property {Record<string, unknown>} - Additional named exports of the module.
8
+ */
9
+ export type EsmModule = Record<string, unknown> & {
10
+ default?: unknown;
11
+ };
12
+ /**
13
+ * Options for importing a script, excluding certain build options.
14
+ *
15
+ * This type is derived from `BuildOptions` but omits the following properties:
16
+ * - `entryPoints`
17
+ * - `write`
18
+ * - `bundle`
19
+ * - `format`
20
+ */
21
+ export type ImportScriptOptions = Omit<BuildOptions, 'entryPoints' | 'write' | 'bundle' | 'format'>;
22
+ /**
23
+ * Asynchronously imports a script file using esbuild to bundle it.
24
+ *
25
+ * @template M - The type of the module to be imported.
26
+ * @param {string} entryPoint - The path to the script file to be imported.
27
+ * @param {ImportScriptOptions} [options] - Optional build options to customize the bundling process.
28
+ * @returns {Promise<M>} A promise that resolves to the imported module.
29
+ * @throws {Error} Throws an error if the bundling process fails or no output files are generated.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * import { importScript } from './import-script';
34
+ *
35
+ * (async () => {
36
+ * const myModule = await importScript<MyModuleType>('./path/to/my-module.ts');
37
+ * // Use myModule here
38
+ * })();
39
+ * ```
40
+ */
41
+ export declare const importScript: <M extends EsmModule>(entryPoint: string, options?: ImportScriptOptions) => Promise<M>;
42
+ export default importScript;
@@ -0,0 +1,4 @@
1
+ export { importScript } from './import-script';
2
+ export { importJSON } from './import-json';
3
+ export { default, importConfig, type ConfigContent } from './import-config';
4
+ export { resolveConfigFile } from './resolve-config-file';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Options for resolving a configuration file.
3
+ *
4
+ * @property {string} [baseDir] - The base directory to start resolving from. If not provided, defaults to the current working directory.
5
+ * @property {string[]} [extensions] - An array of file extensions to consider when resolving the configuration file. If not provided, defaults to common configuration file extensions.
6
+ */
7
+ export type ResolveConfigFileOptions = {
8
+ baseDir?: string;
9
+ extensions?: string[];
10
+ };
11
+ /**
12
+ * Resolves the configuration file path based on the provided base name and options.
13
+ *
14
+ * @param baseName - The base name of the configuration file (without extension).
15
+ * @param options - An object containing optional parameters:
16
+ * @returns A promise that resolves to the path of the found configuration file.
17
+ * @throws Will throw an error if the base name is not a non-empty string.
18
+ * @throws Will throw an error if no configuration file is found with the given base name and extensions.
19
+ */
20
+ export declare function resolveConfigFile(baseName: string, options?: ResolveConfigFileOptions): Promise<string>;
21
+ export default resolveConfigFile;
@@ -0,0 +1 @@
1
+ export declare const version = "1.0.0";
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@equinor/fusion-imports",
3
+ "version": "1.0.0",
4
+ "description": "Package import files and configurations",
5
+ "keywords": [
6
+ "esbuild",
7
+ "typescript",
8
+ "transpiling",
9
+ "node",
10
+ "runtime"
11
+ ],
12
+ "license": "ISC",
13
+ "type": "module",
14
+ "main": "dist/esm/index.js",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/esm/index.js",
18
+ "types": "./dist/types/index.d.ts"
19
+ }
20
+ },
21
+ "types": "dist/types/index.d.ts",
22
+ "directories": {
23
+ "dist": "dist"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "src"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/equinor/fusion-framework.git",
35
+ "directory": "packages/utils/transpile"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/equinor/fusion-framework/issues"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^20.11.14",
42
+ "esbuild": "^0.25.1",
43
+ "memfs": "^4.17.0",
44
+ "typescript": "^5.8.2",
45
+ "vitest": "^2.0.5"
46
+ },
47
+ "scripts": {
48
+ "build": "tsc -b",
49
+ "test": "vitest"
50
+ }
51
+ }
@@ -0,0 +1,67 @@
1
+ import path from 'node:path';
2
+ import { importScript, type ImportScriptOptions, type EsmModule } from './import-script';
3
+ import { importJSON } from './import-json';
4
+ import { resolveConfigFile } from './resolve-config-file';
5
+
6
+ export type ConfigContent = Record<string, unknown> | unknown[] | string | number | boolean | null;
7
+
8
+ /**
9
+ * Options for configuring the import behavior.
10
+ *
11
+ * @template C - The type of the configuration content. Defaults to `ConfigContent`.
12
+ * @template M - The type of the ES module. Defaults to `EsmModule`.
13
+ *
14
+ * @property {string} [baseDir] - The base directory to resolve imports from.
15
+ * @property {string[]} [extensions] - An array of file extensions to consider during import resolution.
16
+ * @property {Object} [script] - Configuration for script-based imports.
17
+ * @property {(module: M) => C} [script.resolve] - A function to resolve the imported module into the desired configuration content.
18
+ * @property {ImportScriptOptions} [script.esBuildOptions] - Additional options for configuring the ESBuild process during script imports.
19
+ */
20
+ type ImportConfigOptions<
21
+ C extends ConfigContent = ConfigContent,
22
+ M extends EsmModule = EsmModule,
23
+ > = {
24
+ baseDir?: string;
25
+ extensions?: string[];
26
+ script?: {
27
+ resolve?: (module: M) => C;
28
+ esBuildOptions?: ImportScriptOptions;
29
+ };
30
+ };
31
+
32
+ /**
33
+ * Imports a configuration file based on the provided basename and options.
34
+ *
35
+ * @template C - The type of the configuration content.
36
+ * @template M - The type of the ES module, defaults to `EsmModule`.
37
+ *
38
+ * @param {string} basename - The base name of the configuration file to import.
39
+ * @param {ImportConfigOptions<C, M>} [options={}] - Optional parameters for importing the configuration.
40
+ * @param {string} [options.baseDir] - The base directory to resolve the configuration file from.
41
+ * @param {string[]} [options.extensions] - The list of file extensions to consider when resolving the configuration file.
42
+ * @param {object} [options.script] - Additional script options for importing non-JSON files.
43
+ *
44
+ * @returns {Promise<C>} A promise that resolves to the imported configuration content.
45
+ *
46
+ * @throws Will throw an error if the configuration file cannot be resolved or imported.
47
+ */
48
+ export async function importConfig<C extends ConfigContent, M extends EsmModule = EsmModule>(
49
+ basename: string,
50
+ options: ImportConfigOptions<C, M> = {},
51
+ ): Promise<C> {
52
+ const { baseDir, extensions, script } = options;
53
+ const filePath = await resolveConfigFile(basename, { baseDir, extensions });
54
+ const fileExtension = path.extname(filePath);
55
+
56
+ switch (fileExtension) {
57
+ case '.json':
58
+ return importJSON<C>(filePath);
59
+ default: {
60
+ const resolve = script?.resolve ?? ((module: M) => module.default as C);
61
+ const module = await importScript<M>(filePath, script?.esBuildOptions);
62
+ return resolve(module);
63
+ }
64
+ }
65
+ }
66
+
67
+ export default importConfig;
@@ -0,0 +1,25 @@
1
+ import { readFile } from 'node:fs/promises';
2
+
3
+ type JSONContent = Record<string, unknown> | string | number | boolean | null | unknown[];
4
+
5
+ /**
6
+ * Asynchronously imports and parses a JSON file.
7
+ *
8
+ * @template T - The expected type of the parsed JSON content. It can be a record, string, or number.
9
+ * @param {string} filePath - The path to the JSON file to be imported.
10
+ * @returns {Promise<T>} A promise that resolves to the parsed JSON content.
11
+ * @throws {Error} If the file cannot be read or the content is not valid JSON.
12
+ */
13
+ export const importJSON = async <T extends JSONContent>(
14
+ filePath: string,
15
+ encoding: BufferEncoding = 'utf-8',
16
+ ): Promise<T> => {
17
+ try {
18
+ const content = await readFile(filePath, encoding);
19
+ return JSON.parse(content);
20
+ } catch (error) {
21
+ throw new Error(`Failed to parse JSON from file: '${filePath}'`, { cause: error });
22
+ }
23
+ };
24
+
25
+ export default importJSON;
@@ -0,0 +1,96 @@
1
+ import { build, type BuildOptions } from 'esbuild';
2
+ import { access } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+
5
+ /**
6
+ * Represents a Node.js module with an optional default export.
7
+ *
8
+ * @typedef {Object} EsmModule
9
+ * @property {unknown} [default] - The default export of the module, if any.
10
+ * @property {Record<string, unknown>} - Additional named exports of the module.
11
+ */
12
+ export type EsmModule = Record<string, unknown> & {
13
+ default?: unknown;
14
+ };
15
+
16
+ /**
17
+ * Options for importing a script, excluding certain build options.
18
+ *
19
+ * This type is derived from `BuildOptions` but omits the following properties:
20
+ * - `entryPoints`
21
+ * - `write`
22
+ * - `bundle`
23
+ * - `format`
24
+ */
25
+ export type ImportScriptOptions = Omit<BuildOptions, 'entryPoints' | 'write' | 'bundle' | 'format'>;
26
+
27
+ /**
28
+ * Asynchronously imports a script file using esbuild to bundle it.
29
+ *
30
+ * @template M - The type of the module to be imported.
31
+ * @param {string} entryPoint - The path to the script file to be imported.
32
+ * @param {ImportScriptOptions} [options] - Optional build options to customize the bundling process.
33
+ * @returns {Promise<M>} A promise that resolves to the imported module.
34
+ * @throws {Error} Throws an error if the bundling process fails or no output files are generated.
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * import { importScript } from './import-script';
39
+ *
40
+ * (async () => {
41
+ * const myModule = await importScript<MyModuleType>('./path/to/my-module.ts');
42
+ * // Use myModule here
43
+ * })();
44
+ * ```
45
+ */
46
+ export const importScript = async <M extends EsmModule>(
47
+ entryPoint: string,
48
+ options?: ImportScriptOptions,
49
+ ): Promise<M> => {
50
+ const sourceFile = path.resolve(entryPoint);
51
+
52
+ try {
53
+ await access(sourceFile);
54
+ } catch (error) {
55
+ throw new Error(`The file '${entryPoint}' does not exist or cannot be accessed`, {
56
+ cause: error,
57
+ });
58
+ }
59
+
60
+ try {
61
+ const buildOptions = Object.assign(
62
+ {
63
+ // default options
64
+ platform: 'node',
65
+ },
66
+ options, // provided options
67
+ {
68
+ // non-overridable options
69
+ entryPoints: [sourceFile],
70
+ write: false,
71
+ bundle: true,
72
+ format: 'esm',
73
+ },
74
+ ) as BuildOptions;
75
+
76
+ const result = await build(buildOptions);
77
+
78
+ // Ensure that at least one output file was generated
79
+ const [output] = result.outputFiles ?? [];
80
+ if (!output) {
81
+ throw new Error(`No output files generated for '${entryPoint}'`);
82
+ }
83
+
84
+ // Create a data URL from the bundled script
85
+ const dataUrl = `data:text/javascript;base64,${Buffer.from(output.text).toString('base64')}`;
86
+
87
+ return import(dataUrl);
88
+ } catch (error) {
89
+ throw new Error(
90
+ `Failed to bundle '${entryPoint}' with esbuild. Check for syntax errors or unresolved imports.`,
91
+ { cause: error },
92
+ );
93
+ }
94
+ };
95
+
96
+ export default importScript;
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { importScript } from './import-script';
2
+ export { importJSON } from './import-json';
3
+ export { default, importConfig, type ConfigContent } from './import-config';
4
+ export { resolveConfigFile } from './resolve-config-file';
@@ -0,0 +1,48 @@
1
+ import { access } from 'node:fs/promises';
2
+ import { resolve } from 'node:path';
3
+
4
+ const defaultExtensions = ['.ts', '.mjs', '.js', '.json'];
5
+
6
+ /**
7
+ * Options for resolving a configuration file.
8
+ *
9
+ * @property {string} [baseDir] - The base directory to start resolving from. If not provided, defaults to the current working directory.
10
+ * @property {string[]} [extensions] - An array of file extensions to consider when resolving the configuration file. If not provided, defaults to common configuration file extensions.
11
+ */
12
+ export type ResolveConfigFileOptions = {
13
+ baseDir?: string;
14
+ extensions?: string[];
15
+ };
16
+
17
+ /**
18
+ * Resolves the configuration file path based on the provided base name and options.
19
+ *
20
+ * @param baseName - The base name of the configuration file (without extension).
21
+ * @param options - An object containing optional parameters:
22
+ * @returns A promise that resolves to the path of the found configuration file.
23
+ * @throws Will throw an error if the base name is not a non-empty string.
24
+ * @throws Will throw an error if no configuration file is found with the given base name and extensions.
25
+ */
26
+ export async function resolveConfigFile(
27
+ baseName: string,
28
+ options: ResolveConfigFileOptions = {},
29
+ ): Promise<string> {
30
+ if (!baseName || typeof baseName !== 'string') {
31
+ throw new Error('baseName must be a non-empty string');
32
+ }
33
+
34
+ const { baseDir = process.cwd(), extensions = defaultExtensions } = options;
35
+
36
+ for (const ext of extensions) {
37
+ const filePath = resolve(baseDir, `${baseName}${ext}`);
38
+ try {
39
+ await access(filePath);
40
+ return filePath;
41
+ } catch {
42
+ // Continue to the next extension
43
+ }
44
+ }
45
+ throw new Error(`No configuration file found for basename '${baseName}'`);
46
+ }
47
+
48
+ export default resolveConfigFile;
package/src/version.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by genversion.
2
+ export const version = '1.0.0';