powerlines 0.23.9 → 0.23.10

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 (82) hide show
  1. package/dist/api.cjs +2 -2
  2. package/dist/api.js +1 -1
  3. package/dist/astro.cjs +4 -4
  4. package/dist/astro.js +3 -3
  5. package/dist/babel-types.d.ts +292 -0
  6. package/dist/{chunk-UYJXRMS3.js → chunk-3W5CN3M3.js} +1 -1
  7. package/dist/{chunk-6ZKM7WOB.cjs → chunk-4EIGDACJ.cjs} +12 -10
  8. package/dist/{chunk-FJWXCUGQ.cjs → chunk-4TBQYHPZ.cjs} +3 -3
  9. package/dist/{chunk-RKMUBSYG.js → chunk-7G7OFGGH.js} +1 -1
  10. package/dist/{chunk-FDEGM4CR.js → chunk-MUNYXQYT.js} +12 -10
  11. package/dist/{chunk-G5K3I7JU.cjs → chunk-PR3JGGAL.cjs} +2 -2
  12. package/dist/{chunk-ITL6JGKX.cjs → chunk-SNHUEYEP.cjs} +2 -2
  13. package/dist/{chunk-S47BU5QR.js → chunk-SS5AXCGJ.js} +1 -1
  14. package/dist/{chunk-2QLM4MYP.cjs → chunk-WBC2XOMT.cjs} +2 -2
  15. package/dist/{chunk-KOBCKTHY.js → chunk-ZIWN73GA.js} +1 -1
  16. package/dist/esbuild.cjs +6 -6
  17. package/dist/esbuild.js +3 -3
  18. package/dist/farm.cjs +3 -3
  19. package/dist/farm.js +2 -2
  20. package/dist/index.cjs +14 -14
  21. package/dist/index.js +2 -2
  22. package/dist/lib/{chunk-7XHBIYIN.cjs → chunk-7VJ42H2I.cjs} +0 -16
  23. package/dist/lib/{chunk-YH5GOJS3.js → chunk-FQLZZYYO.js} +1 -16
  24. package/dist/lib/{chunk-OI7EHXNE.js → chunk-HNOAMIRO.js} +3 -3
  25. package/dist/lib/{chunk-B3DJ4CXY.cjs → chunk-I6TJUFA6.cjs} +10 -10
  26. package/dist/lib/chunk-K3NBD5LL.cjs +75 -0
  27. package/dist/lib/{chunk-AHONHQGB.js → chunk-OJ5XFCZN.js} +1 -1
  28. package/dist/lib/{chunk-LQEGZT5U.cjs → chunk-QABAD5RE.cjs} +10 -8
  29. package/dist/lib/{chunk-3KR6TYGW.cjs → chunk-RBSNQFLF.cjs} +16 -16
  30. package/dist/lib/{chunk-BGGENJH4.js → chunk-VDPCG3RR.js} +3 -3
  31. package/dist/lib/{chunk-SMZ672RP.cjs → chunk-VLOUSKRX.cjs} +6 -6
  32. package/dist/lib/chunk-XBM7FHNK.js +68 -0
  33. package/dist/lib/{chunk-63MH3ERQ.js → chunk-XG4CC73V.js} +4 -2
  34. package/dist/lib/config-file.cjs +3 -3
  35. package/dist/lib/config-file.js +1 -1
  36. package/dist/lib/contexts/api-context.cjs +6 -6
  37. package/dist/lib/contexts/api-context.js +5 -5
  38. package/dist/lib/contexts/context.cjs +4 -4
  39. package/dist/lib/contexts/context.js +3 -3
  40. package/dist/lib/contexts/environment-context.cjs +5 -5
  41. package/dist/lib/contexts/environment-context.js +4 -4
  42. package/dist/lib/contexts/index.cjs +8 -8
  43. package/dist/lib/contexts/index.js +5 -5
  44. package/dist/lib/index.cjs +19 -23
  45. package/dist/lib/index.d.cts +1 -1
  46. package/dist/lib/index.d.ts +1 -1
  47. package/dist/lib/index.js +6 -6
  48. package/dist/lib/unplugin/factory.cjs +7 -7
  49. package/dist/lib/unplugin/factory.js +6 -6
  50. package/dist/lib/unplugin/index.cjs +7 -7
  51. package/dist/lib/unplugin/index.js +6 -6
  52. package/dist/lib/utilities/index.cjs +7 -11
  53. package/dist/lib/utilities/index.d.cts +1 -1
  54. package/dist/lib/utilities/index.d.ts +1 -1
  55. package/dist/lib/utilities/index.js +1 -1
  56. package/dist/lib/utilities/meta.cjs +7 -11
  57. package/dist/lib/utilities/meta.d.cts +1 -2
  58. package/dist/lib/utilities/meta.d.ts +1 -2
  59. package/dist/lib/utilities/meta.js +1 -1
  60. package/dist/next.cjs +4 -4
  61. package/dist/next.js +3 -3
  62. package/dist/nuxt.cjs +6 -6
  63. package/dist/nuxt.js +4 -4
  64. package/dist/rolldown.cjs +3 -3
  65. package/dist/rolldown.js +2 -2
  66. package/dist/rollup.cjs +3 -3
  67. package/dist/rollup.js +2 -2
  68. package/dist/rspack.cjs +3 -3
  69. package/dist/rspack.js +2 -2
  70. package/dist/tsup.cjs +4 -4
  71. package/dist/tsup.js +3 -3
  72. package/dist/unloader.cjs +3 -3
  73. package/dist/unloader.js +2 -2
  74. package/dist/unplugin.cjs +7 -7
  75. package/dist/unplugin.js +3 -3
  76. package/dist/vite.cjs +6 -6
  77. package/dist/vite.js +3 -3
  78. package/dist/webpack.cjs +6 -6
  79. package/dist/webpack.js +3 -3
  80. package/package.json +3 -2
  81. package/dist/lib/chunk-7JAGT5GC.cjs +0 -74
  82. package/dist/lib/chunk-PVCAB6BZ.js +0 -67
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZKM7WOB_cjs = require('./chunk-6ZKM7WOB.cjs');
3
+ var chunk4EIGDACJ_cjs = require('./chunk-4EIGDACJ.cjs');
4
4
  require('./chunk-ETKZMGLN.cjs');
