@powerlines/plugin-react 0.1.26 → 0.1.28

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.
@@ -1,5 +1,6 @@
1
1
  export { ReactOptimizedBuiltin, ReactOptimizedBuiltinProps, __ΩReactOptimizedBuiltinProps } from './react-optimized.cjs';
2
2
  import '@alloy-js/core';
3
3
  import '@alloy-js/core/jsx-runtime';
4
- import '../fs-B3t0EW52.cjs';
4
+ import '../fs-Y3B84fcf.cjs';
5
+ import '@stryke/fs/resolve';
5
6
  import 'node:fs';
@@ -1,5 +1,6 @@
1
1
  export { ReactOptimizedBuiltin, ReactOptimizedBuiltinProps, __ΩReactOptimizedBuiltinProps } from './react-optimized.js';
2
2
  import '@alloy-js/core';
3
3
  import '@alloy-js/core/jsx-runtime';
4
- import '../fs-B3t0EW52.js';
4
+ import '../fs-Y3B84fcf.js';
5
+ import '@stryke/fs/resolve';
5
6
  import 'node:fs';
@@ -1,7 +1,8 @@
1
1
  import * as _alloy_js_core from '@alloy-js/core';
2
2
  import { Children as Children$1, SourceFileProps as SourceFileProps$1 } from '@alloy-js/core';
3
3
  import { Children } from '@alloy-js/core/jsx-runtime';
4
- import { O as OutputModeType } from '../fs-B3t0EW52.cjs';
4
+ import { O as OutputModeType } from '../fs-Y3B84fcf.cjs';
5
+ import '@stryke/fs/resolve';
5
6
  import 'node:fs';
6
7
 
7
8
  /**
@@ -1,7 +1,8 @@
1
1
  import * as _alloy_js_core from '@alloy-js/core';
2
2
  import { Children as Children$1, SourceFileProps as SourceFileProps$1 } from '@alloy-js/core';
3
3
  import { Children } from '@alloy-js/core/jsx-runtime';
4
- import { O as OutputModeType } from '../fs-B3t0EW52.js';
4
+ import { O as OutputModeType } from '../fs-Y3B84fcf.js';
5
+ import '@stryke/fs/resolve';
5
6
  import 'node:fs';
6
7
 
7
8
  /**
@@ -1,4 +1,5 @@
1
- import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
1
+ import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
2
+ import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
2
3
 
3
4
  declare const __VFS_PATCH__ = "__VFS_PATCH__";
4
5
  declare const __VFS_REVERT__ = "__VFS_REVERT__";
@@ -87,21 +88,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
87
88
  type NodeWriteFileOptions = WriteFileOptions$1;
88
89
  type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
89
90
  type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
90
- interface ResolvePathOptions extends ResolveFSOptions {
91
+ interface ResolveOptions extends ResolveOptions$1 {
91
92
  /**
92
- * Should the resolved path include the file extension?
93
- *
94
- * @defaultValue true
93
+ * If true, the module is being resolved as an entry point.
94
+ */
95
+ isEntry?: boolean;
96
+ /**
97
+ * If true, the resolver will skip using the cache when resolving modules.
98
+ */
99
+ skipCache?: boolean;
100
+ /**
101
+ * An array of external modules or patterns to exclude from resolution.
95
102
  */
96
- withExtension?: boolean;
103
+ external?: (string | RegExp)[];
97
104
  /**
98
- * The paths to search for the file.
105
+ * An array of modules or patterns to include in the resolution, even if they are marked as external.
99
106
  */
100
- paths?: string[];
107
+ noExternal?: (string | RegExp)[];
101
108
  /**
102
- * The type of the path to resolve.
109
+ * An array of patterns to match when resolving modules.
103
110
  */
104
- pathType?: "file" | "directory";
111
+ skipNodeModulesBundle?: boolean;
105
112
  }
