powerlines 0.41.6 → 0.41.7

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.
Files changed (234) hide show
  1. package/README.md +14 -16
  2. package/dist/{api-CY668wMZ.mjs → api-6f2oVwGy.mjs} +142 -333
  3. package/dist/api-6f2oVwGy.mjs.map +1 -0
  4. package/dist/{api-GPlMYw0d.cjs → api-CFXLaAxU.cjs} +505 -722
  5. package/dist/astro.cjs +8 -18
  6. package/dist/astro.d.cts +1 -2
  7. package/dist/astro.d.cts.map +1 -1
  8. package/dist/astro.d.mts +1 -6
  9. package/dist/astro.d.mts.map +1 -1
  10. package/dist/astro.mjs +6 -16
  11. package/dist/astro.mjs.map +1 -1
  12. package/dist/{chunk-CbDLau6x.cjs → chunk-AIJqnxB6.cjs} +27 -1
  13. package/dist/chunk-CtajNgzt.mjs +36 -0
  14. package/dist/config.cjs +20 -4
  15. package/dist/config.d.cts +1 -2
  16. package/dist/config.d.mts +1 -3
  17. package/dist/config.mjs +11 -2
  18. package/dist/config.mjs.map +1 -0
  19. package/dist/constants.cjs +20 -20
  20. package/dist/constants.d.cts +1 -24
  21. package/dist/constants.d.mts +1 -24
  22. package/dist/constants.mjs +11 -3
  23. package/dist/constants.mjs.map +1 -0
  24. package/dist/context/index.cjs +4 -9
  25. package/dist/context/index.d.cts +56 -132
  26. package/dist/context/index.d.cts.map +1 -1
  27. package/dist/context/index.d.mts +55 -135
  28. package/dist/context/index.d.mts.map +1 -1
  29. package/dist/context/index.mjs +3 -9
  30. package/dist/esbuild.cjs +60 -17
  31. package/dist/esbuild.d.cts +5 -29
  32. package/dist/esbuild.d.cts.map +1 -1
  33. package/dist/esbuild.d.mts +5 -33
  34. package/dist/esbuild.d.mts.map +1 -1
  35. package/dist/esbuild.mjs +44 -12
  36. package/dist/esbuild.mjs.map +1 -0
  37. package/dist/farm.cjs +6 -13
  38. package/dist/farm.d.cts +2 -3
  39. package/dist/farm.d.cts.map +1 -1
  40. package/dist/farm.d.mts +2 -6
  41. package/dist/farm.d.mts.map +1 -1
  42. package/dist/farm.mjs +4 -11
  43. package/dist/farm.mjs.map +1 -1
  44. package/dist/index.cjs +7 -13
  45. package/dist/index.d.cts +263 -6
  46. package/dist/index.d.cts.map +1 -0
  47. package/dist/index.d.mts +263 -7
  48. package/dist/index.d.mts.map +1 -0
  49. package/dist/index.mjs +3 -9
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/next.cjs +7 -14
  52. package/dist/next.d.cts +0 -1
  53. package/dist/next.d.cts.map +1 -1
  54. package/dist/next.d.mts +0 -1
  55. package/dist/next.d.mts.map +1 -1
  56. package/dist/next.mjs +6 -13
  57. package/dist/next.mjs.map +1 -1
  58. package/dist/nuxt.cjs +12 -22
  59. package/dist/nuxt.d.cts +2 -3
  60. package/dist/nuxt.d.cts.map +1 -1
  61. package/dist/nuxt.d.mts +2 -7
  62. package/dist/nuxt.d.mts.map +1 -1
  63. package/dist/nuxt.mjs +8 -18
  64. package/dist/nuxt.mjs.map +1 -1
  65. package/dist/plugin-utils.cjs +20 -28
  66. package/dist/plugin-utils.d.cts +1 -267
  67. package/dist/plugin-utils.d.mts +1 -272
  68. package/dist/plugin-utils.mjs +11 -4
  69. package/dist/plugin-utils.mjs.map +1 -0
  70. package/dist/rolldown.cjs +52 -18
  71. package/dist/rolldown.d.cts +5 -29
  72. package/dist/rolldown.d.cts.map +1 -1
  73. package/dist/rolldown.d.mts +5 -32
  74. package/dist/rolldown.d.mts.map +1 -1
  75. package/dist/rolldown.mjs +36 -13
  76. package/dist/rolldown.mjs.map +1 -0
  77. package/dist/rollup.cjs +20 -48
  78. package/dist/rollup.d.cts +5 -29
  79. package/dist/rollup.d.cts.map +1 -1
  80. package/dist/rollup.d.mts +5 -32
  81. package/dist/rollup.d.mts.map +1 -1
  82. package/dist/rollup.mjs +6 -44
  83. package/dist/rollup.mjs.map +1 -1
  84. package/dist/rspack.cjs +20 -82
  85. package/dist/rspack.d.cts +4 -24
  86. package/dist/rspack.d.cts.map +1 -1
  87. package/dist/rspack.d.mts +4 -27
  88. package/dist/rspack.d.mts.map +1 -1
  89. package/dist/rspack.mjs +5 -77
  90. package/dist/rspack.mjs.map +1 -1
  91. package/dist/storage/index.cjs +2 -3
  92. package/dist/storage/index.d.cts +7 -7
  93. package/dist/storage/index.d.cts.map +1 -1
  94. package/dist/storage/index.d.mts +7 -11
  95. package/dist/storage/index.d.mts.map +1 -1
  96. package/dist/storage/index.mjs +1 -3
  97. package/dist/{tsconfig-C8M8X6U0.cjs → tsconfig-BJrUrPC_.cjs} +13 -13
  98. package/dist/{tsconfig-B92heKit.mjs → tsconfig-D9GCB2I9.mjs} +5 -5
  99. package/dist/tsconfig-D9GCB2I9.mjs.map +1 -0
  100. package/dist/tsdown.cjs +38 -187
  101. package/dist/tsdown.d.cts +2 -24
  102. package/dist/tsdown.d.cts.map +1 -1
  103. package/dist/tsdown.d.mts +4 -30
  104. package/dist/tsdown.d.mts.map +1 -1
  105. package/dist/tsdown.mjs +8 -167
  106. package/dist/tsdown.mjs.map +1 -1
  107. package/dist/tsup.cjs +29 -134
  108. package/dist/tsup.d.cts +2 -24
  109. package/dist/tsup.d.cts.map +1 -1
  110. package/dist/tsup.d.mts +2 -28
  111. package/dist/tsup.d.mts.map +1 -1
  112. package/dist/tsup.mjs +7 -122
  113. package/dist/tsup.mjs.map +1 -1
  114. package/dist/types-DerAvFjs.d.cts +4 -0
  115. package/dist/types-DerAvFjs.d.cts.map +1 -0
  116. package/dist/types-ro7jWCtL.d.mts +4 -0
  117. package/dist/types-ro7jWCtL.d.mts.map +1 -0
  118. package/dist/typescript/index.cjs +2 -1
  119. package/dist/typescript/index.d.cts +2 -2
  120. package/dist/typescript/index.d.cts.map +1 -1
  121. package/dist/typescript/index.d.mts +1 -4
  122. package/dist/typescript/index.d.mts.map +1 -1
  123. package/dist/typescript/index.mjs +1 -1
  124. package/dist/unloader.cjs +6 -13
  125. package/dist/unloader.d.cts +2 -4
  126. package/dist/unloader.d.cts.map +1 -1
  127. package/dist/unloader.d.mts +2 -7
  128. package/dist/unloader.d.mts.map +1 -1
  129. package/dist/unloader.mjs +4 -11
  130. package/dist/unloader.mjs.map +1 -1
  131. package/dist/unplugin.cjs +11 -14
  132. package/dist/unplugin.d.cts +5 -6
  133. package/dist/unplugin.d.cts.map +1 -1
  134. package/dist/unplugin.d.mts +3 -6
  135. package/dist/unplugin.d.mts.map +1 -1
  136. package/dist/unplugin.mjs +6 -10
  137. package/dist/utils.cjs +38 -22
  138. package/dist/utils.d.cts +3 -2
  139. package/dist/utils.d.mts +3 -3
  140. package/dist/utils.mjs +19 -3
  141. package/dist/utils.mjs.map +1 -0
  142. package/dist/{virtual-B1MLgqnQ.cjs → virtual-Cbvj12lU.cjs} +33 -33
  143. package/dist/{virtual-B9imjOqe.mjs → virtual-DvkJm7gK.mjs} +7 -7
  144. package/dist/virtual-DvkJm7gK.mjs.map +1 -0
  145. package/dist/vite.cjs +84 -19
  146. package/dist/vite.d.cts +5 -16
  147. package/dist/vite.d.cts.map +1 -1
  148. package/dist/vite.d.mts +5 -19
  149. package/dist/vite.d.mts.map +1 -1
  150. package/dist/vite.mjs +67 -14
  151. package/dist/vite.mjs.map +1 -0
  152. package/dist/webpack.cjs +42 -16
  153. package/dist/webpack.d.cts +5 -29
  154. package/dist/webpack.d.cts.map +1 -1
  155. package/dist/webpack.d.mts +5 -32
  156. package/dist/webpack.d.mts.map +1 -1
  157. package/dist/webpack.mjs +26 -11
  158. package/dist/webpack.mjs.map +1 -0
  159. package/package.json +15 -15
  160. package/dist/api-CY668wMZ.mjs.map +0 -1
  161. package/dist/commands-7TWNqTU1.d.cts +0 -12
  162. package/dist/commands-7TWNqTU1.d.cts.map +0 -1
  163. package/dist/commands-yacLkOi0.d.mts +0 -12
  164. package/dist/commands-yacLkOi0.d.mts.map +0 -1
  165. package/dist/config-CK756s0L.d.mts +0 -2232
  166. package/dist/config-CK756s0L.d.mts.map +0 -1
  167. package/dist/config-CiPXgwzt.d.mts +0 -39
  168. package/dist/config-CiPXgwzt.d.mts.map +0 -1
  169. package/dist/config-D4Fh2gQL.mjs +0 -87
  170. package/dist/config-D4Fh2gQL.mjs.map +0 -1
  171. package/dist/config-D86Vw7SC.cjs +0 -105
  172. package/dist/config-J74ORCFY.d.cts +0 -39
  173. package/dist/config-J74ORCFY.d.cts.map +0 -1
  174. package/dist/config-vnrrSxEB.d.cts +0 -2232
  175. package/dist/config-vnrrSxEB.d.cts.map +0 -1
  176. package/dist/constants-CZh5rsgh.cjs +0 -103
  177. package/dist/constants-cXxSHhNp.mjs +0 -32
  178. package/dist/constants-cXxSHhNp.mjs.map +0 -1
  179. package/dist/constants.d.cts.map +0 -1
  180. package/dist/constants.d.mts.map +0 -1
  181. package/dist/esbuild-B3NuCco0.cjs +0 -100
  182. package/dist/esbuild-DWiE0pYc.mjs +0 -82
  183. package/dist/esbuild-DWiE0pYc.mjs.map +0 -1
  184. package/dist/index-2JXW-b2-.d.mts +0 -82
  185. package/dist/index-2JXW-b2-.d.mts.map +0 -1
  186. package/dist/index-6BLROVtJ.d.mts +0 -261
  187. package/dist/index-6BLROVtJ.d.mts.map +0 -1
  188. package/dist/index-C7W0kmm7.d.mts +0 -171
  189. package/dist/index-C7W0kmm7.d.mts.map +0 -1
  190. package/dist/index-DJ-k0GOX.d.cts +0 -261
  191. package/dist/index-DJ-k0GOX.d.cts.map +0 -1
  192. package/dist/paths-CS8ecCnW.mjs +0 -81
  193. package/dist/paths-CS8ecCnW.mjs.map +0 -1
  194. package/dist/paths-YmyIGEVo.cjs +0 -98
  195. package/dist/plugin-B9TQt-p0.d.cts +0 -82
  196. package/dist/plugin-B9TQt-p0.d.cts.map +0 -1
  197. package/dist/plugin-BE3wmhoU.d.cts +0 -26
  198. package/dist/plugin-BE3wmhoU.d.cts.map +0 -1
  199. package/dist/plugin-CZ_PJPpQ.cjs +0 -96
  200. package/dist/plugin-C_8RhG5V.d.mts +0 -26
  201. package/dist/plugin-C_8RhG5V.d.mts.map +0 -1
  202. package/dist/plugin-E5foRD0k.mjs +0 -61
  203. package/dist/plugin-E5foRD0k.mjs.map +0 -1
  204. package/dist/plugin-utils-C3HnZJl1.mjs +0 -387
  205. package/dist/plugin-utils-C3HnZJl1.mjs.map +0 -1
  206. package/dist/plugin-utils-Ck3cx3w6.cjs +0 -531
  207. package/dist/plugin-utils.d.cts.map +0 -1
  208. package/dist/plugin-utils.d.mts.map +0 -1
  209. package/dist/resolve-options-6sXFqzEA.mjs +0 -116
  210. package/dist/resolve-options-6sXFqzEA.mjs.map +0 -1
  211. package/dist/resolve-options-BQnTgg3V.cjs +0 -105
  212. package/dist/resolve-options-D-RGs8j8.mjs +0 -117
  213. package/dist/resolve-options-D-RGs8j8.mjs.map +0 -1
  214. package/dist/resolve-options-DHL3RM8F.mjs +0 -87
  215. package/dist/resolve-options-DHL3RM8F.mjs.map +0 -1
  216. package/dist/resolve-options-lxQ2pm0W.cjs +0 -127
  217. package/dist/resolve-options-vyFhhkLp.cjs +0 -133
  218. package/dist/rolldown-CQI8ps6f.cjs +0 -83
  219. package/dist/rolldown-DsXEFXyP.mjs +0 -65
  220. package/dist/rolldown-DsXEFXyP.mjs.map +0 -1
  221. package/dist/tsconfig-B92heKit.mjs.map +0 -1
  222. package/dist/types-Bh_vLuQ0.d.mts +0 -1
  223. package/dist/utils-BbDma_5Y.cjs +0 -449
  224. package/dist/utils-DoQcX7Sk.mjs +0 -339
  225. package/dist/utils-DoQcX7Sk.mjs.map +0 -1
  226. package/dist/virtual-B9imjOqe.mjs.map +0 -1
  227. package/dist/vite-Bx1gbbj3.mjs +0 -171
  228. package/dist/vite-Bx1gbbj3.mjs.map +0 -1
  229. package/dist/vite-XV170zx6.cjs +0 -189
  230. package/dist/webpack-9G4xJBfz.cjs +0 -107
  231. package/dist/webpack-BkTkELre.mjs +0 -88
  232. package/dist/webpack-BkTkELre.mjs.map +0 -1
  233. package/dist/write-file-CpNWY8SV.d.cts +0 -171
  234. package/dist/write-file-CpNWY8SV.d.cts.map +0 -1