5
5
  require('./chunk-PAMSESZV.cjs');
6
6
  require('./chunk-AYKZK666.cjs');
@@ -10,5 +10,5 @@ require('./chunk-USNT2KNT.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PowerlinesAPI", {
12
12
  enumerable: true,
13
- get: function () { return chunk6ZKM7WOB_cjs.PowerlinesAPI; }
13
+ get: function () { return chunk4EIGDACJ_cjs.PowerlinesAPI; }
14
14
  });
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- export { PowerlinesAPI } from './chunk-FDEGM4CR.js';
1
+ export { PowerlinesAPI } from './chunk-MUNYXQYT.js';
2
2
  import './chunk-JQCWV4DT.js';
3
3
  import './chunk-JKBJF3UI.js';
4
4
  import './chunk-VT7NVLLU.js';
package/dist/astro.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkITL6JGKX_cjs = require('./chunk-ITL6JGKX.cjs');
5
+ var chunkSNHUEYEP_cjs = require('./chunk-SNHUEYEP.cjs');
6
6
  require('./chunk-5IBA5HC2.cjs');
7
- require('./chunk-FJWXCUGQ.cjs');
8
- require('./chunk-6ZKM7WOB.cjs');
7
+ require('./chunk-4TBQYHPZ.cjs');
8
+ require('./chunk-4EIGDACJ.cjs');
9
9
  require('./chunk-ETKZMGLN.cjs');
10
10
  require('./chunk-PAMSESZV.cjs');
11
11
  require('./chunk-AYKZK666.cjs');
@@ -15,7 +15,7 @@ var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
15
15
  var astro = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((config) => ({
16
16
  vite: {
17
17
  plugins: [
18
- chunkITL6JGKX_cjs.vite_default(config)
18
+ chunkSNHUEYEP_cjs.vite_default(config)
19
19
  ]
20
20
  }
21
21
  }), "astro");