106
113
  interface VirtualFileSystemInterface {
107
114
  /**
@@ -115,27 +122,33 @@ interface VirtualFileSystemInterface {
115
122
  /**
116
123
  * The underlying file metadata.
117
124
  */
118
- metadata: Record<string, VirtualFileMetadata | undefined>;
125
+ metadata: Readonly<Record<string, VirtualFileMetadata>>;
126
+ /**
127
+ * A map of file paths to their module ids.
128
+ */
129
+ ids: Readonly<Record<string, string>>;
119
130
  /**
120
131
  * A map of module ids to their file paths.
121
132
  */
122
- ids: Record<string, string>;
133
+ paths: Readonly<Record<string, string>>;
123
134
  /**
124
135
  * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
125
136
  *
126
137
  * @param pathOrId - The path or id to check.
138
+ * @param importer - The importer path, if any.
127
139
  * @param options - Optional parameters for resolving the path.
128
140
  * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
129
141
  */
130
- isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
142
+ isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
131
143
  /**
132
144
  * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
133
145
  *
134
146
  * @param pathOrId - The path or id to check.
147
+ * @param importer - The importer path, if any.
135
148
  * @param options - Optional parameters for resolving the path.
136
149
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
137
150
  */
138
- isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
151
+ isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
139
152
  /**
140
153
  * Checks if a file exists in the virtual file system (VFS).
141
154
  *
@@ -163,7 +176,7 @@ interface VirtualFileSystemInterface {
163
176
  * @param pathOrId - The path or id of the file.
164
177
  * @returns The metadata of the file if it exists, otherwise undefined.
165
178
  */
166
- getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
179
+ getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
167
180
  /**
168
181
  * Gets the stats of a file in the virtual file system (VFS).
169
182
  *
@@ -236,7 +249,7 @@ interface VirtualFileSystemInterface {
236
249
  * @param path - The path to the file to remove.
237
250
  * @returns A promise that resolves when the file is removed.
238
251
  */
239
- unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
252
+ unlinkSync: (path: string, options?: ResolveFSOptions) => void;
240
253
  /**
241
254
  * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
242
255
  *
@@ -250,7 +263,7 @@ interface VirtualFileSystemInterface {
250
263
  * @param path - The path to create the directory at.
251
264
  * @param options - Options for creating the directory.
252
265
  */
253
- rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
266
+ rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
254
267
  /**
255
268
  * Removes a directory in the virtual file system (VFS).
256
269
  *
@@ -258,7 +271,7 @@ interface VirtualFileSystemInterface {
258
271
  * @param options - Options for creating the directory.
259
272
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
260
273
  */
261
- rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
274
+ rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
262
275
  /**
263
276
  * Removes a file or directory in the virtual file system (VFS).
264
277
  *
@@ -266,14 +279,14 @@ interface VirtualFileSystemInterface {
266
279
  * @param options - Options for removing the file or directory.
267
280
  * @returns A promise that resolves when the file or directory is removed.
268
281
  */
269
- rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
282
+ rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
270
283
  /**
271
284
  * Synchronously removes a file or directory in the virtual file system (VFS).
272
285
  *
273
286
  * @param path - The path to the file or directory to remove.
274
287
  * @param options - Options for removing the file or directory.
275
288
  */
276
- rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;
289
+ rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
277
290
  /**
278
291
  * Creates a directory in the virtual file system (VFS).
279
292
  *
@@ -281,7 +294,7 @@ interface VirtualFileSystemInterface {
281
294
  * @param options - Options for creating the directory.
282
295
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
283
296
  */
284
- mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
297
+ mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
285
298
  /**
286
299
  * Creates a directory in the virtual file system (VFS).
287
300
  *
@@ -289,7 +302,7 @@ interface VirtualFileSystemInterface {
289
302
  * @param options - Options for creating the directory.
290
303
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
291
304
  */
292
- mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
305
+ mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
293
306
  /**
294
307
  * Reads a file from the virtual file system (VFS).
295
308
  *
@@ -311,7 +324,7 @@ interface VirtualFileSystemInterface {
311
324
  * @param options - Optional parameters for writing the file.
312
325
  * @returns A promise that resolves when the file is written.
313
326
  */
314
- writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
327
+ writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
315
328
  /**
316
329
  * Writes a file to the virtual file system (VFS).
317
330
  *
@@ -319,7 +332,7 @@ interface VirtualFileSystemInterface {
319
332
  * @param data - The contents of the file.
320
333
  * @param options - Optional parameters for writing the file.
321
334
  */
322
- writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
335
+ writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
323
336
  /**
324
337
  * Moves a file from one path to another in the virtual file system (VFS).
325
338
  *
@@ -366,28 +379,47 @@ interface VirtualFileSystemInterface {
366
379
  * Resolves a path or id to a file path in the virtual file system.
367
380
  *
368
381
  * @param pathOrId - The path or id of the file to resolve.
369
- * @param options - Optional parameters for resolving the path.
370
382
  * @returns The resolved path of the file if it exists, otherwise false.
371
383
  */
372
- resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
384
+ realpathSync: (pathOrId: string) => string;
373
385
  /**
374
- * Formats a path to match the virtual file system (VFS) structure.
386
+ * A helper function to resolve modules using the Jiti resolver
375
387
  *
376
- * @param path - The path to format.
377
- * @returns The formatted path.
388
+ * @remarks
389
+ * This function can be used to resolve modules relative to the project root directory.
390
+ *
391
+ * @example
392
+ * ```ts
393
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
394
+ * ```
395
+ *
396
+ * @param id - The module to resolve.
397
+ * @param importer - An optional path to the importer module.
398
+ * @param options - Additional resolution options.
399
+ * @returns A promise that resolves to the resolved module path.
378
400
  */
379
- formatPath: (path: string) => string;
401
+ resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
380
402
  /**
381
- * Resolves a path or id to a file path in the virtual file system.
403
+ * A synchronous helper function to resolve modules using the Jiti resolver
382
404
  *
383
- * @param pathOrId - The path or id of the file to resolve.
384
- * @returns The resolved path of the file if it exists, otherwise false.
405
+ * @remarks
406
+ * This function can be used to resolve modules relative to the project root directory.
407
+ *
408
+ * @example
409
+ * ```ts
410
+ * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
411
+ * ```
412
+ *
413
+ * @param id - The module to resolve.
414
+ * @param importer - An optional path to the importer module.
415
+ * @param options - Additional resolution options.
416
+ * @returns The resolved module path.
385
417
  */
386
- realpathSync: (pathOrId: string) => string;
418
+ resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
387
419
  /**
388
420
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
389
421
  */
390
422
  dispose: () => Promise<void>;
391
423
  }
