powerlines 0.23.10 → 0.24.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/{api-5H3zEedD.d.ts → api-C32Buv5_.d.ts} +1 -1
- package/dist/{api-B77aqxGC.d.cts → api-wzd5AREv.d.cts} +1 -1
- package/dist/api.cjs +2 -2
- package/dist/api.d.cts +4 -2
- package/dist/api.d.ts +4 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.d.cts +3 -1
- package/dist/astro.d.ts +3 -1
- package/dist/astro.js +3 -3
- package/dist/chunk-2TWFBWKA.cjs +133 -0
- package/dist/{chunk-3W5CN3M3.js → chunk-7V3LWCLB.js} +1 -1
- package/dist/chunk-EXQM3KGH.js +130 -0
- package/dist/{chunk-4EIGDACJ.cjs → chunk-FGH3MZTQ.cjs} +523 -649
- package/dist/{chunk-SNHUEYEP.cjs → chunk-FPB2O7FD.cjs} +2 -2
- package/dist/{chunk-ZIWN73GA.js → chunk-H74SWU2C.js} +1 -1
- package/dist/{chunk-WBC2XOMT.cjs → chunk-HTGCHSLH.cjs} +2 -2
- package/dist/{chunk-PR3JGGAL.cjs → chunk-TIBYAWZZ.cjs} +2 -2
- package/dist/{chunk-SS5AXCGJ.js → chunk-ZEE73BCY.js} +1 -1
- package/dist/{chunk-MUNYXQYT.js → chunk-ZT2J55YE.js} +526 -649
- package/dist/config.d.cts +3 -1
- package/dist/config.d.ts +3 -1
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.d.cts +3 -1
- package/dist/esbuild.d.ts +3 -1
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.d.cts +3 -1
- package/dist/farm.d.ts +3 -1
- package/dist/farm.js +2 -2
- package/dist/index.cjs +11 -23
- package/dist/index.d.cts +6 -135
- package/dist/index.d.ts +6 -135
- package/dist/index.js +2 -2
- package/dist/lib/{api-Cm51oVbC.d.cts → api-BRMITKt-.d.cts} +1 -1
- package/dist/lib/{api-mja4jirh.d.ts → api-CDUN9en8.d.ts} +1 -1
- package/dist/lib/build/esbuild.d.cts +3 -1
- package/dist/lib/build/esbuild.d.ts +3 -1
- package/dist/lib/build/index.d.cts +5 -3
- package/dist/lib/build/index.d.ts +5 -3
- package/dist/lib/build/rolldown.d.cts +3 -1
- package/dist/lib/build/rolldown.d.ts +3 -1
- package/dist/lib/build/rollup.d.cts +3 -1
- package/dist/lib/build/rollup.d.ts +3 -1
- package/dist/lib/build/rspack.d.cts +3 -1
- package/dist/lib/build/rspack.d.ts +3 -1
- package/dist/lib/build/tsup.d.cts +3 -1
- package/dist/lib/build/tsup.d.ts +3 -1
- package/dist/lib/build/unbuild.d.cts +5 -3
- package/dist/lib/build/unbuild.d.ts +5 -3
- package/dist/lib/build/vite.d.cts +3 -1
- package/dist/lib/build/vite.d.ts +3 -1
- package/dist/lib/build/webpack.d.cts +3 -1
- package/dist/lib/build/webpack.d.ts +3 -1
- package/dist/lib/{chunk-52VDUP5J.js → chunk-6I5PL7H2.js} +5 -17
- package/dist/lib/{chunk-UPVFKXB7.cjs → chunk-6PPZCPME.cjs} +1 -2
- package/dist/lib/{chunk-HNOAMIRO.js → chunk-7CVPZOH4.js} +2 -2
- package/dist/lib/{chunk-SEWUUTNA.js → chunk-A2NFSQ5K.js} +1 -1
- package/dist/lib/{chunk-I6TJUFA6.cjs → chunk-AA6RBP44.cjs} +10 -10
- package/dist/lib/{chunk-VDPCG3RR.js → chunk-CGRHZJY5.js} +41 -82
- package/dist/lib/{chunk-OJ5XFCZN.js → chunk-DFW5FGEO.js} +1 -1
- package/dist/lib/{chunk-VL63QEPF.cjs → chunk-DUZJ7ZF2.cjs} +2 -2
- package/dist/lib/{chunk-EFYMNU53.cjs → chunk-EV357RFB.cjs} +5 -17
- package/dist/lib/{chunk-54XNJQTH.js → chunk-HAXL7QE7.js} +3 -3
- package/dist/lib/{chunk-XG4CC73V.js → chunk-KFWMKDJQ.js} +391 -589
- package/dist/lib/{chunk-RBSNQFLF.cjs → chunk-MS3CD2U6.cjs} +49 -91
- package/dist/lib/{chunk-QABAD5RE.cjs → chunk-RNHKEPFD.cjs} +387 -586
- package/dist/lib/{chunk-4EIXDLFP.cjs → chunk-SAS5EPBD.cjs} +7 -5
- package/dist/lib/{chunk-EUDKQWSB.js → chunk-VHLINWXG.js} +1 -2
- package/dist/lib/{chunk-VLOUSKRX.cjs → chunk-VMLQATMA.cjs} +4 -4
- package/dist/lib/{chunk-IBPA3VN5.cjs → chunk-WUYK74EH.cjs} +3 -3
- package/dist/lib/{chunk-RD5AUWXN.js → chunk-YQ3ODCHV.js} +7 -5
- package/dist/lib/{config-BnJpgcGr.d.cts → config-D8KrE7SZ.d.cts} +109 -35
- package/dist/lib/{config-7Q2dBjJE.d.ts → config-DBIFdRoq.d.ts} +109 -35
- package/dist/lib/config-file.d.cts +3 -1
- package/dist/lib/config-file.d.ts +3 -1
- package/dist/lib/contexts/api-context.cjs +5 -4
- package/dist/lib/contexts/api-context.d.cts +5 -3
- package/dist/lib/contexts/api-context.d.ts +5 -3
- package/dist/lib/contexts/api-context.js +4 -3
- package/dist/lib/contexts/context.cjs +3 -2
- package/dist/lib/contexts/context.d.cts +47 -4
- package/dist/lib/contexts/context.d.ts +47 -4
- package/dist/lib/contexts/context.js +2 -1
- package/dist/lib/contexts/environment-context.cjs +4 -3
- package/dist/lib/contexts/environment-context.d.cts +5 -3
- package/dist/lib/contexts/environment-context.d.ts +5 -3
- package/dist/lib/contexts/environment-context.js +3 -2
- package/dist/lib/contexts/index.cjs +7 -6
- package/dist/lib/contexts/index.d.cts +5 -3
- package/dist/lib/contexts/index.d.ts +5 -3
- package/dist/lib/contexts/index.js +4 -3
- package/dist/lib/contexts/plugin-context.d.cts +5 -3
- package/dist/lib/contexts/plugin-context.d.ts +5 -3
- package/dist/lib/entry.d.cts +3 -1
- package/dist/lib/entry.d.ts +3 -1
- package/dist/lib/index.cjs +39 -45
- package/dist/lib/index.d.cts +67 -48
- package/dist/lib/index.d.ts +67 -48
- package/dist/lib/index.js +12 -14
- package/dist/lib/{internal-BEygquYh.d.ts → internal-1qCyw7bA.d.ts} +2 -2
- package/dist/lib/{internal-BeR8fOB1.d.cts → internal-CaGANOWK.d.cts} +2 -2
- package/dist/lib/logger.d.cts +3 -1
- package/dist/lib/logger.d.ts +3 -1
- package/dist/lib/typescript/compiler-host.cjs +7 -7
- package/dist/lib/typescript/compiler-host.d.cts +3 -1
- package/dist/lib/typescript/compiler-host.d.ts +3 -1
- package/dist/lib/typescript/compiler-host.js +6 -6
- package/dist/lib/typescript/import-transformer.cjs +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +3 -1
- package/dist/lib/typescript/import-transformer.d.ts +3 -1
- package/dist/lib/typescript/import-transformer.js +1 -1
- package/dist/lib/typescript/index.cjs +8 -8
- package/dist/lib/typescript/index.d.cts +3 -2
- package/dist/lib/typescript/index.d.ts +3 -2
- package/dist/lib/typescript/index.js +2 -2
- package/dist/lib/typescript/program.cjs +6 -6
- package/dist/lib/typescript/program.d.cts +3 -1
- package/dist/lib/typescript/program.d.ts +3 -1
- package/dist/lib/typescript/program.js +1 -1
- package/dist/lib/typescript/ts-morph.cjs +2 -2
- package/dist/lib/typescript/ts-morph.d.cts +5 -3
- package/dist/lib/typescript/ts-morph.d.ts +5 -3
- package/dist/lib/typescript/ts-morph.js +1 -1
- package/dist/lib/unplugin/factory.cjs +6 -6
- package/dist/lib/unplugin/factory.d.cts +5 -3
- package/dist/lib/unplugin/factory.d.ts +5 -3
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/helpers.d.cts +3 -1
- package/dist/lib/unplugin/helpers.d.ts +3 -1
- package/dist/lib/unplugin/index.cjs +11 -11
- package/dist/lib/unplugin/index.d.cts +6 -4
- package/dist/lib/unplugin/index.d.ts +6 -4
- package/dist/lib/unplugin/index.js +7 -7
- package/dist/lib/unplugin/plugin.cjs +2 -3
- package/dist/lib/unplugin/plugin.d.cts +6 -4
- package/dist/lib/unplugin/plugin.d.ts +6 -4
- package/dist/lib/unplugin/plugin.js +1 -2
- package/dist/lib/{unplugin-CbbNDduM.d.ts → unplugin-CEeJqADD.d.ts} +2 -2
- package/dist/lib/{unplugin-ppAOzR__.d.cts → unplugin-bUSyjd0S.d.cts} +2 -2
- package/dist/lib/utilities/bundle.cjs +2 -3
- package/dist/lib/utilities/bundle.d.cts +3 -1
- package/dist/lib/utilities/bundle.d.ts +3 -1
- package/dist/lib/utilities/bundle.js +1 -2
- package/dist/lib/utilities/cache.d.cts +3 -1
- package/dist/lib/utilities/cache.d.ts +3 -1
- package/dist/lib/utilities/file-header.d.cts +3 -1
- package/dist/lib/utilities/file-header.d.ts +3 -1
- package/dist/lib/utilities/index.cjs +14 -19
- package/dist/lib/utilities/index.d.cts +3 -2
- package/dist/lib/utilities/index.d.ts +3 -2
- package/dist/lib/utilities/index.js +4 -5
- package/dist/lib/utilities/meta.d.cts +3 -1
- package/dist/lib/utilities/meta.d.ts +3 -1
- package/dist/lib/utilities/resolve.cjs +3 -4
- package/dist/lib/utilities/resolve.d.cts +3 -1
- package/dist/lib/utilities/resolve.d.ts +3 -1
- package/dist/lib/utilities/resolve.js +2 -3
- package/dist/lib/utilities/source-file.d.cts +3 -1
- package/dist/lib/utilities/source-file.d.ts +3 -1
- package/dist/lib/utilities/source-map.d.cts +3 -1
- package/dist/lib/utilities/source-map.d.ts +3 -1
- package/dist/lib/utilities/worker.d.cts +3 -1
- package/dist/lib/utilities/worker.d.ts +3 -1
- package/dist/lib/utilities/write-file.d.cts +3 -1
- package/dist/lib/utilities/write-file.d.ts +3 -1
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +6 -6
- package/dist/nuxt.js +4 -4
- package/dist/plugin-utils/{context-Cg11S-CE.d.cts → context-BITGF5LZ.d.cts} +118 -39
- package/dist/plugin-utils/{context-Cg11S-CE.d.ts → context-BITGF5LZ.d.ts} +118 -39
- package/dist/plugin-utils/context-helpers.d.cts +4 -1
- package/dist/plugin-utils/context-helpers.d.ts +4 -1
- package/dist/plugin-utils/enforce.d.cts +4 -1
- package/dist/plugin-utils/enforce.d.ts +4 -1
- package/dist/plugin-utils/extend.d.cts +4 -1
- package/dist/plugin-utils/extend.d.ts +4 -1
- package/dist/plugin-utils/get-config-path.d.cts +4 -1
- package/dist/plugin-utils/get-config-path.d.ts +4 -1
- package/dist/plugin-utils/helpers.d.cts +4 -1
- package/dist/plugin-utils/helpers.d.ts +4 -1
- package/dist/plugin-utils/index.d.cts +4 -1
- package/dist/plugin-utils/index.d.ts +4 -1
- package/dist/plugin-utils/merge.d.cts +4 -1
- package/dist/plugin-utils/merge.d.ts +4 -1
- package/dist/plugin-utils/paths.d.cts +4 -1
- package/dist/plugin-utils/paths.d.ts +4 -1
- package/dist/{resolved-B3BSdXCt.d.ts → resolved-BABoCnXm.d.ts} +43 -1
- package/dist/{resolved-DGrpILrS.d.cts → resolved-CSqGKlA5.d.cts} +43 -1
- package/dist/rolldown.cjs +3 -3
- package/dist/rolldown.d.cts +3 -1
- package/dist/rolldown.d.ts +3 -1
- package/dist/rolldown.js +2 -2
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.d.cts +3 -1
- package/dist/rollup.d.ts +3 -1
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.d.cts +3 -1
- package/dist/rspack.d.ts +3 -1
- package/dist/rspack.js +2 -2
- package/dist/tsup.cjs +4 -4
- package/dist/tsup.js +3 -3
- package/dist/types/api.d.cts +4 -2
- package/dist/types/api.d.ts +4 -2
- package/dist/types/babel.d.cts +3 -1
- package/dist/types/babel.d.ts +3 -1
- package/dist/types/commands.d.cts +3 -1
- package/dist/types/commands.d.ts +3 -1
- package/dist/types/config.d.cts +3 -1
- package/dist/types/config.d.ts +3 -1
- package/dist/types/context.d.cts +3 -1
- package/dist/types/context.d.ts +3 -1
- package/dist/types/fs.d.cts +68 -36
- package/dist/types/fs.d.ts +68 -36
- package/dist/types/hooks.d.cts +3 -1
- package/dist/types/hooks.d.ts +3 -1
- package/dist/types/index.d.cts +5 -3
- package/dist/types/index.d.ts +5 -3
- package/dist/types/internal.d.cts +4 -2
- package/dist/types/internal.d.ts +4 -2
- package/dist/types/plugin.d.cts +3 -1
- package/dist/types/plugin.d.ts +3 -1
- package/dist/types/resolved.d.cts +3 -1
- package/dist/types/resolved.d.ts +3 -1
- package/dist/types/unplugin.d.cts +4 -2
- package/dist/types/unplugin.d.ts +4 -2
- package/dist/unloader.cjs +3 -3
- package/dist/unloader.d.cts +3 -1
- package/dist/unloader.d.ts +3 -1
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +12 -28
- package/dist/unplugin.d.cts +104 -31
- package/dist/unplugin.d.ts +104 -31
- package/dist/unplugin.js +10 -23
- package/dist/vite.cjs +6 -6
- package/dist/vite.d.cts +3 -1
- package/dist/vite.d.ts +3 -1
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.d.cts +3 -1
- package/dist/webpack.d.ts +3 -1
- package/dist/webpack.js +3 -3
- package/package.json +17 -16
- package/schemas/fs.capnp +35 -38
- package/dist/chunk-4TBQYHPZ.cjs +0 -234
- package/dist/chunk-7G7OFGGH.js +0 -230
- package/dist/lib/chunk-G7S5PIAC.js +0 -89
- package/dist/lib/chunk-MZJWK36Q.cjs +0 -37
- package/dist/lib/chunk-NWAD7K4D.js +0 -35
- package/dist/lib/chunk-ZBDVQVUK.cjs +0 -91
- package/dist/lib/unplugin/resolve-id.cjs +0 -11
- package/dist/lib/unplugin/resolve-id.d.cts +0 -57
- package/dist/lib/unplugin/resolve-id.d.ts +0 -57
- package/dist/lib/unplugin/resolve-id.js +0 -2
- package/dist/lib/utilities/resolve-path.cjs +0 -11
- package/dist/lib/utilities/resolve-path.d.cts +0 -40
- package/dist/lib/utilities/resolve-path.d.ts +0 -40
- package/dist/lib/utilities/resolve-path.js +0 -2
- /package/dist/lib/{chunk-HMO3LAYL.js → chunk-I2DQRMX3.js} +0 -0
- /package/dist/lib/{chunk-EJ25PQEL.cjs → chunk-YK4PYVLM.cjs} +0 -0
|
@@ -20,8 +20,10 @@ import { Worker } from 'jest-worker';
|
|
|
20
20
|
import { Jiti } from 'jiti';
|
|
21
21
|
import MagicString, { SourceMap } from 'magic-string';
|
|
22
22
|
import { Range } from 'semver';
|
|
23
|
+
import { Project } from 'ts-morph';
|
|
23
24
|
import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
|
|
24
|
-
import {
|
|
25
|
+
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
26
|
+
import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
25
27
|
import { ArrayValues } from '@stryke/types/array';
|
|
26
28
|
import { P as ParsedTypeScriptConfig, T as TSConfig } from './tsconfig-Bz-CiFqD.js';
|
|
27
29
|
|
|
@@ -112,21 +114,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
|
112
114
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
113
115
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
114
116
|
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
115
|
-
interface
|
|
117
|
+
interface ResolveOptions extends ResolveOptions$1 {
|
|
116
118
|
/**
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
* If true, the module is being resolved as an entry point.
|
|
120
|
+
*/
|
|
121
|
+
isEntry?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* If true, the resolver will skip using the cache when resolving modules.
|
|
124
|
+
*/
|
|
125
|
+
skipCache?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* An array of external modules or patterns to exclude from resolution.
|
|
120
128
|
*/
|
|
121
|
-
|
|
129
|
+
external?: (string | RegExp)[];
|
|
122
130
|
/**
|
|
123
|
-
*
|
|
131
|
+
* An array of modules or patterns to include in the resolution, even if they are marked as external.
|
|
124
132
|
*/
|
|
125
|
-
|
|
133
|
+
noExternal?: (string | RegExp)[];
|
|
126
134
|
/**
|
|
127
|
-
*
|
|
135
|
+
* An array of patterns to match when resolving modules.
|
|
128
136
|
*/
|
|
129
|
-
|
|
137
|
+
skipNodeModulesBundle?: boolean;
|
|
130
138
|
}
|
|
131
139
|
interface VirtualFileSystemInterface {
|
|
132
140
|
/**
|
|
@@ -140,27 +148,33 @@ interface VirtualFileSystemInterface {
|
|
|
140
148
|
/**
|
|
141
149
|
* The underlying file metadata.
|
|
142
150
|
*/
|
|
143
|
-
metadata: Record<string, VirtualFileMetadata
|
|
151
|
+
metadata: Readonly<Record<string, VirtualFileMetadata>>;
|
|
152
|
+
/**
|
|
153
|
+
* A map of file paths to their module ids.
|
|
154
|
+
*/
|
|
155
|
+
ids: Readonly<Record<string, string>>;
|
|
144
156
|
/**
|
|
145
157
|
* A map of module ids to their file paths.
|
|
146
158
|
*/
|
|
147
|
-
|
|
159
|
+
paths: Readonly<Record<string, string>>;
|
|
148
160
|
/**
|
|
149
161
|
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
150
162
|
*
|
|
151
163
|
* @param pathOrId - The path or id to check.
|
|
164
|
+
* @param importer - The importer path, if any.
|
|
152
165
|
* @param options - Optional parameters for resolving the path.
|
|
153
166
|
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
154
167
|
*/
|
|
155
|
-
isVirtual: (pathOrId: string, options?:
|
|
168
|
+
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
156
169
|
/**
|
|
157
170
|
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
158
171
|
*
|
|
159
172
|
* @param pathOrId - The path or id to check.
|
|
173
|
+
* @param importer - The importer path, if any.
|
|
160
174
|
* @param options - Optional parameters for resolving the path.
|
|
161
175
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
162
176
|
*/
|
|
163
|
-
isPhysical: (pathOrId: string, options?:
|
|
177
|
+
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
164
178
|
/**
|
|
165
179
|
* Checks if a file exists in the virtual file system (VFS).
|
|
166
180
|
*
|
|
@@ -188,7 +202,7 @@ interface VirtualFileSystemInterface {
|
|
|
188
202
|
* @param pathOrId - The path or id of the file.
|
|
189
203
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
190
204
|
*/
|
|
191
|
-
getMetadata: (pathOrId:
|
|
205
|
+
getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
|
|
192
206
|
/**
|
|
193
207
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
194
208
|
*
|
|
@@ -261,7 +275,7 @@ interface VirtualFileSystemInterface {
|
|
|
261
275
|
* @param path - The path to the file to remove.
|
|
262
276
|
* @returns A promise that resolves when the file is removed.
|
|
263
277
|
*/
|
|
264
|
-
unlinkSync: (path:
|
|
278
|
+
unlinkSync: (path: string, options?: ResolveFSOptions) => void;
|
|
265
279
|
/**
|
|
266
280
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
267
281
|
*
|
|
@@ -275,7 +289,7 @@ interface VirtualFileSystemInterface {
|
|
|
275
289
|
* @param path - The path to create the directory at.
|
|
276
290
|
* @param options - Options for creating the directory.
|
|
277
291
|
*/
|
|
278
|
-
rmdirSync: (path:
|
|
292
|
+
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
279
293
|
/**
|
|
280
294
|
* Removes a directory in the virtual file system (VFS).
|
|
281
295
|
*
|
|
@@ -283,7 +297,7 @@ interface VirtualFileSystemInterface {
|
|
|
283
297
|
* @param options - Options for creating the directory.
|
|
284
298
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
285
299
|
*/
|
|
286
|
-
rmdir: (path:
|
|
300
|
+
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
287
301
|
/**
|
|
288
302
|
* Removes a file or directory in the virtual file system (VFS).
|
|
289
303
|
*
|
|
@@ -291,14 +305,14 @@ interface VirtualFileSystemInterface {
|
|
|
291
305
|
* @param options - Options for removing the file or directory.
|
|
292
306
|
* @returns A promise that resolves when the file or directory is removed.
|
|
293
307
|
*/
|
|
294
|
-
rm: (path:
|
|
308
|
+
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
295
309
|
/**
|
|
296
310
|
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
297
311
|
*
|
|
298
312
|
* @param path - The path to the file or directory to remove.
|
|
299
313
|
* @param options - Options for removing the file or directory.
|
|
300
314
|
*/
|
|
301
|
-
rmSync: (path:
|
|
315
|
+
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
302
316
|
/**
|
|
303
317
|
* Creates a directory in the virtual file system (VFS).
|
|
304
318
|
*
|
|
@@ -306,7 +320,7 @@ interface VirtualFileSystemInterface {
|
|
|
306
320
|
* @param options - Options for creating the directory.
|
|
307
321
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
308
322
|
*/
|
|
309
|
-
mkdirSync: (path:
|
|
323
|
+
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
310
324
|
/**
|
|
311
325
|
* Creates a directory in the virtual file system (VFS).
|
|
312
326
|
*
|
|
@@ -314,7 +328,7 @@ interface VirtualFileSystemInterface {
|
|
|
314
328
|
* @param options - Options for creating the directory.
|
|
315
329
|
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
316
330
|
*/
|
|
317
|
-
mkdir: (path:
|
|
331
|
+
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
318
332
|
/**
|
|
319
333
|
* Reads a file from the virtual file system (VFS).
|
|
320
334
|
*
|
|
@@ -336,7 +350,7 @@ interface VirtualFileSystemInterface {
|
|
|
336
350
|
* @param options - Optional parameters for writing the file.
|
|
337
351
|
* @returns A promise that resolves when the file is written.
|
|
338
352
|
*/
|
|
339
|
-
writeFile: (path:
|
|
353
|
+
writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
|
|
340
354
|
/**
|
|
341
355
|
* Writes a file to the virtual file system (VFS).
|
|
342
356
|
*
|
|
@@ -344,7 +358,7 @@ interface VirtualFileSystemInterface {
|
|
|
344
358
|
* @param data - The contents of the file.
|
|
345
359
|
* @param options - Optional parameters for writing the file.
|
|
346
360
|
*/
|
|
347
|
-
writeFileSync: (path:
|
|
361
|
+
writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
|
|
348
362
|
/**
|
|
349
363
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
350
364
|
*
|
|
@@ -391,24 +405,43 @@ interface VirtualFileSystemInterface {
|
|
|
391
405
|
* Resolves a path or id to a file path in the virtual file system.
|
|
392
406
|
*
|
|
393
407
|
* @param pathOrId - The path or id of the file to resolve.
|
|
394
|
-
* @param options - Optional parameters for resolving the path.
|
|
395
408
|
* @returns The resolved path of the file if it exists, otherwise false.
|
|
396
409
|
*/
|
|
397
|
-
|
|
410
|
+
realpathSync: (pathOrId: string) => string;
|
|
398
411
|
/**
|
|
399
|
-
*
|
|
412
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
400
413
|
*
|
|
401
|
-
* @
|
|
402
|
-
*
|
|
414
|
+
* @remarks
|
|
415
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```ts
|
|
419
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
420
|
+
* ```
|
|
421
|
+
*
|
|
422
|
+
* @param id - The module to resolve.
|
|
423
|
+
* @param importer - An optional path to the importer module.
|
|
424
|
+
* @param options - Additional resolution options.
|
|
425
|
+
* @returns A promise that resolves to the resolved module path.
|
|
403
426
|
*/
|
|
404
|
-
|
|
427
|
+
resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
|
|
405
428
|
/**
|
|
406
|
-
*
|
|
429
|
+
* A synchronous helper function to resolve modules using the Jiti resolver
|
|
407
430
|
*
|
|
408
|
-
* @
|
|
409
|
-
*
|
|
431
|
+
* @remarks
|
|
432
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
433
|
+
*
|
|
434
|
+
* @example
|
|
435
|
+
* ```ts
|
|
436
|
+
* const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
|
|
437
|
+
* ```
|
|
438
|
+
*
|
|
439
|
+
* @param id - The module to resolve.
|
|
440
|
+
* @param importer - An optional path to the importer module.
|
|
441
|
+
* @param options - Additional resolution options.
|
|
442
|
+
* @returns The resolved module path.
|
|
410
443
|
*/
|
|
411
|
-
|
|
444
|
+
resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
|
|
412
445
|
/**
|
|
413
446
|
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
414
447
|
*/
|
|
@@ -1123,6 +1156,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1123
1156
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
1124
1157
|
*/
|
|
1125
1158
|
builtins: string[];
|
|
1159
|
+
/**
|
|
1160
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
1161
|
+
*
|
|
1162
|
+
* @see https://ts-morph.com/
|
|
1163
|
+
*
|
|
1164
|
+
* @remarks
|
|
1165
|
+
* This instance is created lazily on first access.
|
|
1166
|
+
*/
|
|
1167
|
+
program: Project;
|
|
1168
|
+
/**
|
|
1169
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
1170
|
+
*
|
|
1171
|
+
* @remarks
|
|
1172
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
1173
|
+
*
|
|
1174
|
+
* @example
|
|
1175
|
+
* ```ts
|
|
1176
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
1177
|
+
* ```
|
|
1178
|
+
*
|
|
1179
|
+
* @param id - The module to resolve.
|
|
1180
|
+
* @param importer - An optional path to the importer module.
|
|
1181
|
+
* @param options - Additional resolution options.
|
|
1182
|
+
* @returns A promise that resolves to the resolved module path.
|
|
1183
|
+
*/
|
|
1184
|
+
resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1185
|
+
/**
|
|
1186
|
+
* A helper function to load modules using the Jiti resolver
|
|
1187
|
+
*
|
|
1188
|
+
* @remarks
|
|
1189
|
+
* This function can be used to load modules relative to the project root directory.
|
|
1190
|
+
*
|
|
1191
|
+
* @example
|
|
1192
|
+
* ```ts
|
|
1193
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
1194
|
+
* ```
|
|
1195
|
+
*
|
|
1196
|
+
* @param id - The module to load.
|
|
1197
|
+
* @returns A promise that resolves to the loaded module.
|
|
1198
|
+
*/
|
|
1199
|
+
load: (id: string) => Promise<TransformResult | undefined>;
|
|
1126
1200
|
/**
|
|
1127
1201
|
* The Powerlines builtin virtual files
|
|
1128
1202
|
*/
|
|
@@ -1657,4 +1731,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineCon
|
|
|
1657
1731
|
command: "deploy";
|
|
1658
1732
|
};
|
|
1659
1733
|
|
|
1660
|
-
export { type BuildInlineConfig as $, type APIContext as A, type
|
|
1734
|
+
export { type BuildInlineConfig as $, type APIContext as A, type InferHookParameters as B, type Context as C, type InferHookReturnType as D, type ESBuildResolvedBuildConfig as E, type UnpluginBuildVariant as F, type InferResolvedConfig as G, type HooksList as H, type InitialUserConfig as I, type InferUnpluginVariant as J, type BuildPlugin as K, type LogFn as L, type MakeDirectoryOptions as M, type InferUserConfig as N, type SourceFile as O, type PowerlinesCommand as P, type WorkerProcess as Q, type ResolveOptions as R, type SelectHooksOptions as S, type TsupBuildConfig as T, type UnbuildBuildConfig as U, type VirtualFileSystemInterface as V, type WriteFileData as W, type PrepareInlineConfig as X, type NewInlineConfig as Y, type CleanInlineConfig as Z, __VFS_PATCH__ as _, type VirtualFileMetadata as a, type LintInlineConfig as a0, type DocsInlineConfig as a1, type DeployInlineConfig as a2, type ResolveFSOptions as b, type WriteFileOptions as c, __VFS_REVERT__ as d, type WorkspaceConfig as e, type ParsedUserConfig as f, type ResolvedEntryTypeDefinition as g, type RolldownResolvedBuildConfig as h, type RollupResolvedBuildConfig as i, type TsupResolvedBuildConfig as j, type UnbuildResolvedBuildConfig as k, type ViteResolvedBuildConfig as l, type ResolvedConfig as m, type EnvironmentContext as n, type Plugin as o, type PluginContext as p, type EnvironmentResolvedConfig as q, type EnvironmentContextPlugin as r, type HookKeys as s, type InferHookHandler as t, type MetaInfo as u, type Resolver as v, type TransformResult as w, type VirtualFile as x, type PowerlinesWriteFileOptions as y, type InitContextOptions as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Jiti } from 'jiti';
|
|
2
|
-
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-
|
|
2
|
+
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-D8KrE7SZ.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -21,7 +21,9 @@ import '@stryke/types/package-json';
|
|
|
21
21
|
import 'jest-worker';
|
|
22
22
|
import 'magic-string';
|
|
23
23
|
import 'semver';
|
|
24
|
+
import 'ts-morph';
|
|
24
25
|
import 'unplugin';
|
|
26
|
+
import '@stryke/fs/resolve';
|
|
25
27
|
import 'node:fs';
|
|
26
28
|
import '@stryke/types/array';
|
|
27
29
|
import './tsconfig-Bz-CiFqD.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Jiti } from 'jiti';
|
|
2
|
-
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-
|
|
2
|
+
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-DBIFdRoq.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -21,7 +21,9 @@ import '@stryke/types/package-json';
|
|
|
21
21
|
import 'jest-worker';
|
|
22
22
|
import 'magic-string';
|
|
23
23
|
import 'semver';
|
|
24
|
+
import 'ts-morph';
|
|
24
25
|
import 'unplugin';
|
|
26
|
+
import '@stryke/fs/resolve';
|
|
25
27
|
import 'node:fs';
|
|
26
28
|
import '@stryke/types/array';
|
|
27
29
|
import './tsconfig-Bz-CiFqD.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkVMLQATMA_cjs = require('../chunk-VMLQATMA.cjs');
|
|
4
|
+
require('../chunk-AA6RBP44.cjs');
|
|
5
5
|
require('../chunk-B3EE3VHZ.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-RNHKEPFD.cjs');
|
|
7
7
|
require('../chunk-7VJ42H2I.cjs');
|
|
8
|
+
require('../chunk-SAS5EPBD.cjs');
|
|
8
9
|
require('../chunk-K3NBD5LL.cjs');
|
|
9
10
|
require('../chunk-JA4HSQRN.cjs');
|
|
10
11
|
require('../chunk-ISBHXSDH.cjs');
|
|
@@ -14,5 +15,5 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
14
15
|
|
|
15
16
|
Object.defineProperty(exports, "PowerlinesAPIContext", {
|
|
16
17
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkVMLQATMA_cjs.PowerlinesAPIContext; }
|
|
18
19
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-
|
|
1
|
+
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-D8KrE7SZ.cjs';
|
|
2
2
|
import { PowerlinesContext } from './context.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -22,14 +22,16 @@ import 'jest-worker';
|
|
|
22
22
|
import 'jiti';
|
|
23
23
|
import 'magic-string';
|
|
24
24
|
import 'semver';
|
|
25
|
+
import 'ts-morph';
|
|
25
26
|
import 'unplugin';
|
|
27
|
+
import '@stryke/fs/resolve';
|
|
26
28
|
import 'node:fs';
|
|
27
29
|
import '@stryke/types/array';
|
|
28
30
|
import '../tsconfig-Bz-CiFqD.cjs';
|
|
29
31
|
import '@stryke/types/tsconfig';
|
|
30
32
|
import 'typescript';
|
|
31
|
-
import '../internal-
|
|
32
|
-
import '../api-
|
|
33
|
+
import '../internal-CaGANOWK.cjs';
|
|
34
|
+
import '../api-BRMITKt-.cjs';
|
|
33
35
|
|
|
34
36
|
declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
|
|
35
37
|
#private;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-
|
|
1
|
+
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-DBIFdRoq.js';
|
|
2
2
|
import { PowerlinesContext } from './context.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -22,14 +22,16 @@ import 'jest-worker';
|
|
|
22
22
|
import 'jiti';
|
|
23
23
|
import 'magic-string';
|
|
24
24
|
import 'semver';
|
|
25
|
+
import 'ts-morph';
|
|
25
26
|
import 'unplugin';
|
|
27
|
+
import '@stryke/fs/resolve';
|
|
26
28
|
import 'node:fs';
|
|
27
29
|
import '@stryke/types/array';
|
|
28
30
|
import '../tsconfig-Bz-CiFqD.js';
|
|
29
31
|
import '@stryke/types/tsconfig';
|
|
30
32
|
import 'typescript';
|
|
31
|
-
import '../internal-
|
|
32
|
-
import '../api-
|
|
33
|
+
import '../internal-1qCyw7bA.js';
|
|
34
|
+
import '../api-CDUN9en8.js';
|
|
33
35
|
|
|
34
36
|
declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
|
|
35
37
|
#private;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { PowerlinesAPIContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { PowerlinesAPIContext } from '../chunk-7CVPZOH4.js';
|
|
2
|
+
import '../chunk-DFW5FGEO.js';
|
|
3
3
|
import '../chunk-KFJCWNVG.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-KFWMKDJQ.js';
|
|
5
5
|
import '../chunk-FQLZZYYO.js';
|
|
6
|
+
import '../chunk-YQ3ODCHV.js';
|
|
6
7
|
import '../chunk-XBM7FHNK.js';
|
|
7
8
|
import '../chunk-ENRLU4UR.js';
|
|
8
9
|
import '../chunk-XZFEHPYE.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRNHKEPFD_cjs = require('../chunk-RNHKEPFD.cjs');
|
|
4
4
|
require('../chunk-7VJ42H2I.cjs');
|
|
5
|
+
require('../chunk-SAS5EPBD.cjs');
|
|
5
6
|
require('../chunk-K3NBD5LL.cjs');
|
|
6
7
|
require('../chunk-JA4HSQRN.cjs');
|
|
7
8
|
require('../chunk-ISBHXSDH.cjs');
|
|
@@ -11,5 +12,5 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
11
12
|
|
|
12
13
|
Object.defineProperty(exports, "PowerlinesContext", {
|
|
13
14
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkRNHKEPFD_cjs.PowerlinesContext; }
|
|
15
16
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
2
2
|
import { PackageJson } from '@stryke/types/package-json';
|
|
3
3
|
import { Range } from 'semver';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Project } from 'ts-morph';
|
|
5
|
+
import { ExternalIdResult, UnpluginMessage } from 'unplugin';
|
|
6
|
+
import { m as ResolvedConfig, C as Context, I as InitialUserConfig, u as MetaInfo, v as Resolver, g as ResolvedEntryTypeDefinition, V as VirtualFileSystemInterface, L as LogFn, e as WorkspaceConfig, R as ResolveOptions, w as TransformResult, x as VirtualFile, y as PowerlinesWriteFileOptions, z as InitContextOptions } from '../config-D8KrE7SZ.cjs';
|
|
7
|
+
import { a as UNSAFE_ContextInternal } from '../internal-CaGANOWK.cjs';
|
|
7
8
|
import { P as ParsedTypeScriptConfig } from '../tsconfig-Bz-CiFqD.cjs';
|
|
8
9
|
import '@storm-software/build-tools/types';
|
|
9
10
|
import '@storm-software/config-tools/types';
|
|
@@ -24,9 +25,10 @@ import 'webpack';
|
|
|
24
25
|
import 'jest-worker';
|
|
25
26
|
import 'jiti';
|
|
26
27
|
import 'magic-string';
|
|
28
|
+
import '@stryke/fs/resolve';
|
|
27
29
|
import 'node:fs';
|
|
28
30
|
import '@stryke/types/array';
|
|
29
|
-
import '../api-
|
|
31
|
+
import '../api-BRMITKt-.cjs';
|
|
30
32
|
import '@stryke/types/tsconfig';
|
|
31
33
|
import 'typescript';
|
|
32
34
|
|
|
@@ -146,6 +148,47 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
146
148
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
147
149
|
*/
|
|
148
150
|
get builtins(): string[];
|
|
151
|
+
/**
|
|
152
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
153
|
+
*
|
|
154
|
+
* @see https://ts-morph.com/
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* This instance is created lazily on first access.
|
|
158
|
+
*/
|
|
159
|
+
get program(): Project;
|
|
160
|
+
/**
|
|
161
|
+
* A helper function to resolve modules in the Virtual File System
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```ts
|
|
168
|
+
* const resolved = await context.resolve("some-module", "/path/to/importer");
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* @param id - The module to resolve.
|
|
172
|
+
* @param importer - An optional path to the importer module.
|
|
173
|
+
* @param options - Additional resolution options.
|
|
174
|
+
* @returns A promise that resolves to the resolved module path.
|
|
175
|
+
*/
|
|
176
|
+
resolveId(id: string, importer?: string, options?: ResolveOptions): Promise<ExternalIdResult | undefined>;
|
|
177
|
+
/**
|
|
178
|
+
* A helper function to load modules from the Virtual File System
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* This function can be used to load modules relative to the project root directory.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* @param id - The module to load.
|
|
189
|
+
* @returns A promise that resolves to the loaded module.
|
|
190
|
+
*/
|
|
191
|
+
load(id: string): Promise<TransformResult | undefined>;
|
|
149
192
|
/**
|
|
150
193
|
* Get the builtin virtual files that exist in the Powerlines virtual file system
|
|
151
194
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
2
2
|
import { PackageJson } from '@stryke/types/package-json';
|
|
3
3
|
import { Range } from 'semver';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Project } from 'ts-morph';
|
|
5
|
+
import { ExternalIdResult, UnpluginMessage } from 'unplugin';
|
|
6
|
+
import { m as ResolvedConfig, C as Context, I as InitialUserConfig, u as MetaInfo, v as Resolver, g as ResolvedEntryTypeDefinition, V as VirtualFileSystemInterface, L as LogFn, e as WorkspaceConfig, R as ResolveOptions, w as TransformResult, x as VirtualFile, y as PowerlinesWriteFileOptions, z as InitContextOptions } from '../config-DBIFdRoq.js';
|
|
7
|
+
import { a as UNSAFE_ContextInternal } from '../internal-1qCyw7bA.js';
|
|
7
8
|
import { P as ParsedTypeScriptConfig } from '../tsconfig-Bz-CiFqD.js';
|
|
8
9
|
import '@storm-software/build-tools/types';
|
|
9
10
|
import '@storm-software/config-tools/types';
|
|
@@ -24,9 +25,10 @@ import 'webpack';
|
|
|
24
25
|
import 'jest-worker';
|
|
25
26
|
import 'jiti';
|
|
26
27
|
import 'magic-string';
|
|
28
|
+
import '@stryke/fs/resolve';
|
|
27
29
|
import 'node:fs';
|
|
28
30
|
import '@stryke/types/array';
|
|
29
|
-
import '../api-
|
|
31
|
+
import '../api-CDUN9en8.js';
|
|
30
32
|
import '@stryke/types/tsconfig';
|
|
31
33
|
import 'typescript';
|
|
32
34
|
|
|
@@ -146,6 +148,47 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
146
148
|
* The builtin module id that exist in the Powerlines virtual file system
|
|
147
149
|
*/
|
|
148
150
|
get builtins(): string[];
|
|
151
|
+
/**
|
|
152
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
153
|
+
*
|
|
154
|
+
* @see https://ts-morph.com/
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* This instance is created lazily on first access.
|
|
158
|
+
*/
|
|
159
|
+
get program(): Project;
|
|
160
|
+
/**
|
|
161
|
+
* A helper function to resolve modules in the Virtual File System
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```ts
|
|
168
|
+
* const resolved = await context.resolve("some-module", "/path/to/importer");
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* @param id - The module to resolve.
|
|
172
|
+
* @param importer - An optional path to the importer module.
|
|
173
|
+
* @param options - Additional resolution options.
|
|
174
|
+
* @returns A promise that resolves to the resolved module path.
|
|
175
|
+
*/
|
|
176
|
+
resolveId(id: string, importer?: string, options?: ResolveOptions): Promise<ExternalIdResult | undefined>;
|
|
177
|
+
/**
|
|
178
|
+
* A helper function to load modules from the Virtual File System
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* This function can be used to load modules relative to the project root directory.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* @param id - The module to load.
|
|
189
|
+
* @returns A promise that resolves to the loaded module.
|
|
190
|
+
*/
|
|
191
|
+
load(id: string): Promise<TransformResult | undefined>;
|
|
149
192
|
/**
|
|
150
193
|
* Get the builtin virtual files that exist in the Powerlines virtual file system
|
|
151
194
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { PowerlinesContext } from '../chunk-
|
|
1
|
+
export { PowerlinesContext } from '../chunk-KFWMKDJQ.js';
|
|
2
2
|
import '../chunk-FQLZZYYO.js';
|
|
3
|
+
import '../chunk-YQ3ODCHV.js';
|
|
3
4
|
import '../chunk-XBM7FHNK.js';
|
|
4
5
|
import '../chunk-ENRLU4UR.js';
|
|
5
6
|
import '../chunk-XZFEHPYE.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAA6RBP44_cjs = require('../chunk-AA6RBP44.cjs');
|
|
4
4
|
require('../chunk-B3EE3VHZ.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-RNHKEPFD.cjs');
|
|
6
6
|
require('../chunk-7VJ42H2I.cjs');
|
|
7
|
+
require('../chunk-SAS5EPBD.cjs');
|
|
7
8
|
require('../chunk-K3NBD5LL.cjs');
|
|
8
9
|
require('../chunk-JA4HSQRN.cjs');
|
|
9
10
|
require('../chunk-ISBHXSDH.cjs');
|
|
@@ -13,5 +14,5 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
13
14
|
|
|
14
15
|
Object.defineProperty(exports, "PowerlinesEnvironmentContext", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkAA6RBP44_cjs.PowerlinesEnvironmentContext; }
|
|
17
18
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ResolvedConfig, n as EnvironmentContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig, r as EnvironmentContextPlugin, H as HooksList, p as PluginContext, o as Plugin, s as HookKeys, S as SelectHooksOptions, t as InferHookHandler } from '../config-
|
|
1
|
+
import { m as ResolvedConfig, n as EnvironmentContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig, r as EnvironmentContextPlugin, H as HooksList, p as PluginContext, o as Plugin, s as HookKeys, S as SelectHooksOptions, t as InferHookHandler } from '../config-D8KrE7SZ.cjs';
|
|
2
2
|
import { PowerlinesContext } from './context.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -22,14 +22,16 @@ import 'jest-worker';
|
|
|
22
22
|
import 'jiti';
|
|
23
23
|
import 'magic-string';
|
|
24
24
|
import 'semver';
|
|
25
|
+
import 'ts-morph';
|
|
25
26
|
import 'unplugin';
|
|
27
|
+
import '@stryke/fs/resolve';
|
|
26
28
|
import 'node:fs';
|
|
27
29
|
import '@stryke/types/array';
|
|
28
30
|
import '../tsconfig-Bz-CiFqD.cjs';
|
|
29
31
|
import '@stryke/types/tsconfig';
|
|
30
32
|
import 'typescript';
|
|
31
|
-
import '../internal-
|
|
32
|
-
import '../api-
|
|
33
|
+
import '../internal-CaGANOWK.cjs';
|
|
34
|
+
import '../api-BRMITKt-.cjs';
|
|
33
35
|
|
|
34
36
|
declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements EnvironmentContext<TResolvedConfig> {
|
|
35
37
|
#private;
|