package/dist/astro.js CHANGED
@@ -1,7 +1,7 @@
1
- import { vite_default } from './chunk-UYJXRMS3.js';
1
+ import { vite_default } from './chunk-3W5CN3M3.js';
2
2
  import './chunk-VBR53KGY.js';
3
- import './chunk-RKMUBSYG.js';
4
- import './chunk-FDEGM4CR.js';
3
+ import './chunk-7G7OFGGH.js';
4
+ import './chunk-MUNYXQYT.js';
5
5
  import './chunk-JQCWV4DT.js';
6
6
  import './chunk-JKBJF3UI.js';
7
7
  import './chunk-VT7NVLLU.js';
@@ -0,0 +1,292 @@
1
+ /* -------------------------------------------------------------------
2
+
3
+ ⚡ Storm Software - Powerlines
4
+
5
+ This code was released as part of the Powerlines project. Powerlines
6
+ is maintained by Storm Software under the Apache-2.0 license, and is
7
+ free for commercial and private use. For more information, please visit
8
+ our licensing page at https://stormsoftware.com/licenses/projects/powerlines.
9
+
10
+ Website: https://stormsoftware.com
11
+ Repository: https://github.com/storm-software/powerlines
12
+ Documentation: https://docs.stormsoftware.com/projects/powerlines
13
+ Contact: https://stormsoftware.com/contact
14
+
15
+ SPDX-License-Identifier: Apache-2.0
16
+
17
+ ------------------------------------------------------------------- */
18
+
19
+ import type { ConfigAPI, NodePath, types as t } from "@babel/core";
20
+ import type { HubInterface } from "@babel/traverse";
21
+
22
+ declare module "@babel/helper-plugin-utils" {
23
+ const knownAssumptions: readonly [
24
+ "arrayLikeIsIterable",
25
+ "constantReexports",
26
+ "constantSuper",
27
+ "enumerableModuleMeta",
28
+ "ignoreFunctionLength",
29
+ "ignoreToPrimitiveHint",
30
+ "iterableIsArray",
31
+ "mutableTemplateObject",
32
+ "noClassCalls",
33
+ "noDocumentAll",
34
+ "noIncompleteNsImportDetection",
35
+ "noNewArrows",
36
+ "noUninitializedPrivateFieldAccess",
37
+ "objectRestNoSymbols",
38
+ "privateFieldsAsSymbols",
39
+ "privateFieldsAsProperties",
40
+ "pureGetters",
41
+ "setClassMethods",
42
+ "setComputedProperties",
43
+ "setPublicClassFields",
44
+ "setSpreadProperties",
45
+ "skipForOfIteratorClosing",
46
+ "superIsCallableConstructor"
47
+ ];
48
+
49
+ export type AssumptionName = (typeof knownAssumptions)[number];
50
+
51
+ type AssumptionFunction = (name: AssumptionName) => boolean | undefined;
52
+
53
+ export type Target =
54
+ | "node"
55
+ | "deno"
56
+ | "chrome"
57
+ | "opera"
58
+ | "edge"
59
+ | "firefox"
60
+ | "safari"
61
+ | "ie"
62
+ | "ios"
63
+ | "android"
64
+ | "electron"
65
+ | "samsung"
66
+ | "opera_mobile";
67
+
68
+ export type Targets = {
69
+ [target in Target]?: string;
70
+ };
71
+
72
+ type TargetsFunction = () => Targets;
73
+
74
+ export type PresetAPI = {
75
+ targets: TargetsFunction;
76
+ addExternalDependency: (ref: string) => void;
77
+ } & ConfigAPI;
78
+
79
+ export type PluginAPI = {
80
+ assumption: AssumptionFunction;
81
+ } & PresetAPI &
82
+ BabelAPI;
83
+ }
84
+
85
+ declare module "@babel/core" {
86
+ export interface BabelFile
87
+ extends HubInterface,
88
+ Pick<PluginPass, "get" | "set"> {}
89
+ }
90
+
91
+ declare module "@babel/helper-module-transforms" {
92
+ interface LocalExportMetadata {
93
+ /**
94
+ * names of exports
95
+ */
96
+ names: string[];
97
+ kind: "import" | "hoisted" | "block" | "var";
98
+ }
99
+
100
+ type InteropType =
101
+ /**
102
+ * Babel interop for default-only imports
103
+ */
104
+ | "default"
105
+ /**
106
+ * Babel interop for namespace or default+named imports
107
+ */
108
+ | "namespace"
109
+ /**
110
+ * Node.js interop for default-only imports
111
+ */
112
+ | "node-default"
113
+ /**
114
+ * Node.js interop for namespace or default+named imports
115
+ */
116
+ | "node-namespace"
117
+ /**
118
+ * No interop, or named-only imports
119
+ */
120
+ | "none";
121
+
122
+ interface SourceModuleMetadata {
123
+ /**
124
+ * A unique variable name to use for this namespace object.
125
+ * Centralized for simplicity.
126
+ */
127
+ name: string;
128
+ loc: t.SourceLocation | undefined | null;
129
+ interop: InteropType;
130
+ /**
131
+ * Local binding to reference from this source namespace.
132
+ * Key: Local name, value: Import name
133
+ */
134
+ imports: Map<string, string>;
135
+ /**
136
+ * Local names that reference namespace object.
137
+ */
138
+ importsNamespace: Set<string>;
139
+ /**
140
+ * Reexports to create for namespace. Key: Export name, value: Import name
141
+ */
142
+ reexports: Map<string, string>;
143
+ /**
144
+ * List of names to re-export namespace as.
145
+ */
146
+ reexportNamespace: Set<string>;
147
+ /**
148
+ * Tracks if the source should be re-exported.
149
+ */
150
+ reexportAll: null | {
151
+ loc: t.SourceLocation | undefined | null;
152
+ };
153
+ wrap?: unknown;
154
+ referenced: boolean;
155
+ }
156
+
157
+ interface ModuleMetadata {
158
+ exportName: string;
159
+ /**
160
+ * The name of the variable that will reference an object
161
+ * containing export names.
162
+ */
163
+ exportNameListName: null | string;
164
+ hasExports: boolean;
165
+ /**
166
+ * Lookup from local binding to export information.
167
+ */
168
+ local: Map<string, LocalExportMetadata>;
169
+ /**
170
+ * Lookup of source file to source file metadata.
171
+ */
172
+ source: Map<string, SourceModuleMetadata>;
173
+ /**
174
+ * List of names that should only be printed as string literals.
175
+ * i.e. `import { "any unicode" as foo } from "some-module"`
176
+ * `stringSpecifiers` is `Set(1) ["any unicode"]`
177
+ * In most cases `stringSpecifiers` is an empty Set
178
+ */
179
+ stringSpecifiers: Set<string>;
180
+ }
181
+
182
+ type ImportInterop =
183
+ | "none"
184
+ | "babel"
185
+ | "node"
186
+ | ((source: string, filename?: string) => "none" | "babel" | "node");
187
+
188
+ type Lazy = boolean | string[] | ((source: string) => boolean);
189
+
190
+ interface RootOptions {
191
+ filename?: string | null;
192
+ filenameRelative?: string | null;
193
+ sourceRoot?: string | null;
194
+ }
195
+
196
+ export interface PluginOptions {
197
+ moduleId?: string;
198
+ moduleIds?: boolean;
199
+ getModuleId?: (moduleName: string) => string | null | undefined;
200
+ moduleRoot?: string;
201
+ }
202
+
203
+ export function getModuleName(
204
+ rootOpts: RootOptions,
205
+ pluginOpts: PluginOptions
206
+ ): string | null;
207
+
208
+ export interface RewriteModuleStatementsAndPrepareHeaderOptions {
209
+ exportName?: string;
210
+ strict?: boolean;
211
+ allowTopLevelThis?: boolean;
212
+ strictMode?: boolean;
213
+ loose?: boolean;
214
+ importInterop?: ImportInterop;
215
+ noInterop?: boolean;
216
+ lazy?: Lazy;
217
+ getWrapperPayload?: (
218
+ source: string,
219
+ metadata: SourceModuleMetadata,
220
+ importNodes: t.Node[]
221
+ ) => unknown;
222
+ wrapReference?: (
223
+ ref: t.Expression,
224
+ payload: unknown
225
+ ) => t.Expression | null | undefined;
226
+ esNamespaceOnly?: boolean;
227
+ filename: string | undefined | null;
228
+ constantReexports?: boolean | void;
229
+ enumerableModuleMeta?: boolean | void;
230
+ noIncompleteNsImportDetection?: boolean | void;
231
+ }
232
+
233
+ /**
234
+ * Perform all of the generic ES6 module rewriting needed to handle initial
235
+ * module processing. This function will rewrite the majority of the given
236
+ * program to reference the modules described by the returned metadata,
237
+ * and returns a list of statements for use when initializing the module.
238
+ */
239
+ export function rewriteModuleStatementsAndPrepareHeader(
240
+ path: NodePath<t.Program>,
241
+ options: RewriteModuleStatementsAndPrepareHeaderOptions
242
+ ): {
243
+ meta: ModuleMetadata;
244
+ headers: t.Statement[];
245
+ };
246
+
247
+ /**
248
+ * Check if a given source is an anonymous import, e.g. `import 'foo';`
249
+ */
250
+ export function isSideEffectImport(source: SourceModuleMetadata): boolean;
251
+
252
+ /**
253
+ * Create the runtime initialization statements for a given requested source.
254
+ * These will initialize all of the runtime import/export logic that
255
+ * can't be handled statically by the statements created by
256
+ * `buildExportInitializationStatements()`.
257
+ */
258
+ export function buildNamespaceInitStatements(
259
+ metadata: ModuleMetadata,
260
+ sourceMetadata: SourceModuleMetadata,
261
+ constantReexports?: boolean | void,
262
+ wrapReference?: (
263
+ ref: t.Identifier,
264
+ payload: unknown
265
+ ) => t.Expression | null | undefined
266
+ ): t.Statement[];
267
+
268
+ /**
269
+ * Flag a set of statements as hoisted above all else so that module init
270
+ * statements all run before user code.
271
+ */
272
+ export function ensureStatementsHoisted(statements: t.Statement[]): void;
273
+
274
+ /**
275
+ * Given an expression for a standard import object, like `require('foo')`,
276
+ * wrap it in a call to the interop helpers based on the type.
277
+ */
278
+ export function wrapInterop(
279
+ programPath: NodePath<t.Program>,
280
+ expr: t.Expression,
281
+ type: InteropType
282
+ ): t.CallExpression;
283
+
284
+ export function buildDynamicImport(
285
+ node: t.CallExpression | t.ImportExpression,
286
+ deferToThen: boolean,
287
+ wrapWithPromise: boolean,
288
+ builder: (specifier: t.Expression) => t.Expression
289
+ ): t.Expression;
290
+ }
291
+
292
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-VBR53KGY.js';
2
- import { createUnpluginFactory } from './chunk-RKMUBSYG.js';
2
+ import { createUnpluginFactory } from './chunk-7G7OFGGH.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
5
5
  import defu from 'defu';