392
424
 
393
- export type { OutputModeType as O, PowerlinesWriteFileOptions as P, VirtualFileSystemInterface as V, VirtualFile as a };
425
+ export type { OutputModeType as O, PowerlinesWriteFileOptions as P, ResolveOptions as R, VirtualFileSystemInterface as V, VirtualFile as a };
@@ -1,4 +1,5 @@
1
- import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
1
+ import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
2
+ import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
2
3
 
3
4
  declare const __VFS_PATCH__ = "__VFS_PATCH__";
4
5
  declare const __VFS_REVERT__ = "__VFS_REVERT__";
@@ -87,21 +88,27 @@ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
87
88
  type NodeWriteFileOptions = WriteFileOptions$1;
88
89
  type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
89
90
  type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
90
- interface ResolvePathOptions extends ResolveFSOptions {
91
+ interface ResolveOptions extends ResolveOptions$1 {
91
92
  /**
92
- * Should the resolved path include the file extension?
93
- *
94
- * @defaultValue true
93
+ * If true, the module is being resolved as an entry point.
94
+ */
95
+ isEntry?: boolean;
96
+ /**
97
+ * If true, the resolver will skip using the cache when resolving modules.
98
+ */
99
+ skipCache?: boolean;
100
+ /**
101
+ * An array of external modules or patterns to exclude from resolution.
95
102
  */
96
- withExtension?: boolean;
103
+ external?: (string | RegExp)[];
97
104
  /**
98
- * The paths to search for the file.
105
+ * An array of modules or patterns to include in the resolution, even if they are marked as external.
99
106
  */
100
- paths?: string[];
107
+ noExternal?: (string | RegExp)[];
101
108
  /**
102
- * The type of the path to resolve.
109
+ * An array of patterns to match when resolving modules.
103
110
  */
104
- pathType?: "file" | "directory";
111
+ skipNodeModulesBundle?: boolean;
105
112
  }
106
113
  interface VirtualFileSystemInterface {
107
114
  /**
@@ -115,27 +122,33 @@ interface VirtualFileSystemInterface {
115
122
  /**
116
123
  * The underlying file metadata.
117
124
  */
118
- metadata: Record<string, VirtualFileMetadata | undefined>;
125
+ metadata: Readonly<Record<string, VirtualFileMetadata>>;
126
+ /**
127
+ * A map of file paths to their module ids.
128
+ */
129
+ ids: Readonly<Record<string, string>>;
119
130
  /**
120
131
  * A map of module ids to their file paths.
121
132
  */
122
- ids: Record<string, string>;
133
+ paths: Readonly<Record<string, string>>;
123
134
  /**
124
135
  * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
125
136
  *
126
137
  * @param pathOrId - The path or id to check.
138
+ * @param importer - The importer path, if any.
127
139
  * @param options - Optional parameters for resolving the path.
128
140
  * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
129
141
  */
130
- isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
142
+ isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
131
143
  /**
132
144
  * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
133
145
  *
134
146
  * @param pathOrId - The path or id to check.
147
+ * @param importer - The importer path, if any.
135
148
  * @param options - Optional parameters for resolving the path.
136
149
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
137
150
  */
138
- isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
151
+ isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
139
152
  /**
140
153
  * Checks if a file exists in the virtual file system (VFS).
141
154
  *
@@ -163,7 +176,7 @@ interface VirtualFileSystemInterface {
163
176
  * @param pathOrId - The path or id of the file.
164
177
  * @returns The metadata of the file if it exists, otherwise undefined.
165
178
  */
166
- getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
179
+ getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
167
180
  /**
168
181
  * Gets the stats of a file in the virtual file system (VFS).
169
182
  *
@@ -236,7 +249,7 @@ interface VirtualFileSystemInterface {
236
249
  * @param path - The path to the file to remove.
237
250
  * @returns A promise that resolves when the file is removed.
238
251
  */
239
- unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
252
+ unlinkSync: (path: string, options?: ResolveFSOptions) => void;
240
253
  /**
241
254
  * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
242
255
  *
@@ -250,7 +263,7 @@ interface VirtualFileSystemInterface {
250
263
  * @param path - The path to create the directory at.
251
264
  * @param options - Options for creating the directory.
252
265
  */
253
- rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
266
+ rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
254
267
  /**
255
268
  * Removes a directory in the virtual file system (VFS).
256
269
  *
@@ -258,7 +271,7 @@ interface VirtualFileSystemInterface {
258
271
  * @param options - Options for creating the directory.
259
272
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
260
273
  */
261
- rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
274
+ rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
262
275
  /**
263
276
  * Removes a file or directory in the virtual file system (VFS).
264
277
  *
@@ -266,14 +279,14 @@ interface VirtualFileSystemInterface {
266
279
  * @param options - Options for removing the file or directory.
267
280
  * @returns A promise that resolves when the file or directory is removed.
268
281
  */
269
- rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
282
+ rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
270
283
  /**
271
284
  * Synchronously removes a file or directory in the virtual file system (VFS).
272
285
  *
273
286
  * @param path - The path to the file or directory to remove.
274
287
  * @param options - Options for removing the file or directory.
275
288
  */
276
- rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;
289
+ rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
277
290
  /**
278
291
  * Creates a directory in the virtual file system (VFS).
279
292
  *
@@ -281,7 +294,7 @@ interface VirtualFileSystemInterface {
281
294
  * @param options - Options for creating the directory.
282
295
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
283
296
  */
284
- mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
297
+ mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
285
298
  /**
286
299
  * Creates a directory in the virtual file system (VFS).
287
300
  *
@@ -289,7 +302,7 @@ interface VirtualFileSystemInterface {
289
302
  * @param options - Options for creating the directory.
290
303
  * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
291
304
  */
292
- mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
305
+ mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
293
306
  /**
294
307
  * Reads a file from the virtual file system (VFS).
295
308
  *
@@ -311,7 +324,7 @@ interface VirtualFileSystemInterface {
311
324
  * @param options - Optional parameters for writing the file.
312
325
  * @returns A promise that resolves when the file is written.
313
326
  */
314
- writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
327
+ writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
315
328
  /**
316
329
  * Writes a file to the virtual file system (VFS).
317
330
  *
@@ -319,7 +332,7 @@ interface VirtualFileSystemInterface {
319
332
  * @param data - The contents of the file.
320
333
  * @param options - Optional parameters for writing the file.
321
334
  */
322
- writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
335
+ writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
323
336
  /**
324
337
  * Moves a file from one path to another in the virtual file system (VFS).
325
338
  *
@@ -366,28 +379,47 @@ interface VirtualFileSystemInterface {
366
379
  * Resolves a path or id to a file path in the virtual file system.
367
380
  *
368
381
  * @param pathOrId - The path or id of the file to resolve.
369
- * @param options - Optional parameters for resolving the path.
370
382
  * @returns The resolved path of the file if it exists, otherwise false.
371
383
  */
372
- resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
384
+ realpathSync: (pathOrId: string) => string;
373
385
  /**
374
- * Formats a path to match the virtual file system (VFS) structure.
386
+ * A helper function to resolve modules using the Jiti resolver
375
387
  *
376
- * @param path - The path to format.
377
- * @returns The formatted path.
388
+ * @remarks
389
+ * This function can be used to resolve modules relative to the project root directory.
390
+ *
391
+ * @example
392
+ * ```ts
393
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
394
+ * ```
395
+ *
396
+ * @param id - The module to resolve.
397
+ * @param importer - An optional path to the importer module.
398
+ * @param options - Additional resolution options.
399
+ * @returns A promise that resolves to the resolved module path.
378
400
  */
379
- formatPath: (path: string) => string;
401
+ resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<string | undefined>;
380
402
  /**
381
- * Resolves a path or id to a file path in the virtual file system.
403
+ * A synchronous helper function to resolve modules using the Jiti resolver
382
404
  *
383
- * @param pathOrId - The path or id of the file to resolve.
384
- * @returns The resolved path of the file if it exists, otherwise false.
405
+ * @remarks
406
+ * This function can be used to resolve modules relative to the project root directory.
407
+ *
408
+ * @example
409
+ * ```ts
410
+ * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
411
+ * ```
412
+ *
413
+ * @param id - The module to resolve.
414
+ * @param importer - An optional path to the importer module.
415
+ * @param options - Additional resolution options.
416
+ * @returns The resolved module path.
385
417
  */
386
- realpathSync: (pathOrId: string) => string;
418
+ resolveSync: (id: string, importer?: string, options?: ResolveOptions) => string | undefined;
387
419
  /**
388
420
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
389
421
  */
390
422
  dispose: () => Promise<void>;
391
423
  }
392
424
 
393
- export type { OutputModeType as O, PowerlinesWriteFileOptions as P, VirtualFileSystemInterface as V, VirtualFile as a };
425
+ export type { OutputModeType as O, PowerlinesWriteFileOptions as P, ResolveOptions as R, VirtualFileSystemInterface as V, VirtualFile as a };
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as PluginContext, a as Plugin } from './runtime-u0u1c5nt.cjs';
1
+ import { P as PluginContext, a as Plugin } from './runtime-Djft1hbQ.cjs';
2
2
  import { Children } from '@alloy-js/core/jsx-runtime';