@@ -1,261 +0,0 @@
1
- import { E as PrepareInlineConfig, En as InferHookParameters, Et as PluginContext, N as UserConfig, Nr as API, Tn as InferHookFunction, bt as EnvironmentContext, f as LintInlineConfig, h as NewInlineConfig, ht as APIContext, j as ResolvedConfig, n as BuildInlineConfig, o as DeployInlineConfig, r as CleanInlineConfig, s as DocsInlineConfig, u as InitialUserConfig, xn as CallHookOptions } from "./config-vnrrSxEB.cjs";
2
- import * as $ from "@stryke/capnp";
3
-
4
- //#region src/api.d.ts
5
-
6
- /**
7
- * The Powerlines API class
8
- *
9
- * @remarks
10
- * This class is responsible for managing the Powerlines project lifecycle, including initialization, building, and finalization.
11
- *
12
- * @public
13
- */
14
- declare class PowerlinesAPI<TResolvedConfig extends ResolvedConfig = ResolvedConfig> implements API<TResolvedConfig>, AsyncDisposable {
15
- #private;
16
- /**
17
- * The Powerlines context
18
- */
19
- get context(): APIContext<TResolvedConfig>;
20
- /**
21
- * Create a new Powerlines API instance
22
- *
23
- * @param context - The Powerlines context
24
- */
25
- private constructor();
26
- /**
27
- * Initialize a Powerlines API instance
28
- *
29
- * @param workspaceRoot - The directory of the underlying workspace the Powerlines project exists in
30
- * @param config - An object containing the configuration required to run Powerlines tasks.
31
- * @returns A new instance of the Powerlines API
32
- */
33
- static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(workspaceRoot: string, config: InitialUserConfig<TResolvedConfig["userConfig"]>): Promise<PowerlinesAPI<TResolvedConfig>>;
34
- /**
35
- * Prepare the Powerlines API
36
- *
37
- * @remarks
38
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
39
- *
40
- * @param inlineConfig - The inline configuration for the prepare command
41
- */
42
- prepare(inlineConfig?: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig): Promise<void>;
43
- /**
44
- * Create a new Powerlines project
45
- *
46
- * @remarks
47
- * This method will create a new Powerlines project in the current directory.
48
- *
49
- * @param inlineConfig - The inline configuration for the new command
50
- * @returns A promise that resolves when the project has been created
51
- */
52
- new(inlineConfig: NewInlineConfig): Promise<void>;
53
- /**
54
- * Clean any previously prepared artifacts
55
- *
56
- * @remarks
57
- * This method will remove the previous Powerlines artifacts from the project.
58
- *
59
- * @param inlineConfig - The inline configuration for the clean command
60
- * @returns A promise that resolves when the clean command has completed
61
- */
62
- clean(inlineConfig?: CleanInlineConfig | PrepareInlineConfig): Promise<void>;
63
- /**
64
- * Lint the project
65
- *
66
- * @param inlineConfig - The inline configuration for the lint command
67
- * @returns A promise that resolves when the lint command has completed
68
- */
69
- lint(inlineConfig?: LintInlineConfig | BuildInlineConfig): Promise<void>;
70
- /**
71
- * Build the project
72
- *
73
- * @remarks
74
- * This method will build the Powerlines project, generating the necessary artifacts.
75
- *
76
- * @param inlineConfig - The inline configuration for the build command
77
- * @returns A promise that resolves when the build command has completed
78
- */
79
- build(inlineConfig?: BuildInlineConfig): Promise<void>;
80
- /**
81
- * Prepare the documentation for the project
82
- *
83
- * @param inlineConfig - The inline configuration for the docs command
84
- * @returns A promise that resolves when the documentation generation has completed
85
- */
86
- docs(inlineConfig?: DocsInlineConfig): Promise<void>;
87
- /**
88
- * Deploy the project source code
89
- *
90
- * @remarks
91
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
92
- *
93
- * @param inlineConfig - The inline configuration for the deploy command
94
- */
95
- deploy(inlineConfig?: DeployInlineConfig): Promise<void>;
96
- /**
97
- * Finalization process
98
- *
99
- * @remarks
100
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
101
- *
102
- * @returns A promise that resolves when the finalization process has completed
103
- */
104
- finalize(): Promise<void>;
105
- /**
106
- * Invokes the configured plugin hooks
107
- *
108
- * @remarks
109
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
110
- *
111
- * @param hook - The hook to call
112
- * @param options - The options to provide to the hook
113
- * @param args - The arguments to pass to the hook
114
- * @returns The result of the hook call
115
- */
116
- callHook<TKey extends string>(hook: TKey, options: CallHookOptions & {
117
- environment?: string | EnvironmentContext<TResolvedConfig>;
118
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>): Promise<ReturnType<InferHookFunction<PluginContext<TResolvedConfig>, TKey>> | undefined>;
119
- /**
120
- * Dispose of the Powerlines API instance
121
- *
122
- * @remarks
123
- * This method will finalize the Powerlines API instance, cleaning up any resources used.
124
- */
125
- [Symbol.asyncDispose](): Promise<void>;
126
- }
127
- //#endregion
128
- //#region schemas/fs.d.ts
129
- declare const _capnpFileId: bigint;
130
- declare class FileMetadata_KeyValuePair extends $.Struct {
131
- static readonly _capnp: {
132
- displayName: string;
133
- id: string;
134
- size: $.ObjectSize;
135
- };
136
- get key(): string;
137
- set key(value: string);
138
- get value(): string;
139
- set value(value: string);
140
- toString(): string;
141
- }
142
- /**
143
- * The identifier for the file data.
144
- *
145
- */
146
- declare class FileMetadata extends $.Struct {
147
- static readonly KeyValuePair: typeof FileMetadata_KeyValuePair;
148
- static readonly _capnp: {
149
- displayName: string;
150
- id: string;
151
- size: $.ObjectSize;
152
- defaultType: string;
153
- };
154
- static _Properties: $.ListCtor<FileMetadata_KeyValuePair>;
155
- /**
156
- * The type of the file.
157
- *
158
- */
159
- get id(): string;
160
- set id(value: string);
161
- /**
162
- * The timestamp representing the file's creation date.
163
- *
164
- */
165
- get type(): string;
166
- set type(value: string);
167
- /**
168
- * Additional metadata associated with the file.
169
- *
170
- */
171
- get timestamp(): number;
172
- set timestamp(value: number);
173
- _adoptProperties(value: $.Orphan<$.List<FileMetadata_KeyValuePair>>): void;
174
- _disownProperties(): $.Orphan<$.List<FileMetadata_KeyValuePair>>;
175
- get properties(): $.List<FileMetadata_KeyValuePair>;
176
- _hasProperties(): boolean;
177
- _initProperties(length: number): $.List<FileMetadata_KeyValuePair>;
178
- set properties(value: $.List<FileMetadata_KeyValuePair>);
179
- toString(): string;
180
- }
181
- /**
182
- * An identifier for the file.
183
- *
184
- */
185
- declare class FileId extends $.Struct {
186
- static readonly _capnp: {
187
- displayName: string;
188
- id: string;
189
- size: $.ObjectSize;
190
- };
191
- /**
192
- * A virtual (or actual) path to the file in the file system.
193
- *
194
- */
195
- get id(): string;
196
- set id(value: string);
197
- get path(): string;
198
- set path(value: string);
199
- toString(): string;
200
- }
201
- /**
202
- * An identifier for the file.
203
- *
204
- */
205
- declare class FileStorage extends $.Struct {
206
- static readonly _capnp: {
207
- displayName: string;
208
- id: string;
209
- size: $.ObjectSize;
210
- };
211
- /**
212
- * A virtual (or actual) path to the file in the file system.
213
- *
214
- */
215
- get path(): string;
216
- set path(value: string);
217
- get code(): string;
218
- set code(value: string);
219
- toString(): string;
220
- }
221
- declare class FileSystem extends $.Struct {
222
- static readonly _capnp: {
223
- displayName: string;
224
- id: string;
225
- size: $.ObjectSize;
226
- };
227
- static _Ids: $.ListCtor<FileId>;
228
- static _Storage: $.ListCtor<FileStorage>;
229
- static _Metadata: $.ListCtor<FileMetadata>;
230
- _adoptIds(value: $.Orphan<$.List<FileId>>): void;
231
- _disownIds(): $.Orphan<$.List<FileId>>;
232
- get ids(): $.List<FileId>;
233
- _hasIds(): boolean;
234
- _initIds(length: number): $.List<FileId>;
235
- set ids(value: $.List<FileId>);
236
- _adoptStorage(value: $.Orphan<$.List<FileStorage>>): void;
237
- _disownStorage(): $.Orphan<$.List<FileStorage>>;
238
- get storage(): $.List<FileStorage>;
239
- _hasStorage(): boolean;
240
- _initStorage(length: number): $.List<FileStorage>;
241
- set storage(value: $.List<FileStorage>);
242
- _adoptMetadata(value: $.Orphan<$.List<FileMetadata>>): void;
243
- _disownMetadata(): $.Orphan<$.List<FileMetadata>>;
244
- get metadata(): $.List<FileMetadata>;
245
- _hasMetadata(): boolean;
246
- _initMetadata(length: number): $.List<FileMetadata>;
247
- set metadata(value: $.List<FileMetadata>);
248
- toString(): string;
249
- }
250
- //#endregion
251
- //#region src/index.d.ts
252
- /**
253
- * Creates a new {@link PowerlinesAPI} instance.
254
- *
255
- * @param options - The user configuration options.
256
- * @returns A promise that resolves to a {@link PowerlinesAPI} instance.
257
- */
258
- declare function createPowerlines(options?: Partial<UserConfig>): Promise<PowerlinesAPI>;
259
- //#endregion
260
- export { FileStorage as a, PowerlinesAPI as c, FileMetadata_KeyValuePair as i, FileId as n, FileSystem as o, FileMetadata as r, _capnpFileId as s, createPowerlines as t };
261
- //# sourceMappingURL=index-DJ-k0GOX.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DJ-k0GOX.d.cts","names":[],"sources":["../src/api.ts","../schemas/fs.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwGA;;;;;;AAkC4B,cAlCf,aAkCe,CAAA,wBAjCF,cAiCE,GAjCe,cAiCf,CAAA,YA/Bf,GA+Be,CA/BX,eA+BW,CAAA,EA/BO,eA+BP,CAAA;EAAiB,CAAA,OAAA;EAGf;;;EACjB,IAAA,OAAA,CAAA,CAAA,EAzBW,UAyBX,CAzBsB,eAyBtB,CAAA;EAAR;;;;;EAmDG,QAAA,WAAA,CAAA;EACA;;;;;;;EAoXH,OAAA,IAAA,CAAA,wBA5auB,cA4avB,GA5awC,cA4axC,CAAA,CAAA,aAAA,EAAA,MAAA,EAAA,MAAA,EAzaO,iBAyaP,CAzayB,eAyazB,CAAA,YAAA,CAAA,CAAA,CAAA,EAxaA,OAwaA,CAxaQ,aAwaR,CAxasB,eAwatB,CAAA,CAAA;EAsCa;;;;;;;;EAyF0C,OAAA,CAAA,YAAA,CAAA,EAxfpD,mBAwfoD,GAvfpD,eAufoD,GAtfpD,iBAsfoD,GArfpD,iBAqfoD,GApfpD,gBAofoD,GAnfpD,gBAmfoD,GAlfpD,kBAkfoD,CAAA,EAlfT,OAkfS,CAAA,IAAA,CAAA;EAoBrC;;;;;;;;;EA2B+C,GAAA,CAAA,YAAA,EA/PrC,eA+PqC,CAAA,EA/PtB,OA+PsB,CAAA,IAAA,CAAA;EAAA;;;;;;;;;EAznBpB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E,MANK,CAME,CAAA,CAAE,IANJ,CAMS,YANT,CAAA,CAAA;EAAL,IAAA,QAAA,CAAA,CAAA,EASL,CAAA,CAAE,IATG,CASE,YATF,CAAA;EAGiB,YAAA,CAAA,CAAA,EAAA,OAAA;EAAL,aAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAYF,CAAA,CAAE,IAZA,CAYK,YAZL,CAAA;EAAT,IAAA,QAAA,CAAA,KAAA,EAeJ,CAAA,CAAE,IAfE,CAeG,YAfH,CAAA;EAGW,QAAA,CAAA,CAAA,EAAA,MAAA;;;;ADzFrC;;;;;;AAkC4B,iBElGN,gBAAA,CFkGM,OAAA,CAAA,EEjGjB,OFiGiB,CEjGT,UFiGS,CAAA,CAAA,EEhGzB,OFgGyB,CEhGjB,aFgGiB,CAAA"}
@@ -1,81 +0,0 @@
1
- import { listFiles } from "@stryke/fs/list-files";
2
- import { appendPath } from "@stryke/path/append";
3
- import { replacePath } from "@stryke/path/replace";
4
- import { isParentPath } from "@stryke/path/is-parent-path";
5
- import { joinPaths } from "@stryke/path/join";
6
- import { format, resolveConfig } from "prettier";
7
-
8
- //#region ../core/src/lib/utilities/format.ts
9
- /**
10
- * Formats code using Prettier based on the file path.
11
- *
12
- * @param context - The Powerlines context.
13
- * @param path - The file path to use for resolving Prettier configuration.
14
- * @param data - The code string to format.
15
- * @param force - Whether to force formatting even for output/build paths.
16
- * @returns A promise that resolves to the formatted code string.
17
- */
18
- async function format$1(context, path, data, force = false) {
19
- if (!force && (isParentPath(path, appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || isParentPath(path, appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) return data;
20
- let code = data;
21
- const resolvedConfig = await resolveConfig(path);
22
- if (resolvedConfig) code = await format(data, {
23
- absolutePath: path,
24
- ...resolvedConfig
25
- });
26
- return code;
27
- }
28
- /**
29
- * Formats all files in a folder using Prettier based on their file paths.
30
- *
31
- * @param context - The Powerlines context.
32
- * @param path - The folder path containing files to format.
33
- * @returns A promise that resolves when all files have been formatted.
34
- */
35
- async function formatFolder(context, path) {
36
- if (!isParentPath(path, appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath(path, appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) await Promise.allSettled((await listFiles(path)).map(async (file) => {
37
- if (!isParentPath(file, appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath(file, appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
38
- const data = await context.fs.read(file);
39
- if (data) {
40
- const formatted = await format$1(context, file, data);
41
- return context.fs.write(file, formatted);
42
- }
43
- }
44
- }));
45
- }
46
-
47
- //#endregion
48
- //#region ../core/src/plugin-utils/paths.ts
49
- /**
50
- * Replaces tokens in the given path string with their corresponding values from the context.
51
- *
52
- * @remarks
53
- * The following tokens are supported:
54
- * - `{workspaceRoot}` - The root directory of the workspace.
55
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
56
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
57
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
58
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
59
- * - `{cachePath}` - The environment's directory for cached files.
60
- * - `{dataPath}` - The environment's directory for data files.
61
- * - `{logPath}` - The environment's directory for log files.
62
- * - `{tempPath}` - The environment's directory for temporary files.
63
- * - `{configPath}` - The environment's directory for configuration files.
64
- * - `{outputPath}` - The configured output directory for the project.
65
- * - `{buildPath}` - The configured distribution directory for the project.
66
- * - `{artifactsPath}` - The configured directory for build artifacts.
67
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
68
- * - `{entryPath}` - The configured directory for generated entry files.
69
- *
70
- * @param context - The context containing the values for the path tokens.
71
- * @param path - The path string with tokens to replace.
72
- * @returns The path string with tokens replaced by their corresponding values from the context.
73
- */
74
- function replacePathTokens(context, path) {
75
- if (!path) return path;
76
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.root).replaceAll("{projectRoot}", context.config.root).replaceAll("{sourceRoot}", joinPaths(context.config.root, "src")).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
77
- }
78
-
79
- //#endregion
80
- export { format$1 as n, formatFolder as r, replacePathTokens as t };
81
- //# sourceMappingURL=paths-CS8ecCnW.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths-CS8ecCnW.mjs","names":["format","prettier"],"sources":["../../core/src/lib/utilities/format.ts","../../core/src/plugin-utils/paths.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { format as prettier, resolveConfig } from \"prettier\";\nimport { Context } from \"../../types/context\";\n\n/**\n * Formats code using Prettier based on the file path.\n *\n * @param context - The Powerlines context.\n * @param path - The file path to use for resolving Prettier configuration.\n * @param data - The code string to format.\n * @param force - Whether to force formatting even for output/build paths.\n * @returns A promise that resolves to the formatted code string.\n */\nexport async function format(\n context: Context,\n path: string,\n data: string,\n force = false\n): Promise<string> {\n if (\n !force &&\n (isParentPath(\n path,\n appendPath(\n context.config.output.outputPath,\n context.workspaceConfig.workspaceRoot\n )\n ) ||\n isParentPath(\n path,\n appendPath(\n context.config.output.buildPath,\n context.workspaceConfig.workspaceRoot\n )\n ))\n ) {\n return data;\n }\n\n let code = data;\n const resolvedConfig = await resolveConfig(path);\n if (resolvedConfig) {\n code = await prettier(data, {\n absolutePath: path,\n ...resolvedConfig\n });\n }\n\n return code;\n}\n\n/**\n * Formats all files in a folder using Prettier based on their file paths.\n *\n * @param context - The Powerlines context.\n * @param path - The folder path containing files to format.\n * @returns A promise that resolves when all files have been formatted.\n */\nexport async function formatFolder(context: Context, path: string) {\n if (\n !isParentPath(\n path,\n appendPath(\n context.config.output.outputPath,\n context.workspaceConfig.workspaceRoot\n )\n ) &&\n !isParentPath(\n path,\n appendPath(\n context.config.output.buildPath,\n context.workspaceConfig.workspaceRoot\n )\n )\n ) {\n await Promise.allSettled(\n (await listFiles(path)).map(async file => {\n if (\n !isParentPath(\n file,\n appendPath(\n context.config.output.outputPath,\n context.workspaceConfig.workspaceRoot\n )\n ) &&\n !isParentPath(\n file,\n appendPath(\n context.config.output.buildPath,\n context.workspaceConfig.workspaceRoot\n )\n )\n ) {\n const data = await context.fs.read(file);\n if (data) {\n const formatted = await format(context, file, data);\n\n return context.fs.write(file, formatted);\n }\n }\n })\n );\n }\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { IsUndefined } from \"@stryke/types/base\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Replaces tokens in the given path string with their corresponding values from the context.\n *\n * @remarks\n * The following tokens are supported:\n * - `{workspaceRoot}` - The root directory of the workspace.\n * - `{root}` - The root directory of the project (same as `{projectRoot}`).\n * - `{projectRoot}` - The root directory of the project (same as `{root}`).\n * - `{sourceRoot}` - The source root directory of the project (usually `./src`).\n * - `{powerlinesPath}` - The directory where Powerlines is installed.\n * - `{cachePath}` - The environment's directory for cached files.\n * - `{dataPath}` - The environment's directory for data files.\n * - `{logPath}` - The environment's directory for log files.\n * - `{tempPath}` - The environment's directory for temporary files.\n * - `{configPath}` - The environment's directory for configuration files.\n * - `{outputPath}` - The configured output directory for the project.\n * - `{buildPath}` - The configured distribution directory for the project.\n * - `{artifactsPath}` - The configured directory for build artifacts.\n * - `{builtinPath}` - The configured directory for generated built-in plugins.\n * - `{entryPath}` - The configured directory for generated entry files.\n *\n * @param context - The context containing the values for the path tokens.\n * @param path - The path string with tokens to replace.\n * @returns The path string with tokens replaced by their corresponding values from the context.\n */\nexport function replacePathTokens(\n context: UnresolvedContext,\n path?: string\n): IsUndefined<typeof path> extends true ? undefined : string {\n if (!path) {\n return path as IsUndefined<typeof path> extends true ? undefined : string;\n }\n\n return path\n .replaceAll(\"{workspaceRoot}\", context.workspaceConfig.workspaceRoot)\n .replaceAll(\"{root}\", context.config.root)\n .replaceAll(\"{projectRoot}\", context.config.root)\n .replaceAll(\"{sourceRoot}\", joinPaths(context.config.root, \"src\"))\n .replaceAll(\"{powerlinesPath}\", context.powerlinesPath)\n .replaceAll(\"{cachePath}\", context.cachePath)\n .replaceAll(\"{dataPath}\", context.dataPath)\n .replaceAll(\"{logPath}\", context.envPaths.log)\n .replaceAll(\"{tempPath}\", context.envPaths.temp)\n .replaceAll(\"{configPath}\", context.envPaths.config)\n .replaceAll(\"{outputPath}\", context.config.output.outputPath)\n .replaceAll(\"{buildPath}\", context.config.output.buildPath)\n .replaceAll(\n \"{artifactsPath}\",\n replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)\n )\n .replaceAll(\n \"{builtinPath}\",\n replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)\n )\n .replaceAll(\n \"{entryPath}\",\n replacePath(context.entryPath, context.workspaceConfig.workspaceRoot)\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,eAAsBA,SACpB,SACA,MACA,MACA,QAAQ,OACS;AACjB,KACE,CAAC,UACA,aACC,MACA,WACE,QAAQ,OAAO,OAAO,YACtB,QAAQ,gBAAgB,cACzB,CACF,IACC,aACE,MACA,WACE,QAAQ,OAAO,OAAO,WACtB,QAAQ,gBAAgB,cACzB,CACF,EAEH,QAAO;CAGT,IAAI,OAAO;CACX,MAAM,iBAAiB,MAAM,cAAc,KAAK;AAChD,KAAI,eACF,QAAO,MAAMC,OAAS,MAAM;EAC1B,cAAc;EACd,GAAG;EACJ,CAAC;AAGJ,QAAO;;;;;;;;;AAUT,eAAsB,aAAa,SAAkB,MAAc;AACjE,KACE,CAAC,aACC,MACA,WACE,QAAQ,OAAO,OAAO,YACtB,QAAQ,gBAAgB,cACzB,CACF,IACD,CAAC,aACC,MACA,WACE,QAAQ,OAAO,OAAO,WACtB,QAAQ,gBAAgB,cACzB,CACF,CAED,OAAM,QAAQ,YACX,MAAM,UAAU,KAAK,EAAE,IAAI,OAAM,SAAQ;AACxC,MACE,CAAC,aACC,MACA,WACE,QAAQ,OAAO,OAAO,YACtB,QAAQ,gBAAgB,cACzB,CACF,IACD,CAAC,aACC,MACA,WACE,QAAQ,OAAO,OAAO,WACtB,QAAQ,gBAAgB,cACzB,CACF,EACD;GACA,MAAM,OAAO,MAAM,QAAQ,GAAG,KAAK,KAAK;AACxC,OAAI,MAAM;IACR,MAAM,YAAY,MAAMD,SAAO,SAAS,MAAM,KAAK;AAEnD,WAAO,QAAQ,GAAG,MAAM,MAAM,UAAU;;;GAG5C,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzEL,SAAgB,kBACd,SACA,MAC4D;AAC5D,KAAI,CAAC,KACH,QAAO;AAGT,QAAO,KACJ,WAAW,mBAAmB,QAAQ,gBAAgB,cAAc,CACpE,WAAW,UAAU,QAAQ,OAAO,KAAK,CACzC,WAAW,iBAAiB,QAAQ,OAAO,KAAK,CAChD,WAAW,gBAAgB,UAAU,QAAQ,OAAO,MAAM,MAAM,CAAC,CACjE,WAAW,oBAAoB,QAAQ,eAAe,CACtD,WAAW,eAAe,QAAQ,UAAU,CAC5C,WAAW,cAAc,QAAQ,SAAS,CAC1C,WAAW,aAAa,QAAQ,SAAS,IAAI,CAC7C,WAAW,cAAc,QAAQ,SAAS,KAAK,CAC/C,WAAW,gBAAgB,QAAQ,SAAS,OAAO,CACnD,WAAW,gBAAgB,QAAQ,OAAO,OAAO,WAAW,CAC5D,WAAW,eAAe,QAAQ,OAAO,OAAO,UAAU,CAC1D,WACC,mBACA,YAAY,QAAQ,eAAe,QAAQ,gBAAgB,cAAc,CAC1E,CACA,WACC,iBACA,YAAY,QAAQ,cAAc,QAAQ,gBAAgB,cAAc,CACzE,CACA,WACC,eACA,YAAY,QAAQ,WAAW,QAAQ,gBAAgB,cAAc,CACtE"}
@@ -1,98 +0,0 @@
1
- const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- let __stryke_fs_list_files = require("@stryke/fs/list-files");
3
- let __stryke_path_append = require("@stryke/path/append");
4
- let __stryke_path_replace = require("@stryke/path/replace");
5
- let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
6
- let __stryke_path_join = require("@stryke/path/join");
7
- let prettier = require("prettier");
8
-
9
- //#region ../core/src/lib/utilities/format.ts
10
- /**
11
- * Formats code using Prettier based on the file path.
12
- *
13
- * @param context - The Powerlines context.
14
- * @param path - The file path to use for resolving Prettier configuration.
15
- * @param data - The code string to format.
16
- * @param force - Whether to force formatting even for output/build paths.
17
- * @returns A promise that resolves to the formatted code string.
18
- */
19
- async function format(context, path, data, force = false) {
20
- if (!force && ((0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || (0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) return data;
21
- let code = data;
22
- const resolvedConfig = await (0, prettier.resolveConfig)(path);
23
- if (resolvedConfig) code = await (0, prettier.format)(data, {
24
- absolutePath: path,
25
- ...resolvedConfig
26
- });
27
- return code;
28
- }
29
- /**
30
- * Formats all files in a folder using Prettier based on their file paths.
31
- *
32
- * @param context - The Powerlines context.
33
- * @param path - The folder path containing files to format.
34
- * @returns A promise that resolves when all files have been formatted.
35
- */
36
- async function formatFolder(context, path) {
37
- if (!(0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !(0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) await Promise.allSettled((await (0, __stryke_fs_list_files.listFiles)(path)).map(async (file) => {
38
- if (!(0, __stryke_path_is_parent_path.isParentPath)(file, (0, __stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !(0, __stryke_path_is_parent_path.isParentPath)(file, (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
39
- const data = await context.fs.read(file);
40
- if (data) {
41
- const formatted = await format(context, file, data);
42
- return context.fs.write(file, formatted);
43
- }
44
- }
45
- }));
46
- }
47
-
48
- //#endregion
49
- //#region ../core/src/plugin-utils/paths.ts
50
- /**
51
- * Replaces tokens in the given path string with their corresponding values from the context.
52
- *
53
- * @remarks
54
- * The following tokens are supported:
55
- * - `{workspaceRoot}` - The root directory of the workspace.
56
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
57
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
58
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
59
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
60
- * - `{cachePath}` - The environment's directory for cached files.
61
- * - `{dataPath}` - The environment's directory for data files.
62
- * - `{logPath}` - The environment's directory for log files.
63
- * - `{tempPath}` - The environment's directory for temporary files.
64
- * - `{configPath}` - The environment's directory for configuration files.
65
- * - `{outputPath}` - The configured output directory for the project.
66
- * - `{buildPath}` - The configured distribution directory for the project.
67
- * - `{artifactsPath}` - The configured directory for build artifacts.
68
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
69
- * - `{entryPath}` - The configured directory for generated entry files.
70
- *
71
- * @param context - The context containing the values for the path tokens.
72
- * @param path - The path string with tokens to replace.
73
- * @returns The path string with tokens replaced by their corresponding values from the context.
74
- */
75
- function replacePathTokens(context, path) {
76
- if (!path) return path;
77
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.root).replaceAll("{projectRoot}", context.config.root).replaceAll("{sourceRoot}", (0, __stryke_path_join.joinPaths)(context.config.root, "src")).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", (0, __stryke_path_replace.replacePath)(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", (0, __stryke_path_replace.replacePath)(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", (0, __stryke_path_replace.replacePath)(context.entryPath, context.workspaceConfig.workspaceRoot));
78
- }
79
-
80
- //#endregion
81
- Object.defineProperty(exports, 'format', {
82
- enumerable: true,
83
- get: function () {
84
- return format;
85
- }
86
- });
87
- Object.defineProperty(exports, 'formatFolder', {
88
- enumerable: true,
89
- get: function () {
90
- return formatFolder;
91
- }
92
- });
93
- Object.defineProperty(exports, 'replacePathTokens', {
94
- enumerable: true,
95
- get: function () {
96
- return replacePathTokens;
97
- }
98
- });
@@ -1,82 +0,0 @@
1
- import { Cr as UnpluginFactory, Et as PluginContext, Ft as UnresolvedContext, Sr as UnpluginBuilderVariant } from "./config-vnrrSxEB.cjs";
2
- import { UnpluginBuildContext, UnpluginOptions } from "unplugin";
3
-
4
- //#region ../core/src/lib/unplugin/helpers.d.ts
5
-
6
- /**
7
- * Merges a base plugin context with an unplugin context, combining their properties.
8
- *
9
- * @param contextA - The base plugin context to merge into.
10
- * @param contextB - The unplugin context to merge from.
11
- * @returns The merged context.
12
- */
13
- declare function combineContexts<TContextA extends UnresolvedContext | UnpluginBuildContext, TContextB extends UnresolvedContext | UnpluginBuildContext>(contextA: TContextA, contextB: TContextB): TContextA & TContextB;
14
- /**
15
- * Checks if a value is a valid UnpluginBuilderVariant.
16
- *
17
- * @param str - The value to check.
18
- * @returns True if the value is a UnpluginBuilderVariant, false otherwise.
19
- */
20
- declare function isUnpluginBuilderVariant(str: unknown): str is UnpluginBuilderVariant;
21
- //#endregion
22
- //#region ../core/src/lib/unplugin/module-resolution.d.ts
23
- interface CreateUnpluginModuleResolutionFunctionsOptions {
24
- /**
25
- * An indicator of whether to prefix virtual module IDs with a specific string. This is useful for ensuring that virtual modules are only processed by the plugin and not by other plugins or the bundler itself.
26
- *
27
- * @remarks
28
- * - If set to `true`, virtual module IDs will be prefixed with the string `__powerlines-virtual:`.
29
- * - If set to `false`, no prefix will be added to virtual module IDs.
30
- *
31
- * @defaultValue true
32
- */
33
- prefix?: boolean;
34
- }
35
- /**
36
- * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
37
- *
38
- * @remarks
39
- * This includes the `resolveId` and `load` hooks.
40
- *
41
- * @see https://rollupjs.org/plugin-development/#resolveid
42
- * @see https://rollupjs.org/plugin-development/#load
43
- *
44
- * @param context - The plugin context.
45
- * @param options - Options for creating the module resolution functions.
46
- * @returns The module resolution hooks (`resolveId` and `load`).
47
- */
48
- declare function createUnpluginModuleResolutionFunctions<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginModuleResolutionFunctionsOptions): Pick<UnpluginOptions, "resolveId" | "load">;
49
- declare type __ΩCreateUnpluginModuleResolutionFunctionsOptions = any[];
50
- //#endregion
51
- //#region ../core/src/lib/unplugin/plugin.d.ts
52
- interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {
53
- /**
54
- * A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.
55
- *
56
- * @remarks
57
- * If not provided, the plugin will be named "unplugin". If provided, the plugin will be named `${name} - Unplugin` (e.g., "MyPlugin - Unplugin").
58
- *
59
- * @defaultValue "unplugin"
60
- */
61
- name?: string;
62
- }
63
- /**
64
- * Creates a Powerlines unplugin instance.
65
- *
66
- * @param context - The plugin context.
67
- * @returns The unplugin instance.
68
- */
69
- declare function createUnpluginResolver<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginResolverOptions): UnpluginFactory<TContext>;
70
- interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}
71
- /**
72
- * Creates a Powerlines unplugin instance.
73
- *
74
- * @param context - The plugin context.
75
- * @returns The unplugin instance.
76
- */
77
- declare function createUnplugin<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginOptions): UnpluginFactory<TContext>;
78
- declare type __ΩCreateUnpluginResolverOptions = any[];
79
- declare type __ΩCreateUnpluginOptions = any[];
80
- //#endregion
81
- export { createUnplugin as a, __ΩCreateUnpluginModuleResolutionFunctionsOptions as c, isUnpluginBuilderVariant as d, __ΩCreateUnpluginResolverOptions as i, createUnpluginModuleResolutionFunctions as l, CreateUnpluginResolverOptions as n, createUnpluginResolver as o, __ΩCreateUnpluginOptions as r, CreateUnpluginModuleResolutionFunctionsOptions as s, CreateUnpluginOptions as t, combineContexts as u };
82
- //# sourceMappingURL=plugin-B9TQt-p0.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-B9TQt-p0.d.cts","names":[],"sources":["../../core/src/lib/unplugin/helpers.ts","../../core/src/lib/unplugin/module-resolution.ts","../../core/src/lib/unplugin/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;AAgCA;;;;;;AAGiC,iBAHjB,eAGiB,CAAA,kBAFb,iBAEa,GAFO,oBAEP,EAAA,kBADb,iBACa,GADO,oBACP,CAAA,CAAA,QAAA,EAArB,SAAqB,EAAA,QAAA,EAAA,SAAA,CAAA,EAAY,SAAZ,GAAwB,SAAxB;;;;AAUjC;;;iBAAgB,wBAAA,uBAEN;;;UClBO,8CAAA;;ADGjB;;;;;;;;EAGyD,MAAA,CAAA,EAAA,OAAA;;AAUzD;;;;AChBA;AA6BA;;;;;;;;iBAAgB,yDACG,gBAAgB,wBAExB,oBACA,iDACR,KAAK;;;;UCzBS,6BAAA,SAAsC;EFNvC;;;;;;;;EAGyC,IAAA,CAAA,EAAA,MAAA;;AAUzD;;;;AChBA;AA6BA;AACmB,iBCHH,sBDGG,CAAA,iBCFA,aDEA,GCFgB,aDEhB,CAAA,CAAA,OAAA,ECAR,QDAQ,EAAA,OAAA,CAAA,ECCR,6BDDQ,CAAA,ECEhB,eDFgB,CCEA,QDFA,CAAA;AAAgB,UCwClB,qBAAA,SAA8B,6BDxCZ,CAAA;;;;;;;iBCgDnB,gCAAgC,gBAAgB,wBACrD,oBACA,wBACR,gBAAgB;;AAxEF,wCAA8B,GAAQ,EAAA"}
@@ -1,26 +0,0 @@
1
- import { Et as PluginContext, N as UserConfig$1, a as ConfigEnv, j as ResolvedConfig$1 } from "./config-vnrrSxEB.cjs";
2
- import { DepOptimizationOptions, UserConfig } from "vite";
3
-
4
- //#region ../plugin-vite/src/types/build.d.ts
5
- type ViteOptions = Omit<UserConfig, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output" | "platform" | "define" | "external"> & {
6
- /**
7
- * Optimize deps config
8
- */
9
- optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
10
- };
11
- //#endregion
12
- //#region ../plugin-vite/src/types/plugin.d.ts
13
- type VitePluginOptions = Partial<ViteOptions>;
14
- interface VitePluginUserConfig extends UserConfig$1 {
15
- vite?: VitePluginOptions;
16
- }
17
- interface VitePluginResolvedConfig extends ResolvedConfig$1 {
18
- vite: ViteOptions;
19
- }
20
- type VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = PluginContext<TResolvedConfig> & {
21
- dev: boolean;
22
- configEnv: ConfigEnv;
23
- };
24
- //#endregion
25
- export { VitePluginOptions as n, VitePluginUserConfig as r, VitePluginContext as t };
26
- //# sourceMappingURL=plugin-BE3wmhoU.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-BE3wmhoU.d.cts","names":[],"sources":["../../plugin-vite/src/types/build.ts","../../plugin-vite/src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAoBY,WAAA,GAAc,KACxB;;;AADF;EACE,YAAA,CAAA,EAce,IAdf,CAcoB,sBAdpB,EAAA,YAAA,CAAA;CADwB;;;KCMd,iBAAA,GAAoB,QAAQ;UAEvB,oBAAA,SAA6B;EDRlC,IAAA,CAAA,ECSH,iBDTc;;AAAG,UCYT,wBAAA,SAAiC,gBDZxB,CAAA;EAeJ,IAAA,ECFd,WDEc;;AAAD,KCCT,iBDDS,CAAA,wBCEK,wBDFL,GCEgC,wBDFhC,CAAA,GCGjB,aDHiB,CCGH,eDHG,CAAA,GAAA;;aCKR"}