@@ -667,23 +667,23 @@ async function loadWorkspaceConfig(workspaceRoot, cwd) {
667
667
  }));
668
668
  }
669
669
  chunkUSNT2KNT_cjs.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
670
- async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode, configFile, framework = "powerlines") {
670
+ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
671
671
  let resolvedUserConfig = {};
672
- const resolvedUserConfigFile = configFile && exists.existsSync(configFile) ? configFile : configFile && exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
672
+ let resolvedUserConfigFile;
673
+ if (configFile) {
674
+ resolvedUserConfigFile = exists.existsSync(replace.replacePath(configFile, projectRoot)) ? replace.replacePath(configFile, projectRoot) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot))) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot)) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : void 0;
675
+ }
676
+ if (!resolvedUserConfigFile) {
677
+ resolvedUserConfigFile = exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
678
+ }
673
679
  if (resolvedUserConfigFile) {
674
- let resolvedPath;
675
- try {
676
- resolvedPath = jiti.esmResolve(resolvedUserConfigFile);
677
- } catch {
678
- resolvedPath = resolvedUserConfigFile;
679
- }
680
- const resolved = await jiti.import(resolvedPath);
680
+ const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
681
681
  if (resolved) {
682
682
  let config = {};
683
683
  if (isFunction.isFunction(resolved)) {
684
684
  config = await Promise.resolve(resolved({
685
685
  command,
686
- mode: mode || "production",
686
+ mode,
687
687
  isSsrBuild: false,
688
688
  isPreview: false
689
689
  }));
@@ -714,6 +714,7 @@ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mod
714
714
  chunkUSNT2KNT_cjs.__name(loadUserConfigFile, "loadUserConfigFile");
715
715
  function resolveOptions(options) {
716
716
  return defu6__default.default(options, {
717
+ debug: options.logLevel === "trace",
717
718
  interopDefault: true,
718
719
  fsCache: options.mode !== "development" ? joinPaths.joinPaths(options.cacheDir, "jiti") : false,
719
720
  moduleCache: options.mode !== "development"
@@ -3160,6 +3161,7 @@ var PowerlinesContext = class _PowerlinesContext {
3160
3161
  projectRoot: cacheKey.projectRoot,
3161
3162
  cacheDir: this.cachePath,
3162
3163
  mode: cacheKey.mode,
3164
+ logLevel: config.logLevel || this.config?.logLevel || this.workspaceConfig.logLevel || "info",
3163
3165
  skipCache: cacheKey.skipCache
3164
3166
  });
3165
3167
  const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZKM7WOB_cjs = require('./chunk-6ZKM7WOB.cjs');
3
+ var chunk4EIGDACJ_cjs = require('./chunk-4EIGDACJ.cjs');
4
4
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
5
  var join = require('@stryke/path/join');
6
6
  var bundleRequire = require('bundle-require');
@@ -111,7 +111,7 @@ chunkUSNT2KNT_cjs.__name(getString, "getString");
111
111
  // src/lib/unplugin/factory.ts
112
112
  function createUnpluginFactory(variant, decorate) {
113
113
  return (config, meta) => {
114
- const log = chunk6ZKM7WOB_cjs.createLog("unplugin", config);
114
+ const log = chunk4EIGDACJ_cjs.createLog("unplugin", config);
115
115
  log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
116
116
  try {
117
117
  const userConfig = {
@@ -124,7 +124,7 @@ function createUnpluginFactory(variant, decorate) {
124
124
  async function buildStart() {
125
125
  log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
126
126
  const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(process.cwd());
127
- api = await chunk6ZKM7WOB_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
127
+ api = await chunk4EIGDACJ_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
128
128
  if (api.context.config.build.skipNodeModulesBundle) {
129
129
  resolvePatterns = bundleRequire.tsconfigPathsToRegExp(api.context.tsconfig.options.paths ?? []);
130
130
  }
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-FDEGM4CR.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-MUNYXQYT.js';
2
2
  import { __name } from './chunk-SHUYVCID.js';
3
3
  import { joinPaths } from '@stryke/path/join';
4
4
  import { match, tsconfigPathsToRegExp } from 'bundle-require';
@@ -637,23 +637,23 @@ async function loadWorkspaceConfig(workspaceRoot, cwd) {
637
637
  }));
638
638
  }
639
639
  __name(loadWorkspaceConfig, "loadWorkspaceConfig");
640
- async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode, configFile, framework = "powerlines") {
640
+ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
641
641
  let resolvedUserConfig = {};
642
- const resolvedUserConfigFile = configFile && existsSync(configFile) ? configFile : configFile && existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), configFile) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
642
+ let resolvedUserConfigFile;
643
+ if (configFile) {
644
+ resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot)) ? replacePath(configFile, projectRoot) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), replacePath(configFile, projectRoot))) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), replacePath(configFile, projectRoot)) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), configFile) : void 0;
645
+ }
646
+ if (!resolvedUserConfigFile) {
647
+ resolvedUserConfigFile = existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : existsSync(joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths$1(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
648
+ }
643
649
  if (resolvedUserConfigFile) {
644
- let resolvedPath;
645
- try {
646
- resolvedPath = jiti.esmResolve(resolvedUserConfigFile);
647
- } catch {
648
- resolvedPath = resolvedUserConfigFile;
649
- }
650
- const resolved = await jiti.import(resolvedPath);
650
+ const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
651
651
  if (resolved) {
652
652
  let config = {};
653
653
  if (isFunction(resolved)) {
654
654
  config = await Promise.resolve(resolved({
655
655
  command,
656
- mode: mode || "production",
656
+ mode,
657
657
  isSsrBuild: false,
658
658
  isPreview: false
659
659
  }));
@@ -684,6 +684,7 @@ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mod
684
684
  __name(loadUserConfigFile, "loadUserConfigFile");
685
685
  function resolveOptions(options) {
686
686
  return defu6(options, {
687
+ debug: options.logLevel === "trace",
687
688
  interopDefault: true,
688
689
  fsCache: options.mode !== "development" ? joinPaths$1(options.cacheDir, "jiti") : false,
689
690
  moduleCache: options.mode !== "development"
@@ -3130,6 +3131,7 @@ var PowerlinesContext = class _PowerlinesContext {
3130
3131
  projectRoot: cacheKey.projectRoot,
3131
3132
  cacheDir: this.cachePath,
3132
3133
  mode: cacheKey.mode,
3134
+ logLevel: config.logLevel || this.config?.logLevel || this.workspaceConfig.logLevel || "info",
3133
3135
  skipCache: cacheKey.skipCache
3134
3136
  });
3135
3137
  const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
4
- var chunkFJWXCUGQ_cjs = require('./chunk-FJWXCUGQ.cjs');
4
+ var chunk4TBQYHPZ_cjs = require('./chunk-4TBQYHPZ.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var isUndefined = require('@stryke/type-checks/is-undefined');
7
7
  var unplugin = require('unplugin');
8
8
 
9
- var esbuild = unplugin.createEsbuildPlugin(chunkFJWXCUGQ_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunk4TBQYHPZ_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
10
10
  return {
11
11
  ...plugin,
12
12
  esbuild: {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
4
- var chunkFJWXCUGQ_cjs = require('./chunk-FJWXCUGQ.cjs');
4
+ var chunk4TBQYHPZ_cjs = require('./chunk-4TBQYHPZ.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var environmentChecks = require('@stryke/env/environment-checks');
7
7
  var defu = require('defu');
@@ -83,7 +83,7 @@ function extractViteConfig(context) {
83
83
  chunkUSNT2KNT_cjs.__name(extractViteConfig, "extractViteConfig");
84
84
 
85
85
  // src/vite.ts
86
- var vite = unplugin.createVitePlugin(chunkFJWXCUGQ_cjs.createUnpluginFactory("vite", (api, plugin) => {
86
+ var vite = unplugin.createVitePlugin(chunk4TBQYHPZ_cjs.createUnpluginFactory("vite", (api, plugin) => {
87
87
  return {
88
88
  ...plugin,
89
89
  vite: {
@@ -1,4 +1,4 @@
1
- import { createUnpluginFactory } from './chunk-RKMUBSYG.js';
1
+ import { createUnpluginFactory } from './chunk-7G7OFGGH.js';
2
2
  import { createWebpackPlugin } from 'unplugin';
3
3
 
4
4
  var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkFJWXCUGQ_cjs = require('./chunk-FJWXCUGQ.cjs');
3
+ var chunk4TBQYHPZ_cjs = require('./chunk-4TBQYHPZ.cjs');
4
4
  var unplugin = require('unplugin');
5
5
 
6
- var webpack = unplugin.createWebpackPlugin(chunkFJWXCUGQ_cjs.createUnpluginFactory("webpack"));
6
+ var webpack = unplugin.createWebpackPlugin(chunk4TBQYHPZ_cjs.createUnpluginFactory("webpack"));
7
7
  var webpack_default = webpack;
8
8
 
9
9
  exports.webpack = webpack;
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-VBR53KGY.js';
2
- import { createUnpluginFactory } from './chunk-RKMUBSYG.js';
2
+ import { createUnpluginFactory } from './chunk-7G7OFGGH.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { isUndefined } from '@stryke/type-checks/is-undefined';
5
5
  import { createEsbuildPlugin } from 'unplugin';
package/dist/esbuild.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkG5K3I7JU_cjs = require('./chunk-G5K3I7JU.cjs');
5
+ var chunkPR3JGGAL_cjs = require('./chunk-PR3JGGAL.cjs');
6
6
  require('./chunk-5IBA5HC2.cjs');
7
- require('./chunk-FJWXCUGQ.cjs');
8
- require('./chunk-6ZKM7WOB.cjs');
7
+ require('./chunk-4TBQYHPZ.cjs');
8
+ require('./chunk-4EIGDACJ.cjs');
9
9
  require('./chunk-ETKZMGLN.cjs');
10
10
  require('./chunk-PAMSESZV.cjs');
11
11
  require('./chunk-AYKZK666.cjs');
@@ -15,13 +15,13 @@ require('./chunk-USNT2KNT.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "default", {
17
17
  enumerable: true,
18
- get: function () { return chunkG5K3I7JU_cjs.esbuild_default; }
18
+ get: function () { return chunkPR3JGGAL_cjs.esbuild_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "esbuild", {
21
21
  enumerable: true,
22
- get: function () { return chunkG5K3I7JU_cjs.esbuild; }
22
+ get: function () { return chunkPR3JGGAL_cjs.esbuild; }
23
23
  });
24
24
  Object.defineProperty(exports, "module.exports", {
25
25
  enumerable: true,
26
- get: function () { return chunkG5K3I7JU_cjs.esbuild; }
26
+ get: function () { return chunkPR3JGGAL_cjs.esbuild; }
27
27
  });
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
- export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-KOBCKTHY.js';
1
+ export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-ZIWN73GA.js';
2
2
  import './chunk-VBR53KGY.js';
3
- import './chunk-RKMUBSYG.js';
4
- import './chunk-FDEGM4CR.js';
3
+ import './chunk-7G7OFGGH.js';
4
+ import './chunk-MUNYXQYT.js';
5
5
  import './chunk-JQCWV4DT.js';
6
6
  import './chunk-JKBJF3UI.js';
7
7
  import './chunk-VT7NVLLU.js';
package/dist/farm.cjs CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkFJWXCUGQ_cjs = require('./chunk-FJWXCUGQ.cjs');
6
- require('./chunk-6ZKM7WOB.cjs');
5
+ var chunk4TBQYHPZ_cjs = require('./chunk-4TBQYHPZ.cjs');
6
+ require('./chunk-4EIGDACJ.cjs');
7
7
  require('./chunk-ETKZMGLN.cjs');
8
8
  require('./chunk-PAMSESZV.cjs');
9
9
  require('./chunk-AYKZK666.cjs');
10
10
  require('./chunk-USNT2KNT.cjs');
11
11
  var unplugin = require('unplugin');
12
12
 
13
- var farm = unplugin.createFarmPlugin(chunkFJWXCUGQ_cjs.createUnpluginFactory("farm"));
13
+ var farm = unplugin.createFarmPlugin(chunk4TBQYHPZ_cjs.createUnpluginFactory("farm"));
14
14
  var farm_default = farm;
15
15
 
16
16
  exports.default = farm_default;
package/dist/farm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createUnpluginFactory } from './chunk-RKMUBSYG.js';
2
- import './chunk-FDEGM4CR.js';
1
+ import { createUnpluginFactory } from './chunk-7G7OFGGH.js';
2
+ import './chunk-MUNYXQYT.js';
3
3
  import './chunk-JQCWV4DT.js';
4
4
  import './chunk-JKBJF3UI.js';
5
5
  import './chunk-VT7NVLLU.js';