3
3
  import { PrintTreeOptions } from '@alloy-js/core';
4
4
  import { ReactPluginContext } from './types/plugin.cjs';
@@ -9,7 +9,9 @@ import '@stryke/env/get-env-paths';
9
9
  import '@stryke/types/base';
10
10
  import '@stryke/types/package-json';
11
11
  import 'jiti';
12
+ import 'magic-string';
12
13
  import 'semver';
14
+ import 'ts-morph';
13
15
  import 'unplugin';
14
16
  import '@babel/core';
15
17
  import '@storm-software/build-tools/types';
@@ -19,7 +21,8 @@ import '@stryke/types/configuration';
19
21
  import '@stryke/types/file';
20
22
  import 'vite';
21
23
  import '@babel/helper-plugin-utils';
22
- import './fs-B3t0EW52.cjs';
24
+ import './fs-Y3B84fcf.cjs';
25
+ import '@stryke/fs/resolve';
23
26
  import 'node:fs';
24
27
  import '@stryke/types/array';
25
28
  import '@stryke/types/tsconfig';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as PluginContext, a as Plugin } from './runtime-BDoDvElA.js';
1
+ import { P as PluginContext, a as Plugin } from './runtime-Bcl8KoqS.js';
2
2
  import { Children } from '@alloy-js/core/jsx-runtime';
