@powerlines/core 0.14.5 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/api.cjs +6 -5
- package/dist/constants/api.d.cts +3 -3
- package/dist/constants/api.d.cts.map +1 -1
- package/dist/constants/api.d.mts +3 -3
- package/dist/constants/api.d.mts.map +1 -1
- package/dist/constants/api.mjs +4 -4
- package/dist/constants/api.mjs.map +1 -1
- package/dist/constants/commands.cjs +3 -2
- package/dist/constants/commands.d.cts +1 -1
- package/dist/constants/commands.d.mts +1 -1
- package/dist/constants/commands.mjs +2 -2
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/devtools.cjs +23 -0
- package/dist/constants/devtools.d.cts +13 -0
- package/dist/constants/devtools.d.cts.map +1 -0
- package/dist/constants/devtools.d.mts +13 -0
- package/dist/constants/devtools.d.mts.map +1 -0
- package/dist/constants/devtools.mjs +14 -0
- package/dist/constants/devtools.mjs.map +1 -0
- package/dist/constants/environments.cjs +1 -0
- package/dist/constants/extensions.cjs +21 -0
- package/dist/constants/extensions.d.cts +5 -0
- package/dist/constants/extensions.d.cts.map +1 -0
- package/dist/constants/extensions.d.mts +5 -0
- package/dist/constants/extensions.d.mts.map +1 -0
- package/dist/constants/extensions.mjs +20 -0
- package/dist/constants/extensions.mjs.map +1 -0
- package/dist/constants/fs.cjs +1 -0
- package/dist/constants/hooks.cjs +1 -0
- package/dist/constants/index.cjs +48 -30
- package/dist/constants/index.d.cts +5 -3
- package/dist/constants/index.d.mts +5 -3
- package/dist/constants/index.mjs +5 -3
- package/dist/constants/log-level.cjs +90 -0
- package/dist/constants/log-level.d.cts +63 -0
- package/dist/constants/log-level.d.cts.map +1 -0
- package/dist/constants/log-level.d.mts +63 -0
- package/dist/constants/log-level.d.mts.map +1 -0
- package/dist/constants/log-level.mjs +82 -0
- package/dist/constants/log-level.mjs.map +1 -0
- package/dist/constants/meta.cjs +1 -0
- package/dist/constants/plugin.cjs +3 -2
- package/dist/constants/plugin.d.cts +2 -2
- package/dist/constants/plugin.d.mts +2 -2
- package/dist/context/base-context.cjs +127 -0
- package/dist/context/base-context.d.cts +81 -0
- package/dist/context/base-context.d.cts.map +1 -0
- package/dist/context/base-context.d.mts +81 -0
- package/dist/context/base-context.d.mts.map +1 -0
- package/dist/context/base-context.mjs +125 -0
- package/dist/context/base-context.mjs.map +1 -0
- package/dist/context/context.cjs +934 -0
- package/dist/context/context.d.cts +369 -0
- package/dist/context/context.d.cts.map +1 -0
- package/dist/context/context.d.mts +369 -0
- package/dist/context/context.d.mts.map +1 -0
- package/dist/context/context.mjs +932 -0
- package/dist/context/context.mjs.map +1 -0
- package/dist/context/environment-context.cjs +219 -0
- package/dist/context/environment-context.d.cts +100 -0
- package/dist/context/environment-context.d.cts.map +1 -0
- package/dist/context/environment-context.d.mts +100 -0
- package/dist/context/environment-context.d.mts.map +1 -0
- package/dist/context/environment-context.mjs +218 -0
- package/dist/context/environment-context.mjs.map +1 -0
- package/dist/context/execution-context.cjs +230 -0
- package/dist/context/execution-context.d.cts +101 -0
- package/dist/context/execution-context.d.cts.map +1 -0
- package/dist/context/execution-context.d.mts +101 -0
- package/dist/context/execution-context.d.mts.map +1 -0
- package/dist/context/execution-context.mjs +228 -0
- package/dist/context/execution-context.mjs.map +1 -0
- package/dist/context/index.cjs +12 -0
- package/dist/context/index.d.cts +6 -0
- package/dist/context/index.d.mts +6 -0
- package/dist/context/index.mjs +7 -0
- package/dist/context/plugin-context.cjs +83 -0
- package/dist/context/plugin-context.d.cts +18 -0
- package/dist/context/plugin-context.d.cts.map +1 -0
- package/dist/context/plugin-context.d.mts +18 -0
- package/dist/context/plugin-context.d.mts.map +1 -0
- package/dist/context/plugin-context.mjs +82 -0
- package/dist/context/plugin-context.mjs.map +1 -0
- package/dist/index.cjs +62 -9
- package/dist/index.d.cts +20 -9
- package/dist/index.d.mts +20 -9
- package/dist/index.mjs +17 -5
- package/dist/lib/config.cjs +160 -15
- package/dist/lib/config.d.cts +92 -6
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +92 -6
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +154 -16
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +43 -0
- package/dist/lib/context-helpers.d.cts +19 -0
- package/dist/lib/context-helpers.d.cts.map +1 -0
- package/dist/lib/context-helpers.d.mts +19 -0
- package/dist/lib/context-helpers.d.mts.map +1 -0
- package/dist/lib/context-helpers.mjs +41 -0
- package/dist/lib/context-helpers.mjs.map +1 -0
- package/dist/lib/entry.cjs +5 -5
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +5 -5
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/environment.cjs +72 -0
- package/dist/lib/environment.d.cts +12 -0
- package/dist/lib/environment.d.cts.map +1 -0
- package/dist/lib/environment.d.mts +12 -0
- package/dist/lib/environment.d.mts.map +1 -0
- package/dist/lib/environment.mjs +67 -0
- package/dist/lib/environment.mjs.map +1 -0
- package/dist/lib/events.cjs +43 -0
- package/dist/lib/events.d.cts +10 -0
- package/dist/lib/events.d.cts.map +1 -0
- package/dist/lib/events.d.mts +10 -0
- package/dist/lib/events.d.mts.map +1 -0
- package/dist/lib/events.mjs +42 -0
- package/dist/lib/events.mjs.map +1 -0
- package/dist/lib/generate-types.cjs +371 -0
- package/dist/lib/generate-types.d.cts +67 -0
- package/dist/lib/generate-types.d.cts.map +1 -0
- package/dist/lib/generate-types.d.mts +67 -0
- package/dist/lib/generate-types.d.mts.map +1 -0
- package/dist/lib/generate-types.mjs +368 -0
- package/dist/lib/generate-types.mjs.map +1 -0
- package/dist/lib/hooks.cjs +152 -0
- package/dist/lib/hooks.d.cts +28 -0
- package/dist/lib/hooks.d.cts.map +1 -0
- package/dist/lib/hooks.d.mts +28 -0
- package/dist/lib/hooks.d.mts.map +1 -0
- package/dist/lib/hooks.mjs +147 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.cjs +64 -9
- package/dist/lib/index.d.cts +15 -3
- package/dist/lib/index.d.mts +15 -3
- package/dist/lib/index.mjs +19 -5
- package/dist/lib/install-dependencies.cjs +25 -0
- package/dist/lib/install-dependencies.d.cts +12 -0
- package/dist/lib/install-dependencies.d.cts.map +1 -0
- package/dist/lib/install-dependencies.d.mts +12 -0
- package/dist/lib/install-dependencies.d.mts.map +1 -0
- package/dist/lib/install-dependencies.mjs +24 -0
- package/dist/lib/install-dependencies.mjs.map +1 -0
- package/dist/lib/meta.cjs +57 -0
- package/dist/lib/meta.d.cts +34 -0
- package/dist/lib/meta.d.cts.map +1 -0
- package/dist/lib/meta.d.mts +34 -0
- package/dist/lib/meta.d.mts.map +1 -0
- package/dist/lib/meta.mjs +54 -0
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/plugins.cjs +150 -0
- package/dist/lib/plugins.d.cts +40 -0
- package/dist/lib/plugins.d.cts.map +1 -0
- package/dist/lib/plugins.d.mts +40 -0
- package/dist/lib/plugins.d.mts.map +1 -0
- package/dist/lib/plugins.mjs +146 -0
- package/dist/lib/plugins.mjs.map +1 -0
- package/dist/lib/resolver.cjs +35 -0
- package/dist/lib/resolver.d.cts +21 -0
- package/dist/lib/resolver.d.cts.map +1 -0
- package/dist/lib/resolver.d.mts +21 -0
- package/dist/lib/resolver.d.mts.map +1 -0
- package/dist/lib/resolver.mjs +33 -0
- package/dist/lib/resolver.mjs.map +1 -0
- package/dist/lib/schemas.cjs +9 -0
- package/dist/lib/schemas.d.cts +2 -0
- package/dist/lib/schemas.d.mts +2 -0
- package/dist/lib/schemas.mjs +3 -0
- package/dist/lib/streaming-channel.cjs +260 -0
- package/dist/lib/streaming-channel.d.cts +133 -0
- package/dist/lib/streaming-channel.d.cts.map +1 -0
- package/dist/lib/streaming-channel.d.mts +133 -0
- package/dist/lib/streaming-channel.d.mts.map +1 -0
- package/dist/lib/streaming-channel.mjs +258 -0
- package/dist/lib/streaming-channel.mjs.map +1 -0
- package/dist/lib/typescript/index.cjs +16 -0
- package/dist/lib/typescript/index.d.cts +3 -0
- package/dist/lib/typescript/index.d.mts +3 -0
- package/dist/lib/typescript/index.mjs +4 -0
- package/dist/lib/typescript/ts-morph.cjs +105 -0
- package/dist/lib/typescript/ts-morph.d.cts +38 -0
- package/dist/lib/typescript/ts-morph.d.cts.map +1 -0
- package/dist/lib/typescript/ts-morph.d.mts +38 -0
- package/dist/lib/typescript/ts-morph.d.mts.map +1 -0
- package/dist/lib/typescript/ts-morph.mjs +102 -0
- package/dist/lib/typescript/ts-morph.mjs.map +1 -0
- package/dist/lib/typescript/tsconfig.cjs +253 -0
- package/dist/lib/typescript/tsconfig.d.cts +77 -0
- package/dist/lib/typescript/tsconfig.d.cts.map +1 -0
- package/dist/lib/typescript/tsconfig.d.mts +77 -0
- package/dist/lib/typescript/tsconfig.d.mts.map +1 -0
- package/dist/lib/typescript/tsconfig.mjs +240 -0
- package/dist/lib/typescript/tsconfig.mjs.map +1 -0
- package/dist/lib/unplugin/helpers.cjs +2 -2
- package/dist/lib/unplugin/module-resolution.cjs +18 -18
- package/dist/lib/unplugin/module-resolution.mjs +18 -18
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +55 -62
- package/dist/lib/unplugin/plugin.d.cts +10 -11
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts +10 -11
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +55 -62
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +2 -2
- package/dist/lib/utilities/file-header.mjs +2 -2
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +1 -1
- package/dist/lib/utilities/format.mjs +1 -1
- package/dist/lib/utilities/index.cjs +2 -2
- package/dist/lib/utilities/index.mjs +2 -2
- package/dist/lib/utilities/write-file.cjs +1 -2
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.cts.map +1 -1
- package/dist/lib/utilities/write-file.d.mts +1 -1
- package/dist/lib/utilities/write-file.d.mts.map +1 -1
- package/dist/lib/utilities/write-file.mjs +1 -2
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/vfs.cjs +1104 -0
- package/dist/lib/vfs.d.cts +321 -0
- package/dist/lib/vfs.d.cts.map +1 -0
- package/dist/lib/vfs.d.mts +321 -0
- package/dist/lib/vfs.d.mts.map +1 -0
- package/dist/lib/vfs.mjs +1102 -0
- package/dist/lib/vfs.mjs.map +1 -0
- package/dist/plugin-base.cjs +1 -1
- package/dist/plugin-base.mjs +1 -1
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.cjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +22 -12
- package/dist/plugin-utils/context-helpers.d.cts +9 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +9 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +22 -13
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +13 -5
- package/dist/plugin-utils/filter.d.cts +2 -1
- package/dist/plugin-utils/filter.d.cts.map +1 -1
- package/dist/plugin-utils/filter.d.mts +2 -1
- package/dist/plugin-utils/filter.d.mts.map +1 -1
- package/dist/plugin-utils/filter.mjs +13 -6
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +44 -0
- package/dist/plugin-utils/format.d.cts +11 -0
- package/dist/plugin-utils/format.d.cts.map +1 -0
- package/dist/plugin-utils/format.d.mts +11 -0
- package/dist/plugin-utils/format.d.mts.map +1 -0
- package/dist/plugin-utils/format.mjs +43 -0
- package/dist/plugin-utils/format.mjs.map +1 -0
- package/dist/plugin-utils/helpers.cjs +6 -6
- package/dist/plugin-utils/helpers.d.cts +15 -15
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +15 -15
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +1 -1
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +34 -4
- package/dist/plugin-utils/index.d.cts +7 -4
- package/dist/plugin-utils/index.d.mts +7 -4
- package/dist/plugin-utils/index.mjs +9 -6
- package/dist/plugin-utils/install.cjs +47 -0
- package/dist/plugin-utils/install.d.cts +23 -0
- package/dist/plugin-utils/install.d.cts.map +1 -0
- package/dist/plugin-utils/install.d.mts +23 -0
- package/dist/plugin-utils/install.d.mts.map +1 -0
- package/dist/plugin-utils/install.mjs +45 -0
- package/dist/plugin-utils/install.mjs.map +1 -0
- package/dist/plugin-utils/logging.cjs +588 -1
- package/dist/plugin-utils/logging.d.cts +93 -1
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts +93 -1
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +572 -1
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +1 -1
- package/dist/plugin-utils/merge.mjs +1 -1
- package/dist/plugin-utils/modules.cjs +1 -1
- package/dist/plugin-utils/modules.mjs +1 -1
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +6 -2
- package/dist/plugin-utils/paths.mjs +6 -2
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.cjs +80 -0
- package/dist/plugin-utils/virtual.d.cts +69 -0
- package/dist/plugin-utils/virtual.d.cts.map +1 -0
- package/dist/plugin-utils/virtual.d.mts +69 -0
- package/dist/plugin-utils/virtual.d.mts.map +1 -0
- package/dist/plugin-utils/virtual.mjs +73 -0
- package/dist/plugin-utils/virtual.mjs.map +1 -0
- package/dist/schemas/fs.cjs +232 -0
- package/dist/schemas/fs.d.cts +127 -0
- package/dist/schemas/fs.d.cts.map +1 -0
- package/dist/schemas/fs.d.mts +127 -0
- package/dist/schemas/fs.d.mts.map +1 -0
- package/dist/schemas/fs.mjs +226 -0
- package/dist/schemas/fs.mjs.map +1 -0
- package/dist/storage/base.cjs +216 -0
- package/dist/storage/base.d.cts +201 -0
- package/dist/storage/base.d.cts.map +1 -0
- package/dist/storage/base.d.mts +201 -0
- package/dist/storage/base.d.mts.map +1 -0
- package/dist/storage/base.mjs +215 -0
- package/dist/storage/base.mjs.map +1 -0
- package/dist/storage/file-system.cjs +180 -0
- package/dist/storage/file-system.d.cts +129 -0
- package/dist/storage/file-system.d.cts.map +1 -0
- package/dist/storage/file-system.d.mts +129 -0
- package/dist/storage/file-system.d.mts.map +1 -0
- package/dist/storage/file-system.mjs +179 -0
- package/dist/storage/file-system.mjs.map +1 -0
- package/dist/storage/helpers.cjs +37 -0
- package/dist/storage/helpers.d.cts +25 -0
- package/dist/storage/helpers.d.cts.map +1 -0
- package/dist/storage/helpers.d.mts +25 -0
- package/dist/storage/helpers.d.mts.map +1 -0
- package/dist/storage/helpers.mjs +34 -0
- package/dist/storage/helpers.mjs.map +1 -0
- package/dist/storage/index.cjs +12 -0
- package/dist/storage/index.d.cts +5 -0
- package/dist/storage/index.d.mts +5 -0
- package/dist/storage/index.mjs +6 -0
- package/dist/storage/virtual.cjs +98 -0
- package/dist/storage/virtual.d.cts +80 -0
- package/dist/storage/virtual.d.cts.map +1 -0
- package/dist/storage/virtual.d.mts +80 -0
- package/dist/storage/virtual.d.mts.map +1 -0
- package/dist/storage/virtual.mjs +97 -0
- package/dist/storage/virtual.mjs.map +1 -0
- package/dist/types/api.d.cts +18 -152
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +18 -152
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +194 -135
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +195 -136
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +152 -128
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +155 -131
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.mts +1 -1
- package/dist/types/index.d.cts +5 -6
- package/dist/types/index.d.mts +5 -6
- package/dist/types/logging.d.cts +161 -0
- package/dist/types/logging.d.cts.map +1 -0
- package/dist/types/logging.d.mts +161 -0
- package/dist/types/logging.d.mts.map +1 -0
- package/dist/types/plugin.d.cts +6 -9
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +6 -9
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.mts +1 -1
- package/dist/types/unplugin.d.cts +5 -26
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts +5 -26
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +259 -457
- package/schemas/fs.capnp +42 -0
- package/dist/constants/virtual-modules.cjs +0 -8
- package/dist/constants/virtual-modules.d.cts +0 -6
- package/dist/constants/virtual-modules.d.cts.map +0 -1
- package/dist/constants/virtual-modules.d.mts +0 -6
- package/dist/constants/virtual-modules.d.mts.map +0 -1
- package/dist/constants/virtual-modules.mjs +0 -7
- package/dist/constants/virtual-modules.mjs.map +0 -1
- package/dist/lib/logger.cjs +0 -99
- package/dist/lib/logger.d.cts +0 -53
- package/dist/lib/logger.d.cts.map +0 -1
- package/dist/lib/logger.d.mts +0 -53
- package/dist/lib/logger.d.mts.map +0 -1
- package/dist/lib/logger.mjs +0 -93
- package/dist/lib/logger.mjs.map +0 -1
- package/dist/types/_internal.cjs +0 -0
- package/dist/types/_internal.d.cts +0 -106
- package/dist/types/_internal.d.cts.map +0 -1
- package/dist/types/_internal.d.mts +0 -106
- package/dist/types/_internal.d.mts.map +0 -1
- package/dist/types/_internal.mjs +0 -1
- package/dist/types/commands.d.cts +0 -16
- package/dist/types/commands.d.cts.map +0 -1
- package/dist/types/commands.d.mts +0 -16
- package/dist/types/commands.d.mts.map +0 -1
- package/dist/types/utils.d.cts +0 -9
- package/dist/types/utils.d.cts.map +0 -1
- package/dist/types/utils.d.mts +0 -9
- package/dist/types/utils.d.mts.map +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { InMemoryFileSystemHost, Project } from "ts-morph";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/typescript/ts-morph.ts
|
|
5
|
+
var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
|
|
6
|
+
#context;
|
|
7
|
+
constructor(context) {
|
|
8
|
+
super();
|
|
9
|
+
this.#context = context;
|
|
10
|
+
}
|
|
11
|
+
deleteSync(path) {
|
|
12
|
+
this.#context.fs.removeSync(path);
|
|
13
|
+
}
|
|
14
|
+
readDirSync(dirPath) {
|
|
15
|
+
if (!this.#context.fs.isDirectorySync(dirPath)) return [];
|
|
16
|
+
return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {
|
|
17
|
+
const fullPath = this.#context.fs.resolveSync(entry);
|
|
18
|
+
if (fullPath) ret.push({
|
|
19
|
+
name: entry,
|
|
20
|
+
isDirectory: this.#context.fs.isDirectorySync(fullPath),
|
|
21
|
+
isFile: this.#context.fs.isFileSync(fullPath),
|
|
22
|
+
isSymlink: false
|
|
23
|
+
});
|
|
24
|
+
return ret;
|
|
25
|
+
}, []);
|
|
26
|
+
}
|
|
27
|
+
async readFile(filePath) {
|
|
28
|
+
if (!this.#context.fs.isFileSync(filePath)) return "";
|
|
29
|
+
return await this.#context.fs.read(filePath);
|
|
30
|
+
}
|
|
31
|
+
readFileSync(filePath) {
|
|
32
|
+
if (!this.#context.fs.isFileSync(filePath)) return "";
|
|
33
|
+
return this.#context.fs.readSync(filePath);
|
|
34
|
+
}
|
|
35
|
+
async writeFile(filePath, fileText) {
|
|
36
|
+
return this.#context.fs.write(filePath, fileText);
|
|
37
|
+
}
|
|
38
|
+
writeFileSync(filePath, fileText) {
|
|
39
|
+
this.#context.fs.writeSync(filePath, fileText);
|
|
40
|
+
}
|
|
41
|
+
async mkdir(dirPath) {
|
|
42
|
+
await this.#context.fs.mkdir(dirPath);
|
|
43
|
+
}
|
|
44
|
+
mkdirSync(dirPath) {
|
|
45
|
+
this.#context.fs.mkdirSync(dirPath);
|
|
46
|
+
}
|
|
47
|
+
async move(srcPath, destPath) {
|
|
48
|
+
await this.#context.fs.move(srcPath, destPath);
|
|
49
|
+
}
|
|
50
|
+
moveSync(srcPath, destPath) {
|
|
51
|
+
this.#context.fs.moveSync(srcPath, destPath);
|
|
52
|
+
}
|
|
53
|
+
async copy(srcPath, destPath) {
|
|
54
|
+
await this.#context.fs.copy(srcPath, destPath);
|
|
55
|
+
}
|
|
56
|
+
copySync(srcPath, destPath) {
|
|
57
|
+
this.#context.fs.copySync(srcPath, destPath);
|
|
58
|
+
}
|
|
59
|
+
async fileExists(filePath) {
|
|
60
|
+
return this.#context.fs.isFile(filePath);
|
|
61
|
+
}
|
|
62
|
+
fileExistsSync(filePath) {
|
|
63
|
+
return this.#context.fs.isFileSync(filePath);
|
|
64
|
+
}
|
|
65
|
+
async directoryExists(dirPath) {
|
|
66
|
+
return this.#context.fs.isDirectory(dirPath);
|
|
67
|
+
}
|
|
68
|
+
directoryExistsSync(dirPath) {
|
|
69
|
+
return this.#context.fs.isDirectorySync(dirPath);
|
|
70
|
+
}
|
|
71
|
+
realpathSync(path) {
|
|
72
|
+
return this.#context.fs.resolveSync(path) || path;
|
|
73
|
+
}
|
|
74
|
+
getCurrentDirectory() {
|
|
75
|
+
return this.#context.config.cwd;
|
|
76
|
+
}
|
|
77
|
+
async glob(patterns) {
|
|
78
|
+
return this.#context.fs.glob(patterns);
|
|
79
|
+
}
|
|
80
|
+
globSync(patterns) {
|
|
81
|
+
return this.#context.fs.globSync(patterns);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing
|
|
86
|
+
*
|
|
87
|
+
* @param context - The Powerlines context
|
|
88
|
+
* @returns A ts-morph {@link Project} instance
|
|
89
|
+
*/
|
|
90
|
+
function createProgram(context, override) {
|
|
91
|
+
context.debug(`Creating ts-morph Project instance with configuration from: ${context.tsconfig.tsconfigFilePath}.`);
|
|
92
|
+
return new Project(defu(override ?? {}, {
|
|
93
|
+
skipAddingFilesFromTsConfig: false,
|
|
94
|
+
tsConfigFilePath: context.tsconfig.tsconfigFilePath,
|
|
95
|
+
fileSystem: new VirtualFileSystemHost(context),
|
|
96
|
+
compilerOptions: defu(context.tsconfig.options ?? {}, { lib: ["lib.esnext.full.d.ts"] })
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
export { VirtualFileSystemHost, createProgram };
|
|
102
|
+
//# sourceMappingURL=ts-morph.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-morph.mjs","names":["#context"],"sources":["../../../src/lib/typescript/ts-morph.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport {\n CompilerOptions,\n FileSystemHost,\n InMemoryFileSystemHost,\n Project,\n ProjectOptions,\n RuntimeDirEntry\n} from \"ts-morph\";\nimport type { Context } from \"../../types/context\";\n\nexport class VirtualFileSystemHost\n extends InMemoryFileSystemHost\n implements FileSystemHost\n{\n #context: Context;\n\n public constructor(context: Context) {\n super();\n\n this.#context = context;\n }\n\n public override deleteSync(path: string) {\n this.#context.fs.removeSync(path);\n }\n\n public override readDirSync(dirPath: string): RuntimeDirEntry[] {\n if (!this.#context.fs.isDirectorySync(dirPath)) {\n return [];\n }\n\n return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {\n const fullPath = this.#context.fs.resolveSync(entry);\n if (fullPath) {\n ret.push({\n name: entry,\n isDirectory: this.#context.fs.isDirectorySync(fullPath),\n isFile: this.#context.fs.isFileSync(fullPath),\n isSymlink: false\n });\n }\n\n return ret;\n }, [] as RuntimeDirEntry[]);\n }\n\n public override async readFile(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return (await this.#context.fs.read(filePath))!;\n }\n\n public override readFileSync(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return this.#context.fs.readSync(filePath)!;\n }\n\n public override async writeFile(filePath: string, fileText: string) {\n return this.#context.fs.write(filePath, fileText);\n }\n\n public override writeFileSync(filePath: string, fileText: string) {\n this.#context.fs.writeSync(filePath, fileText);\n }\n\n public override async mkdir(dirPath: string) {\n await this.#context.fs.mkdir(dirPath);\n }\n\n public override mkdirSync(dirPath: string) {\n this.#context.fs.mkdirSync(dirPath);\n }\n\n public override async move(srcPath: string, destPath: string) {\n await this.#context.fs.move(srcPath, destPath);\n }\n\n public override moveSync(srcPath: string, destPath: string) {\n this.#context.fs.moveSync(srcPath, destPath);\n }\n\n public override async copy(srcPath: string, destPath: string) {\n await this.#context.fs.copy(srcPath, destPath);\n }\n\n public override copySync(srcPath: string, destPath: string) {\n this.#context.fs.copySync(srcPath, destPath);\n }\n\n public override async fileExists(filePath: string) {\n return this.#context.fs.isFile(filePath);\n }\n\n public override fileExistsSync(filePath: string) {\n return this.#context.fs.isFileSync(filePath);\n }\n\n public override async directoryExists(dirPath: string) {\n return this.#context.fs.isDirectory(dirPath);\n }\n\n public override directoryExistsSync(dirPath: string): boolean {\n return this.#context.fs.isDirectorySync(dirPath);\n }\n\n public override realpathSync(path: string) {\n return this.#context.fs.resolveSync(path) || path;\n }\n\n public override getCurrentDirectory() {\n return this.#context.config.cwd;\n }\n\n public override async glob(\n patterns: ReadonlyArray<string>\n ): Promise<string[]> {\n return this.#context.fs.glob(patterns as string[]);\n }\n\n public override globSync(patterns: ReadonlyArray<string>): string[] {\n return this.#context.fs.globSync(patterns as string[]);\n }\n}\n\n/**\n * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing\n *\n * @param context - The Powerlines context\n * @returns A ts-morph {@link Project} instance\n */\nexport function createProgram(\n context: Context,\n override: Partial<ProjectOptions>\n): Project {\n context.debug(\n `Creating ts-morph Project instance with configuration from: ${\n context.tsconfig.tsconfigFilePath\n }.`\n );\n\n const project = new Project(\n defu(override ?? {}, {\n skipAddingFilesFromTsConfig: false,\n tsConfigFilePath: context.tsconfig.tsconfigFilePath,\n fileSystem: new VirtualFileSystemHost(context),\n compilerOptions: defu(context.tsconfig.options ?? {}, {\n lib: [\"lib.esnext.full.d.ts\"]\n }) as CompilerOptions\n })\n );\n\n return project;\n}\n"],"mappings":";;;;AA6BA,IAAa,wBAAb,cACU,uBAEV;CACE;CAEA,AAAO,YAAY,SAAkB;AACnC,SAAO;AAEP,QAAKA,UAAW;;CAGlB,AAAgB,WAAW,MAAc;AACvC,QAAKA,QAAS,GAAG,WAAW,KAAK;;CAGnC,AAAgB,YAAY,SAAoC;AAC9D,MAAI,CAAC,MAAKA,QAAS,GAAG,gBAAgB,QAAQ,CAC5C,QAAO,EAAE;AAGX,SAAO,MAAKA,QAAS,GAAG,SAAS,QAAQ,CAAC,QAAQ,KAAK,UAAU;GAC/D,MAAM,WAAW,MAAKA,QAAS,GAAG,YAAY,MAAM;AACpD,OAAI,SACF,KAAI,KAAK;IACP,MAAM;IACN,aAAa,MAAKA,QAAS,GAAG,gBAAgB,SAAS;IACvD,QAAQ,MAAKA,QAAS,GAAG,WAAW,SAAS;IAC7C,WAAW;IACZ,CAAC;AAGJ,UAAO;KACN,EAAE,CAAsB;;CAG7B,MAAsB,SAAS,UAAkB;AAC/C,MAAI,CAAC,MAAKA,QAAS,GAAG,WAAW,SAAS,CACxC,QAAO;AAGT,SAAQ,MAAM,MAAKA,QAAS,GAAG,KAAK,SAAS;;CAG/C,AAAgB,aAAa,UAAkB;AAC7C,MAAI,CAAC,MAAKA,QAAS,GAAG,WAAW,SAAS,CACxC,QAAO;AAGT,SAAO,MAAKA,QAAS,GAAG,SAAS,SAAS;;CAG5C,MAAsB,UAAU,UAAkB,UAAkB;AAClE,SAAO,MAAKA,QAAS,GAAG,MAAM,UAAU,SAAS;;CAGnD,AAAgB,cAAc,UAAkB,UAAkB;AAChE,QAAKA,QAAS,GAAG,UAAU,UAAU,SAAS;;CAGhD,MAAsB,MAAM,SAAiB;AAC3C,QAAM,MAAKA,QAAS,GAAG,MAAM,QAAQ;;CAGvC,AAAgB,UAAU,SAAiB;AACzC,QAAKA,QAAS,GAAG,UAAU,QAAQ;;CAGrC,MAAsB,KAAK,SAAiB,UAAkB;AAC5D,QAAM,MAAKA,QAAS,GAAG,KAAK,SAAS,SAAS;;CAGhD,AAAgB,SAAS,SAAiB,UAAkB;AAC1D,QAAKA,QAAS,GAAG,SAAS,SAAS,SAAS;;CAG9C,MAAsB,KAAK,SAAiB,UAAkB;AAC5D,QAAM,MAAKA,QAAS,GAAG,KAAK,SAAS,SAAS;;CAGhD,AAAgB,SAAS,SAAiB,UAAkB;AAC1D,QAAKA,QAAS,GAAG,SAAS,SAAS,SAAS;;CAG9C,MAAsB,WAAW,UAAkB;AACjD,SAAO,MAAKA,QAAS,GAAG,OAAO,SAAS;;CAG1C,AAAgB,eAAe,UAAkB;AAC/C,SAAO,MAAKA,QAAS,GAAG,WAAW,SAAS;;CAG9C,MAAsB,gBAAgB,SAAiB;AACrD,SAAO,MAAKA,QAAS,GAAG,YAAY,QAAQ;;CAG9C,AAAgB,oBAAoB,SAA0B;AAC5D,SAAO,MAAKA,QAAS,GAAG,gBAAgB,QAAQ;;CAGlD,AAAgB,aAAa,MAAc;AACzC,SAAO,MAAKA,QAAS,GAAG,YAAY,KAAK,IAAI;;CAG/C,AAAgB,sBAAsB;AACpC,SAAO,MAAKA,QAAS,OAAO;;CAG9B,MAAsB,KACpB,UACmB;AACnB,SAAO,MAAKA,QAAS,GAAG,KAAK,SAAqB;;CAGpD,AAAgB,SAAS,UAA2C;AAClE,SAAO,MAAKA,QAAS,GAAG,SAAS,SAAqB;;;;;;;;;AAU1D,SAAgB,cACd,SACA,UACS;AACT,SAAQ,MACN,+DACE,QAAQ,SAAS,iBAClB,GACF;AAaD,QAAO,IAXa,QAClB,KAAK,YAAY,EAAE,EAAE;EACnB,6BAA6B;EAC7B,kBAAkB,QAAQ,SAAS;EACnC,YAAY,IAAI,sBAAsB,QAAQ;EAC9C,iBAAiB,KAAK,QAAQ,SAAS,WAAW,EAAE,EAAE,EACpD,KAAK,CAAC,uBAAuB,EAC9B,CAAC;EACH,CAAC,CAGU"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
4
|
+
let _stryke_fs_json = require("@stryke/fs/json");
|
|
5
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
6
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
7
|
+
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
8
|
+
let defu = require("defu");
|
|
9
|
+
defu = require_runtime.__toESM(defu, 1);
|
|
10
|
+
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
11
|
+
let chalk = require("chalk");
|
|
12
|
+
chalk = require_runtime.__toESM(chalk, 1);
|
|
13
|
+
let _stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
14
|
+
let _donedeal0_superdiff = require("@donedeal0/superdiff");
|
|
15
|
+
let _stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
16
|
+
let typescript = require("typescript");
|
|
17
|
+
typescript = require_runtime.__toESM(typescript, 1);
|
|
18
|
+
|
|
19
|
+
//#region src/lib/typescript/tsconfig.ts
|
|
20
|
+
function getTsconfigDtsPath(context) {
|
|
21
|
+
return (0, _stryke_path_join_paths.joinPaths)((0, _stryke_path_file_path_fns.relativePath)((0, _stryke_path_join_paths.joinPaths)(context.config.cwd, context.config.root), (0, _stryke_path_file_path_fns.findFilePath)(context.typesPath)), (0, _stryke_path_file_path_fns.findFileName)(context.typesPath));
|
|
22
|
+
}
|
|
23
|
+
async function resolveTsconfigChanges(context) {
|
|
24
|
+
const tsconfig = getParsedTypeScriptConfig(context.config.cwd, context.config.root, context.config.tsconfig, context.config.tsconfigRaw);
|
|
25
|
+
const tsconfigJson = await (0, _stryke_fs_json.readJsonFile)(getTsconfigFilePath(context.config.cwd, context.config.root, context.config.tsconfig));
|
|
26
|
+
tsconfigJson.compilerOptions ??= {};
|
|
27
|
+
if (context.config.output.dts !== false) {
|
|
28
|
+
const dtsRelativePath = getTsconfigDtsPath(context);
|
|
29
|
+
if (!tsconfigJson.include?.some((filePattern) => isIncludeMatchFound(filePattern, [context.typesPath, dtsRelativePath]))) {
|
|
30
|
+
tsconfigJson.include ??= [];
|
|
31
|
+
tsconfigJson.include.push(dtsRelativePath.startsWith("./") ? dtsRelativePath.slice(2) : dtsRelativePath);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (!tsconfig.options.lib?.some((lib) => [
|
|
35
|
+
"lib.esnext.d.ts",
|
|
36
|
+
"lib.es2021.d.ts",
|
|
37
|
+
"lib.es2022.d.ts",
|
|
38
|
+
"lib.es2023.d.ts"
|
|
39
|
+
].includes(lib.toLowerCase()))) {
|
|
40
|
+
tsconfigJson.compilerOptions.lib ??= [];
|
|
41
|
+
tsconfigJson.compilerOptions.lib.push("esnext");
|
|
42
|
+
}
|
|
43
|
+
if (tsconfig.options.esModuleInterop !== true) tsconfigJson.compilerOptions.esModuleInterop = true;
|
|
44
|
+
if (tsconfig.options.isolatedModules !== true) tsconfigJson.compilerOptions.isolatedModules = true;
|
|
45
|
+
if (context.config.platform === "node") {
|
|
46
|
+
if (!tsconfig.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
|
|
47
|
+
tsconfigJson.compilerOptions.types ??= [];
|
|
48
|
+
tsconfigJson.compilerOptions.types.push("node");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return tsconfigJson;
|
|
52
|
+
}
|
|
53
|
+
async function initializeTsconfig(context) {
|
|
54
|
+
context.debug("Initializing TypeScript configuration (tsconfig.json) for the Powerlines project.");
|
|
55
|
+
if (!(0, _stryke_fs_package_fns.isPackageExists)("typescript")) throw new Error("The TypeScript package is not installed. Please install the package using the command: \"npm install typescript --save-dev\"");
|
|
56
|
+
const tsconfigFilePath = getTsconfigFilePath(context.config.cwd, context.config.root, context.config.tsconfig);
|
|
57
|
+
context.tsconfig.originalTsconfigJson = await (0, _stryke_fs_json.readJsonFile)(tsconfigFilePath);
|
|
58
|
+
context.tsconfig.tsconfigJson = await resolveTsconfigChanges(context);
|
|
59
|
+
context.debug("Writing updated TypeScript configuration (tsconfig.json) file to disk.");
|
|
60
|
+
await context.fs.write(tsconfigFilePath, _stryke_json_storm_json.StormJSON.stringify(context.tsconfig.tsconfigJson));
|
|
61
|
+
context.tsconfig = getParsedTypeScriptConfig(context.config.cwd, context.config.root, context.config.tsconfig, context.config.tsconfigRaw, context.tsconfig.originalTsconfigJson);
|
|
62
|
+
}
|
|
63
|
+
async function resolveTsconfig(context) {
|
|
64
|
+
const updateTsconfigJson = await (0, _stryke_fs_json.readJsonFile)(context.tsconfig.tsconfigFilePath);
|
|
65
|
+
if (updateTsconfigJson?.compilerOptions?.types && Array.isArray(updateTsconfigJson.compilerOptions.types) && !updateTsconfigJson.compilerOptions.types.length) delete updateTsconfigJson.compilerOptions.types;
|
|
66
|
+
const result = (0, _donedeal0_superdiff.getObjectDiff)(context.tsconfig.originalTsconfigJson, updateTsconfigJson, {
|
|
67
|
+
ignoreArrayOrder: true,
|
|
68
|
+
showOnly: {
|
|
69
|
+
statuses: [
|
|
70
|
+
"added",
|
|
71
|
+
"deleted",
|
|
72
|
+
"updated"
|
|
73
|
+
],
|
|
74
|
+
granularity: "deep"
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const changes = [];
|
|
78
|
+
const getChanges = (difference, property) => {
|
|
79
|
+
if (difference.status === "added" || difference.status === "deleted" || difference.status === "updated") if (difference.diff) for (const diff of difference.diff) getChanges(diff, property ? `${property}.${difference.property}` : difference.property);
|
|
80
|
+
else changes.push({
|
|
81
|
+
field: property ? `${property}.${difference.property}` : difference.property,
|
|
82
|
+
status: difference.status,
|
|
83
|
+
previous: difference.status === "added" ? "---" : _stryke_json_storm_json.StormJSON.stringify(difference.previousValue),
|
|
84
|
+
current: difference.status === "deleted" ? "---" : _stryke_json_storm_json.StormJSON.stringify(difference.currentValue)
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
for (const diff of result.diff) getChanges(diff);
|
|
88
|
+
if (changes.length > 0) context.warn(`Updating the following configuration values in "${context.tsconfig.tsconfigFilePath}" file:
|
|
89
|
+
|
|
90
|
+
${changes.map((change, i) => `${chalk.default.bold.whiteBright(`${i + 1}. ${(0, _stryke_string_format_title_case.titleCase)(change.status)} the ${change.field} field: `)}
|
|
91
|
+
${chalk.default.red(` - Previous: ${change.previous} `)}
|
|
92
|
+
${chalk.default.green(` - Updated: ${change.current} `)}
|
|
93
|
+
`).join("\n")}
|
|
94
|
+
`);
|
|
95
|
+
await context.fs.write(context.tsconfig.tsconfigFilePath, _stryke_json_storm_json.StormJSON.stringify(updateTsconfigJson));
|
|
96
|
+
context.tsconfig = getParsedTypeScriptConfig(context.config.cwd, context.config.root, context.config.tsconfig);
|
|
97
|
+
if (!context.tsconfig) throw new Error("Failed to parse the TypeScript configuration file.");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Get the path to the tsconfig.json file.
|
|
101
|
+
*
|
|
102
|
+
* @param cwd - The root directory of the workspace.
|
|
103
|
+
* @param root - The root directory of the project.
|
|
104
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
105
|
+
* @returns The absolute path to the tsconfig.json file.
|
|
106
|
+
* @throws If the tsconfig.json file does not exist.
|
|
107
|
+
*/
|
|
108
|
+
function getTsconfigFilePath(cwd, root, tsconfig) {
|
|
109
|
+
let tsconfigFilePath;
|
|
110
|
+
if (tsconfig) tsconfigFilePath = tryTsconfigFilePath(cwd, root, tsconfig);
|
|
111
|
+
else {
|
|
112
|
+
tsconfigFilePath = tryTsconfigFilePath(cwd, root, "tsconfig.app.json");
|
|
113
|
+
if (!tsconfigFilePath) {
|
|
114
|
+
tsconfigFilePath = tryTsconfigFilePath(cwd, root, "tsconfig.lib.json");
|
|
115
|
+
if (!tsconfigFilePath) tsconfigFilePath = tryTsconfigFilePath(cwd, root, "tsconfig.json");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (!tsconfigFilePath) throw new Error(`Cannot find the \`tsconfig.json\` configuration file for the project at ${root}.`);
|
|
119
|
+
return tsconfigFilePath;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get the path to the tsconfig.json file.
|
|
123
|
+
*
|
|
124
|
+
* @param cwd - The root directory of the workspace.
|
|
125
|
+
* @param root - The root directory of the project.
|
|
126
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
127
|
+
* @returns The absolute path to the tsconfig.json file.
|
|
128
|
+
* @throws If the tsconfig.json file does not exist.
|
|
129
|
+
*/
|
|
130
|
+
function tryTsconfigFilePath(cwd, root, tsconfig) {
|
|
131
|
+
let tsconfigFilePath = tsconfig;
|
|
132
|
+
if (!(0, _stryke_fs_exists.existsSync)(tsconfigFilePath)) {
|
|
133
|
+
tsconfigFilePath = (0, _stryke_path_append.appendPath)(tsconfig, root);
|
|
134
|
+
if (!(0, _stryke_fs_exists.existsSync)(tsconfigFilePath)) {
|
|
135
|
+
tsconfigFilePath = (0, _stryke_path_append.appendPath)(tsconfig, (0, _stryke_path_append.appendPath)(root, cwd));
|
|
136
|
+
if (!(0, _stryke_fs_exists.existsSync)(tsconfigFilePath)) return;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return tsconfigFilePath;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
143
|
+
*
|
|
144
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
145
|
+
* @param types - An array of type names to check against.
|
|
146
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
147
|
+
*/
|
|
148
|
+
function findMatch(tsconfigType, types, extensions = [
|
|
149
|
+
".ts",
|
|
150
|
+
".tsx",
|
|
151
|
+
".d.ts"
|
|
152
|
+
]) {
|
|
153
|
+
return types.find((type) => tsconfigType?.toString().toLowerCase() === type?.toString().toLowerCase() || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}` || `./${tsconfigType?.toString().toLowerCase()}` === type?.toString().toLowerCase() || extensions.some((ext) => `${tsconfigType?.toString().toLowerCase()}${ext}` === type?.toString().toLowerCase() || `${tsconfigType?.toString().toLowerCase()}${ext}` === `./${type?.toString().toLowerCase()}` || `${type?.toString().toLowerCase()}${ext}` === `./${tsconfigType?.toString().toLowerCase()}` || tsconfigType?.toString().toLowerCase() === `${type?.toString().toLowerCase()}${ext}` || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}${ext}` || type?.toString().toLowerCase() === `./${tsconfigType?.toString().toLowerCase()}${ext}`));
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
157
|
+
*
|
|
158
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
159
|
+
* @param types - An array of type names to check against.
|
|
160
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
161
|
+
*/
|
|
162
|
+
function findIncludeMatch(tsconfigType, types) {
|
|
163
|
+
return findMatch(tsconfigType, types, [
|
|
164
|
+
".ts",
|
|
165
|
+
".tsx",
|
|
166
|
+
".d.ts",
|
|
167
|
+
".js",
|
|
168
|
+
".jsx",
|
|
169
|
+
".mjs",
|
|
170
|
+
".cjs",
|
|
171
|
+
".mts",
|
|
172
|
+
".cts",
|
|
173
|
+
"/*.ts",
|
|
174
|
+
"/*.tsx",
|
|
175
|
+
"/*.d.ts",
|
|
176
|
+
"/*.js",
|
|
177
|
+
"/*.jsx",
|
|
178
|
+
"/*.mjs",
|
|
179
|
+
"/*.cjs",
|
|
180
|
+
"/*.mts",
|
|
181
|
+
"/*.cts",
|
|
182
|
+
"/**/*.ts",
|
|
183
|
+
"/**/*.tsx",
|
|
184
|
+
"/**/*.d.ts",
|
|
185
|
+
"/**/*.js",
|
|
186
|
+
"/**/*.jsx",
|
|
187
|
+
"/**/*.mjs",
|
|
188
|
+
"/**/*.cjs",
|
|
189
|
+
"/**/*.mts",
|
|
190
|
+
"/**/*.cts"
|
|
191
|
+
]);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
195
|
+
*
|
|
196
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
197
|
+
* @param types - An array of type names to check against.
|
|
198
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
199
|
+
*/
|
|
200
|
+
function isMatchFound(tsconfigType, types) {
|
|
201
|
+
return findMatch(tsconfigType, types) !== void 0;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
205
|
+
*
|
|
206
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
207
|
+
* @param types - An array of type names to check against.
|
|
208
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
209
|
+
*/
|
|
210
|
+
function isIncludeMatchFound(tsconfigType, types) {
|
|
211
|
+
return findIncludeMatch(tsconfigType, types) !== void 0;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Get the parsed TypeScript configuration.
|
|
215
|
+
*
|
|
216
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
217
|
+
* @param projectRoot - The root directory of the project.
|
|
218
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
219
|
+
* @param tsconfigRaw - The raw tsconfig.json content.
|
|
220
|
+
* @param originalTsconfigJson - The original tsconfig.json content.
|
|
221
|
+
* @param host - The TypeScript parse config host.
|
|
222
|
+
* @returns The resolved TypeScript configuration.
|
|
223
|
+
*/
|
|
224
|
+
function getParsedTypeScriptConfig(workspaceRoot, projectRoot, tsconfig, tsconfigRaw = {}, originalTsconfigJson, host = typescript.default.sys) {
|
|
225
|
+
const tsconfigFilePath = getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
|
|
226
|
+
const tsconfigJson = (0, _stryke_fs_json.readJsonFileSync)(tsconfigFilePath);
|
|
227
|
+
if (!tsconfigJson) throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${(0, _stryke_path_join_paths.joinPaths)(projectRoot, tsconfig ?? "tsconfig.json")}`);
|
|
228
|
+
const parsedCommandLine = typescript.default.parseJsonConfigFileContent((0, defu.default)(tsconfigRaw ?? {}, tsconfigJson), host, (0, _stryke_path_append.appendPath)(projectRoot, workspaceRoot));
|
|
229
|
+
if (parsedCommandLine.errors.length > 0) {
|
|
230
|
+
const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:
|
|
231
|
+
${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && error.code ? `[${error.category}-${error.code}]: ` : "") + error.messageText.toString()}`).join("\n")}
|
|
232
|
+
`;
|
|
233
|
+
throw new Error(errorMessage);
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
...parsedCommandLine,
|
|
237
|
+
originalTsconfigJson: originalTsconfigJson ?? tsconfigJson,
|
|
238
|
+
tsconfigJson,
|
|
239
|
+
tsconfigFilePath
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
//#endregion
|
|
244
|
+
exports.findIncludeMatch = findIncludeMatch;
|
|
245
|
+
exports.findMatch = findMatch;
|
|
246
|
+
exports.getParsedTypeScriptConfig = getParsedTypeScriptConfig;
|
|
247
|
+
exports.getTsconfigDtsPath = getTsconfigDtsPath;
|
|
248
|
+
exports.getTsconfigFilePath = getTsconfigFilePath;
|
|
249
|
+
exports.initializeTsconfig = initializeTsconfig;
|
|
250
|
+
exports.isIncludeMatchFound = isIncludeMatchFound;
|
|
251
|
+
exports.isMatchFound = isMatchFound;
|
|
252
|
+
exports.resolveTsconfig = resolveTsconfig;
|
|
253
|
+
exports.tryTsconfigFilePath = tryTsconfigFilePath;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ParsedTypeScriptConfig, TSConfig } from "../../types/tsconfig.cjs";
|
|
2
|
+
import { EnvironmentContext } from "../../types/context.cjs";
|
|
3
|
+
import { ResolvedConfig } from "../../types/config.cjs";
|
|
4
|
+
import { FilterPattern } from "@stryke/types/file";
|
|
5
|
+
import ts from "typescript";
|
|
6
|
+
|
|
7
|
+
//#region src/lib/typescript/tsconfig.d.ts
|
|
8
|
+
declare function getTsconfigDtsPath<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string;
|
|
9
|
+
declare function initializeTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
10
|
+
declare function resolveTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the path to the tsconfig.json file.
|
|
13
|
+
*
|
|
14
|
+
* @param cwd - The root directory of the workspace.
|
|
15
|
+
* @param root - The root directory of the project.
|
|
16
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
17
|
+
* @returns The absolute path to the tsconfig.json file.
|
|
18
|
+
* @throws If the tsconfig.json file does not exist.
|
|
19
|
+
*/
|
|
20
|
+
declare function getTsconfigFilePath(cwd: string, root: string, tsconfig?: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the path to the tsconfig.json file.
|
|
23
|
+
*
|
|
24
|
+
* @param cwd - The root directory of the workspace.
|
|
25
|
+
* @param root - The root directory of the project.
|
|
26
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
27
|
+
* @returns The absolute path to the tsconfig.json file.
|
|
28
|
+
* @throws If the tsconfig.json file does not exist.
|
|
29
|
+
*/
|
|
30
|
+
declare function tryTsconfigFilePath(cwd: string, root: string, tsconfig: string): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
33
|
+
*
|
|
34
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
35
|
+
* @param types - An array of type names to check against.
|
|
36
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
declare function findMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[], extensions?: string[]): string | RegExp | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
41
|
+
*
|
|
42
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
43
|
+
* @param types - An array of type names to check against.
|
|
44
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
45
|
+
*/
|
|
46
|
+
declare function findIncludeMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): string | RegExp | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
49
|
+
*
|
|
50
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
51
|
+
* @param types - An array of type names to check against.
|
|
52
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
53
|
+
*/
|
|
54
|
+
declare function isMatchFound(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
57
|
+
*
|
|
58
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
59
|
+
* @param types - An array of type names to check against.
|
|
60
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
declare function isIncludeMatchFound(tsconfigType: FilterPattern, types: FilterPattern[]): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Get the parsed TypeScript configuration.
|
|
65
|
+
*
|
|
66
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
67
|
+
* @param projectRoot - The root directory of the project.
|
|
68
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
69
|
+
* @param tsconfigRaw - The raw tsconfig.json content.
|
|
70
|
+
* @param originalTsconfigJson - The original tsconfig.json content.
|
|
71
|
+
* @param host - The TypeScript parse config host.
|
|
72
|
+
* @returns The resolved TypeScript configuration.
|
|
73
|
+
*/
|
|
74
|
+
declare function getParsedTypeScriptConfig(workspaceRoot: string, projectRoot: string, tsconfig?: string, tsconfigRaw?: TSConfig, originalTsconfigJson?: TSConfig, host?: ts.ParseConfigHost): ParsedTypeScriptConfig;
|
|
75
|
+
//#endregion
|
|
76
|
+
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
77
|
+
//# sourceMappingURL=tsconfig.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsconfig.d.cts","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"mappings":";;;;;;;iBAyCgB,kBAAA,yBACU,cAAA,GAAiB,cAAA,2BAAA,CAEzC,OAAA,EAAS,kBAAA,CAAmB,eAAA,EAAiB,cAAA;AAAA,iBAiJzB,kBAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,kBAAA,CAAmB,eAAA,EAAiB,cAAA,IACnD,kBAAA,CAAmB,eAAA,EAAiB,cAAA,EAAA,CACtC,OAAA,EAAS,QAAA,GAAW,OAAA;AAAA,iBA2CA,eAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,kBAAA,CAAmB,eAAA,EAAiB,cAAA,IACnD,kBAAA,CAAmB,eAAA,EAAiB,cAAA,EAAA,CACtC,OAAA,EAAS,QAAA,GAAW,OAAA;;;;;;;;;;iBA+GN,mBAAA,CACd,GAAA,UACA,IAAA,UACA,QAAA;;;;;;;;;;iBAmCc,mBAAA,CACd,GAAA,UACA,IAAA,UACA,QAAA;;;;;;;;iBAuBc,SAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA,YACjB,UAAA,uBACU,MAAA;;;;;;;;iBAkCI,gBAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA,sBACP,MAAA;;;;;;;;iBAuCI,YAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA;;;;;;;AAtQnB;iBAkRgB,mBAAA,CACd,YAAA,EAAc,aAAA,EACd,KAAA,EAAO,aAAA;;;;;;;;;;;;iBAqBO,yBAAA,CACd,aAAA,UACA,WAAA,UACA,QAAA,WACA,WAAA,GAAa,QAAA,EACb,oBAAA,GAAuB,QAAA,EACvB,IAAA,GAAM,EAAA,CAAG,eAAA,GACR,sBAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ParsedTypeScriptConfig, TSConfig } from "../../types/tsconfig.mjs";
|
|
2
|
+
import { EnvironmentContext } from "../../types/context.mjs";
|
|
3
|
+
import { ResolvedConfig } from "../../types/config.mjs";
|
|
4
|
+
import ts from "typescript";
|
|
5
|
+
import { FilterPattern } from "@stryke/types/file";
|
|
6
|
+
|
|
7
|
+
//#region src/lib/typescript/tsconfig.d.ts
|
|
8
|
+
declare function getTsconfigDtsPath<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(context: EnvironmentContext<TResolvedConfig, TSystemContext>): string;
|
|
9
|
+
declare function initializeTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
10
|
+
declare function resolveTsconfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends EnvironmentContext<TResolvedConfig, TSystemContext> = EnvironmentContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the path to the tsconfig.json file.
|
|
13
|
+
*
|
|
14
|
+
* @param cwd - The root directory of the workspace.
|
|
15
|
+
* @param root - The root directory of the project.
|
|
16
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
17
|
+
* @returns The absolute path to the tsconfig.json file.
|
|
18
|
+
* @throws If the tsconfig.json file does not exist.
|
|
19
|
+
*/
|
|
20
|
+
declare function getTsconfigFilePath(cwd: string, root: string, tsconfig?: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the path to the tsconfig.json file.
|
|
23
|
+
*
|
|
24
|
+
* @param cwd - The root directory of the workspace.
|
|
25
|
+
* @param root - The root directory of the project.
|
|
26
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
27
|
+
* @returns The absolute path to the tsconfig.json file.
|
|
28
|
+
* @throws If the tsconfig.json file does not exist.
|
|
29
|
+
*/
|
|
30
|
+
declare function tryTsconfigFilePath(cwd: string, root: string, tsconfig: string): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
33
|
+
*
|
|
34
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
35
|
+
* @param types - An array of type names to check against.
|
|
36
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
declare function findMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[], extensions?: string[]): string | RegExp | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
41
|
+
*
|
|
42
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
43
|
+
* @param types - An array of type names to check against.
|
|
44
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
45
|
+
*/
|
|
46
|
+
declare function findIncludeMatch(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): string | RegExp | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
49
|
+
*
|
|
50
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
51
|
+
* @param types - An array of type names to check against.
|
|
52
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
53
|
+
*/
|
|
54
|
+
declare function isMatchFound(tsconfigType: string | RegExp | null, types: (string | RegExp | null)[]): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Check if the TypeScript configuration type matches any of the provided types.
|
|
57
|
+
*
|
|
58
|
+
* @param tsconfigType - The type from the TypeScript configuration.
|
|
59
|
+
* @param types - An array of type names to check against.
|
|
60
|
+
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
declare function isIncludeMatchFound(tsconfigType: FilterPattern, types: FilterPattern[]): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Get the parsed TypeScript configuration.
|
|
65
|
+
*
|
|
66
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
67
|
+
* @param projectRoot - The root directory of the project.
|
|
68
|
+
* @param tsconfig - The path to the tsconfig.json file.
|
|
69
|
+
* @param tsconfigRaw - The raw tsconfig.json content.
|
|
70
|
+
* @param originalTsconfigJson - The original tsconfig.json content.
|
|
71
|
+
* @param host - The TypeScript parse config host.
|
|
72
|
+
* @returns The resolved TypeScript configuration.
|
|
73
|
+
*/
|
|
74
|
+
declare function getParsedTypeScriptConfig(workspaceRoot: string, projectRoot: string, tsconfig?: string, tsconfigRaw?: TSConfig, originalTsconfigJson?: TSConfig, host?: ts.ParseConfigHost): ParsedTypeScriptConfig;
|
|
75
|
+
//#endregion
|
|
76
|
+
export { findIncludeMatch, findMatch, getParsedTypeScriptConfig, getTsconfigDtsPath, getTsconfigFilePath, initializeTsconfig, isIncludeMatchFound, isMatchFound, resolveTsconfig, tryTsconfigFilePath };
|
|
77
|
+
//# sourceMappingURL=tsconfig.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsconfig.d.mts","names":[],"sources":["../../../src/lib/typescript/tsconfig.ts"],"mappings":";;;;;;;iBAyCgB,kBAAA,yBACU,cAAA,GAAiB,cAAA,2BAAA,CAEzC,OAAA,EAAS,kBAAA,CAAmB,eAAA,EAAiB,cAAA;AAAA,iBAiJzB,kBAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,kBAAA,CAAmB,eAAA,EAAiB,cAAA,IACnD,kBAAA,CAAmB,eAAA,EAAiB,cAAA,EAAA,CACtC,OAAA,EAAS,QAAA,GAAW,OAAA;AAAA,iBA2CA,eAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,kBAAA,CAAmB,eAAA,EAAiB,cAAA,IACnD,kBAAA,CAAmB,eAAA,EAAiB,cAAA,EAAA,CACtC,OAAA,EAAS,QAAA,GAAW,OAAA;;;;;;;;;;iBA+GN,mBAAA,CACd,GAAA,UACA,IAAA,UACA,QAAA;;;;;;;;;;iBAmCc,mBAAA,CACd,GAAA,UACA,IAAA,UACA,QAAA;;;;;;;;iBAuBc,SAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA,YACjB,UAAA,uBACU,MAAA;;;;;;;;iBAkCI,gBAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA,sBACP,MAAA;;;;;;;;iBAuCI,YAAA,CACd,YAAA,WAAuB,MAAA,SACvB,KAAA,YAAiB,MAAA;;;;;;;AAtQnB;iBAkRgB,mBAAA,CACd,YAAA,EAAc,aAAA,EACd,KAAA,EAAO,aAAA;;;;;;;;;;;;iBAqBO,yBAAA,CACd,aAAA,UACA,WAAA,UACA,QAAA,WACA,WAAA,GAAa,QAAA,EACb,oBAAA,GAAuB,QAAA,EACvB,IAAA,GAAM,EAAA,CAAG,eAAA,GACR,sBAAA"}
|