3
3
  import { PrintTreeOptions } from '@alloy-js/core';
4
4
  import { ReactPluginContext } from './types/plugin.js';
@@ -9,7 +9,9 @@ import '@stryke/env/get-env-paths';
9
9
  import '@stryke/types/base';
10
10
  import '@stryke/types/package-json';
11
11
  import 'jiti';
12
+ import 'magic-string';
12
13
  import 'semver';
14
+ import 'ts-morph';
13
15
  import 'unplugin';
14
16
  import '@babel/core';
15
17
  import '@storm-software/build-tools/types';
@@ -19,7 +21,8 @@ import '@stryke/types/configuration';
19
21
  import '@stryke/types/file';
20
22
  import 'vite';
21
23
  import '@babel/helper-plugin-utils';
22
- import './fs-B3t0EW52.js';
24
+ import './fs-Y3B84fcf.js';
25
+ import '@stryke/fs/resolve';
23
26
  import 'node:fs';
24
27
  import '@stryke/types/array';
25
28
  import '@stryke/types/tsconfig';
@@ -2,8 +2,10 @@ import { EnvPaths } from '@stryke/env/get-env-paths';
2
2
  import { NonUndefined, MaybePromise, FunctionLike } from '@stryke/types/base';
3
3
  import { PackageJson } from '@stryke/types/package-json';
4
4
  import { Jiti } from 'jiti';
5
+ import { SourceMap } from 'magic-string';
5
6
  import { Range } from 'semver';
6
- import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
7
+ import { Project } from 'ts-morph';
8
+ import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
7
9
  import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
8
10
  import { Format } from '@storm-software/build-tools/types';
9
11
  import { LogLevelLabel } from '@storm-software/config-tools/types';
@@ -12,7 +14,7 @@ import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configura
12
14
  import { AssetGlob } from '@stryke/types/file';
13
15
  import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
14
16
  import { BabelAPI } from '@babel/helper-plugin-utils';
15
- import { O as OutputModeType, V as VirtualFileSystemInterface, a as VirtualFile, P as PowerlinesWriteFileOptions } from './fs-B3t0EW52.js';
17
+ import { O as OutputModeType, V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, P as PowerlinesWriteFileOptions } from './fs-Y3B84fcf.js';
16
18
  import { ArrayValues } from '@stryke/types/array';
17
19
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
18
20
  import ts from 'typescript';
@@ -343,7 +345,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
343
345
  * @param id - The identifier of the source code.
344
346
  * @returns A promise that resolves when the hook is complete.
345
347
  */
346
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
348
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
347
349
  /**
348
350
  * A hook that is called to load the source code.
349
351
  *
@@ -351,7 +353,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
351
353
  * @param id - The identifier of the source code.
352
354
  * @returns A promise that resolves when the hook is complete.
353
355
  */
354
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
356
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
355
357
  /**
356
358
  * A hook that is called to resolve the identifier of the source code.
357
359
  *
@@ -401,7 +403,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
401
403
  * @param id - The identifier of the source code.
402
404
  * @returns A promise that resolves when the hook is complete.
403
405
  */
404
- transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
406
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
405
407
  /**
406
408
  * A hook that is called to load the source code.
407
409
  *
@@ -409,7 +411,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
409
411
  * @param id - The identifier of the source code.
410
412
  * @returns A promise that resolves when the hook is complete.
411
413
  */
412
- load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
414
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
413
415
  /**
414
416
  * A hook that is called to resolve the identifier of the source code.
415
417
  *
@@ -890,6 +892,10 @@ interface MetaInfo {
890
892
  interface Resolver extends Jiti {
891
893
  plugin: Jiti;
892
894
  }
895
+ interface TransformResult {
896
+ code: string;
897
+ map: SourceMap | null;
898
+ }
893
899
  interface InitContextOptions {
894
900
  /**
895
901
  * If false, the plugin will be loaded after all other plugins.
@@ -1024,6 +1030,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1024
1030
  * The builtin module id that exist in the Powerlines virtual file system
1025
1031
  */
1026
1032
  builtins: string[];
1033
+ /**
1034
+ * The {@link Project} instance used for type reflection and module manipulation
1035
+ *
1036
+ * @see https://ts-morph.com/
1037
+ *
1038
+ * @remarks
1039
+ * This instance is created lazily on first access.
1040
+ */
1041
+ program: Project;
1042
+ /**
1043
+ * A helper function to resolve modules using the Jiti resolver
1044
+ *
1045
+ * @remarks
1046
+ * This function can be used to resolve modules relative to the project root directory.
1047
+ *
1048
+ * @example
1049
+ * ```ts
1050
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1051
+ * ```
1052
+ *
1053
+ * @param id - The module to resolve.
1054
+ * @param importer - An optional path to the importer module.
1055
+ * @param options - Additional resolution options.
1056
+ * @returns A promise that resolves to the resolved module path.
1057
+ */
1058
+ resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
1059
+ /**
1060
+ * A helper function to load modules using the Jiti resolver
1061
+ *
1062
+ * @remarks
1063
+ * This function can be used to load modules relative to the project root directory.
1064
+ *
1065
+ * @example
1066
+ * ```ts
1067
+ * const module = await context.load("some-module", "/path/to/importer");
1068
+ * ```
1069
+ *
1070
+ * @param id - The module to load.
1071
+ * @returns A promise that resolves to the loaded module.
1072
+ */
1073
+ load: (id: string) => Promise<TransformResult | undefined>;
1027
1074
  /**
1028
1075
  * The Powerlines builtin virtual files
1029
1076
  */
@@ -2,8 +2,10 @@ import { EnvPaths } from '@stryke/env/get-env-paths';
2
2
  import { NonUndefined, MaybePromise, FunctionLike } from '@stryke/types/base';
3
3
  import { PackageJson } from '@stryke/types/package-json';
4
4
  import { Jiti } from 'jiti';
5
+ import { SourceMap } from 'magic-string';
5
6
  import { Range } from 'semver';
6
- import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
7
+ import { Project } from 'ts-morph';
8
+ import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
7
9
  import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
8
10
  import { Format } from '@storm-software/build-tools/types';
9
11
  import { LogLevelLabel } from '@storm-software/config-tools/types';
@@ -12,7 +14,7 @@ import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configura
12
14
  import { AssetGlob } from '@stryke/types/file';
13
15
  import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
14
16
  import { BabelAPI } from '@babel/helper-plugin-utils';
15
- import { O as OutputModeType, V as VirtualFileSystemInterface, a as VirtualFile, P as PowerlinesWriteFileOptions } from './fs-B3t0EW52.cjs';
17
+ import { O as OutputModeType, V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, P as PowerlinesWriteFileOptions } from './fs-Y3B84fcf.cjs';
16
18
  import { ArrayValues } from '@stryke/types/array';
17
19
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
18
20
  import ts from 'typescript';
@@ -343,7 +345,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
343
345
  * @param id - The identifier of the source code.
344
346
  * @returns A promise that resolves when the hook is complete.
345
347
  */
346
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
348
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
347
349
  /**
348
350
  * A hook that is called to load the source code.
349
351
  *
@@ -351,7 +353,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
351
353
  * @param id - The identifier of the source code.
352
354
  * @returns A promise that resolves when the hook is complete.
353
355
  */
354
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
356
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
355
357
  /**
356
358
  * A hook that is called to resolve the identifier of the source code.
357
359
  *
@@ -401,7 +403,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
401
403
  * @param id - The identifier of the source code.
402
404
  * @returns A promise that resolves when the hook is complete.
403
405
  */
404
- transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
406
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
405
407
  /**
406
408
  * A hook that is called to load the source code.
407
409
  *
@@ -409,7 +411,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
409
411
  * @param id - The identifier of the source code.
410
412
  * @returns A promise that resolves when the hook is complete.
411
413
  */
412
- load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
414
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
413
415
  /**
414
416
  * A hook that is called to resolve the identifier of the source code.
415
417
  *
@@ -890,6 +892,10 @@ interface MetaInfo {
890
892
  interface Resolver extends Jiti {
891
893
  plugin: Jiti;
892
894
  }
895
+ interface TransformResult {
896
+ code: string;
897
+ map: SourceMap | null;
898
+ }
893
899
  interface InitContextOptions {
894
900
  /**
895
901
  * If false, the plugin will be loaded after all other plugins.
@@ -1024,6 +1030,47 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1024
1030
  * The builtin module id that exist in the Powerlines virtual file system
1025
1031
  */
1026
1032
  builtins: string[];
1033
+ /**
1034
+ * The {@link Project} instance used for type reflection and module manipulation
1035
+ *
1036
+ * @see https://ts-morph.com/
1037
+ *
1038
+ * @remarks
1039
+ * This instance is created lazily on first access.
1040
+ */
1041
+ program: Project;
1042
+ /**
1043
+ * A helper function to resolve modules using the Jiti resolver
1044
+ *
1045
+ * @remarks
1046
+ * This function can be used to resolve modules relative to the project root directory.
1047
+ *
1048
+ * @example
1049
+ * ```ts
1050
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1051
+ * ```
1052
+ *
1053
+ * @param id - The module to resolve.
1054
+ * @param importer - An optional path to the importer module.
1055
+ * @param options - Additional resolution options.
1056
+ * @returns A promise that resolves to the resolved module path.
1057
+ */
1058
+ resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
1059
+ /**
1060
+ * A helper function to load modules using the Jiti resolver
1061
+ *
1062
+ * @remarks
1063
+ * This function can be used to load modules relative to the project root directory.
1064
+ *
1065
+ * @example
1066
+ * ```ts
1067
+ * const module = await context.load("some-module", "/path/to/importer");
1068
+ * ```
1069
+ *
1070
+ * @param id - The module to load.
1071
+ * @returns A promise that resolves to the loaded module.
1072
+ */
1073
+ load: (id: string) => Promise<TransformResult | undefined>;
1027
1074
  /**
1028
1075
  * The Powerlines builtin virtual files
1029
1076
  */
@@ -1,11 +1,13 @@
1
1
  export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from './plugin.cjs';
2
2
  export { ReactEnvInterface, __ΩReactEnvInterface } from './runtime.cjs';
3
- import '../runtime-u0u1c5nt.cjs';
3
+ import '../runtime-Djft1hbQ.cjs';
4
4
  import '@stryke/env/get-env-paths';
5
5
  import '@stryke/types/base';
6
6
  import '@stryke/types/package-json';
7
7
  import 'jiti';
8
+ import 'magic-string';
8
9
  import 'semver';
10
+ import 'ts-morph';
9
11
  import 'unplugin';
10
12
  import '@babel/core';
11
13
  import '@storm-software/build-tools/types';
@@ -15,7 +17,8 @@ import '@stryke/types/configuration';
15
17
  import '@stryke/types/file';
16
18
  import 'vite';
17
19
  import '@babel/helper-plugin-utils';
18
- import '../fs-B3t0EW52.cjs';
20
+ import '../fs-Y3B84fcf.cjs';
21
+ import '@stryke/fs/resolve';
19
22
  import 'node:fs';
20
23
  import '@stryke/types/array';
21
24
  import '@stryke/types/tsconfig';
@@ -1,11 +1,13 @@
1
1
  export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from './plugin.js';
2
2
  export { ReactEnvInterface, __ΩReactEnvInterface } from './runtime.js';
3
- import '../runtime-BDoDvElA.js';
3
+ import '../runtime-Bcl8KoqS.js';
4
4
  import '@stryke/env/get-env-paths';
5
5
  import '@stryke/types/base';
6
6
  import '@stryke/types/package-json';
7
7
  import 'jiti';
8
+ import 'magic-string';
8
9
  import 'semver';
10
+ import 'ts-morph';
9
11
  import 'unplugin';
10
12
  import '@babel/core';
11
13
  import '@storm-software/build-tools/types';
@@ -15,7 +17,8 @@ import '@stryke/types/configuration';
15
17
  import '@stryke/types/file';
16
18
  import 'vite';
17
19
  import '@babel/helper-plugin-utils';
18
- import '../fs-B3t0EW52.js';
20
+ import '../fs-Y3B84fcf.js';
21
+ import '@stryke/fs/resolve';
19
22
  import 'node:fs';
20
23
  import '@stryke/types/array';
21
24
  import '@stryke/types/tsconfig';
@@ -1,4 +1,4 @@
1
- import { B as BabelUserConfig, U as UserConfig, R as ResolvedConfig, b as BabelResolvedConfig, P as PluginContext, E as EnvInterface, S as SecretsInterface } from '../runtime-u0u1c5nt.cjs';
1
+ import { B as BabelUserConfig, U as UserConfig, R as ResolvedConfig, b as BabelResolvedConfig, P as PluginContext, E as EnvInterface, S as SecretsInterface } from '../runtime-Djft1hbQ.cjs';
2
2
  import { Children } from '@alloy-js/core/jsx-runtime';
3
3
  import { ReflectionClass } from '@deepkit/type';
4
4
  import * as $ from '@stryke/capnp';
@@ -9,7 +9,9 @@ import '@stryke/env/get-env-paths';
9
9
  import '@stryke/types/base';
10
10
  import '@stryke/types/package-json';
11
11
  import 'jiti';
12
+ import 'magic-string';
12
13
  import 'semver';
14
+ import 'ts-morph';
13
15
  import 'unplugin';
14
16
  import '@babel/core';
15
17
  import '@storm-software/build-tools/types';
@@ -18,7 +20,8 @@ import '@storm-software/config/types';
18
20
  import '@stryke/types/file';
19
21
  import 'vite';
20
22
  import '@babel/helper-plugin-utils';
21
- import '../fs-B3t0EW52.cjs';
23
+ import '../fs-Y3B84fcf.cjs';
24
+ import '@stryke/fs/resolve';
22
25
  import 'node:fs';
23
26
  import '@stryke/types/array';
24
27
  import '@stryke/types/tsconfig';
@@ -1,4 +1,4 @@
1
- import { B as BabelUserConfig, U as UserConfig, R as ResolvedConfig, b as BabelResolvedConfig, P as PluginContext, E as EnvInterface, S as SecretsInterface } from '../runtime-BDoDvElA.js';
1
+ import { B as BabelUserConfig, U as UserConfig, R as ResolvedConfig, b as BabelResolvedConfig, P as PluginContext, E as EnvInterface, S as SecretsInterface } from '../runtime-Bcl8KoqS.js';
2
2
  import { Children } from '@alloy-js/core/jsx-runtime';
3
3
  import { ReflectionClass } from '@deepkit/type';
4
4
  import * as $ from '@stryke/capnp';
@@ -9,7 +9,9 @@ import '@stryke/env/get-env-paths';
9
9
  import '@stryke/types/base';
10
10
  import '@stryke/types/package-json';
11
11
  import 'jiti';
12
+ import 'magic-string';
12
13
  import 'semver';
14
+ import 'ts-morph';
13
15
  import 'unplugin';
14
16
  import '@babel/core';
15
17
  import '@storm-software/build-tools/types';
@@ -18,7 +20,8 @@ import '@storm-software/config/types';
18
20
  import '@stryke/types/file';
19
21
  import 'vite';
20
22
  import '@babel/helper-plugin-utils';
21
- import '../fs-B3t0EW52.js';
23
+ import '../fs-Y3B84fcf.js';
24
+ import '@stryke/fs/resolve';
22
25
  import 'node:fs';
23
26
  import '@stryke/types/array';
24
27
  import '@stryke/types/tsconfig';
@@ -1,9 +1,11 @@
1
- import { E as EnvInterface } from '../runtime-u0u1c5nt.cjs';
1
+ import { E as EnvInterface } from '../runtime-Djft1hbQ.cjs';
2
2
  import '@stryke/env/get-env-paths';
3
3
  import '@stryke/types/base';
4
4
  import '@stryke/types/package-json';
5
5
  import 'jiti';
6
+ import 'magic-string';
6
7
  import 'semver';
8
+ import 'ts-morph';
7
9
  import 'unplugin';
8
10
  import '@babel/core';
9
11
  import '@storm-software/build-tools/types';
@@ -13,7 +15,8 @@ import '@stryke/types/configuration';
13
15
  import '@stryke/types/file';
14
16
  import 'vite';
15
17
  import '@babel/helper-plugin-utils';
16
- import '../fs-B3t0EW52.cjs';
18
+ import '../fs-Y3B84fcf.cjs';
19
+ import '@stryke/fs/resolve';
17
20
  import 'node:fs';
18
21
  import '@stryke/types/array';
19
22
  import '@stryke/types/tsconfig';
@@ -1,9 +1,11 @@
1
- import { E as EnvInterface } from '../runtime-BDoDvElA.js';
1
+ import { E as EnvInterface } from '../runtime-Bcl8KoqS.js';
2
2
  import '@stryke/env/get-env-paths';
3
3
  import '@stryke/types/base';
4
4
  import '@stryke/types/package-json';
5
5
  import 'jiti';
6
+ import 'magic-string';
6
7
  import 'semver';
8
+ import 'ts-morph';
7
9
  import 'unplugin';
8
10
  import '@babel/core';
9
11
  import '@storm-software/build-tools/types';
@@ -13,7 +15,8 @@ import '@stryke/types/configuration';
13
15
  import '@stryke/types/file';
14
16
  import 'vite';
15
17
  import '@babel/helper-plugin-utils';
16
- import '../fs-B3t0EW52.js';
18
+ import '../fs-Y3B84fcf.js';
19
+ import '@stryke/fs/resolve';
17
20
  import 'node:fs';
18
21
  import '@stryke/types/array';
19
22
  import '@stryke/types/tsconfig';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-react",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a React application.",
6
6
  "repository": {
@@ -125,24 +125,24 @@
125
125
  },
126
126
  "dependencies": {
127
127
  "@storm-software/config-tools": "^1.188.48",
128
- "@stryke/cli": "^0.12.7",
129
- "@stryke/convert": "^0.6.2",
130
- "@stryke/fs": "^0.32.13",
131
- "@stryke/path": "^0.19.2",
128
+ "@stryke/cli": "^0.12.10",
129
+ "@stryke/convert": "^0.6.5",
130
+ "@stryke/fs": "^0.33.0",
131
+ "@stryke/path": "^0.20.0",
132
132
  "babel-plugin-react-compiler": "^1.0.0",
133
- "@powerlines/alloy": "^0.11.35",
134
- "@powerlines/plugin-babel": "^0.12.35",
135
- "@powerlines/plugin-env": "^0.13.32",
136
- "@powerlines/plugin-plugin": "^0.11.34",
133
+ "@powerlines/alloy": "^0.11.37",
134
+ "@powerlines/plugin-babel": "^0.12.37",
135
+ "@powerlines/plugin-env": "^0.13.34",
136
+ "@powerlines/plugin-plugin": "^0.11.36",
137
137
  "@vitejs/plugin-react": "^5.1.1",
138
138
  "defu": "^6.1.4",
139
- "powerlines": "^0.23.9"
139
+ "powerlines": "^0.24.0"
140
140
  },
141
141
  "devDependencies": {
142
- "@powerlines/nx": "^0.10.26",
142
+ "@powerlines/nx": "^0.10.28",
143
143
  "@storm-software/tsup": "^0.2.46",
144
144
  "@types/node": "^24.10.1"
145
145
  },
146
146
  "publishConfig": { "access": "public" },
147
- "gitHead": "d217b583335e4615b4e28fba7325f51fbd78a3f6"
147
+ "gitHead": "73acce2067b9d81822a59cb03a4b1e7fa8873bf9"
148
148
  }