powerlines 0.37.55 → 0.37.56

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 (59) 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/{chunk-P24DSFF4.cjs → chunk-2ESGIL56.cjs} +3 -140
  6. package/dist/{chunk-6YCSSTVC.js → chunk-2VUAOV5V.js} +3 -3
  7. package/dist/{chunk-LX3ZZP62.js → chunk-5OE3ACWC.js} +3 -3
  8. package/dist/{chunk-BW5NDBWH.js → chunk-7LH63BFW.js} +3 -3
  9. package/dist/{chunk-CUGOCGSK.cjs → chunk-BSKRKIB5.cjs} +4 -4
  10. package/dist/chunk-JK5Y4ABM.cjs +12 -0
  11. package/dist/{chunk-XIBDIPTT.js → chunk-L4OM5KXO.js} +3 -139
  12. package/dist/{chunk-6DKPMU3L.cjs → chunk-LFHXRRZX.cjs} +5 -5
  13. package/dist/{chunk-3IBKHRRH.js → chunk-NUYBKMON.js} +3 -3
  14. package/dist/chunk-PCQFHZKL.cjs +12 -0
  15. package/dist/{chunk-EHCLZGBR.js → chunk-PQOEG6WQ.js} +3 -3
  16. package/dist/{chunk-6VDZHJEH.cjs → chunk-QQ6V5SC5.cjs} +4 -4
  17. package/dist/esbuild.cjs +6 -6
  18. package/dist/esbuild.js +3 -3
  19. package/dist/farm.cjs +3 -3
  20. package/dist/farm.js +2 -2
  21. package/dist/index.cjs +10 -10
  22. package/dist/index.js +2 -2
  23. package/dist/lib/{chunk-LGJOP2GH.js → chunk-CIBV7IDT.js} +3 -139
  24. package/dist/lib/chunk-CIBV7IDT.js.map +1 -0
  25. package/dist/lib/{chunk-57INYYJ7.cjs → chunk-DWKRVCBP.cjs} +3 -158
  26. package/dist/lib/chunk-DWKRVCBP.cjs.map +1 -0
  27. package/dist/lib/index.cjs +2 -2
  28. package/dist/lib/index.js +1 -1
  29. package/dist/lib/unplugin/factory.cjs +2 -2
  30. package/dist/lib/unplugin/factory.js +1 -1
  31. package/dist/lib/unplugin/index.cjs +2 -2
  32. package/dist/lib/unplugin/index.js +1 -1
  33. package/dist/next.cjs +4 -4
  34. package/dist/next.js +3 -3
  35. package/dist/nuxt.cjs +8 -8
  36. package/dist/nuxt.js +4 -4
  37. package/dist/rolldown.cjs +6 -6
  38. package/dist/rolldown.js +3 -3
  39. package/dist/rollup.cjs +3 -3
  40. package/dist/rollup.js +2 -2
  41. package/dist/rspack.cjs +3 -3
  42. package/dist/rspack.js +2 -2
  43. package/dist/tsdown.cjs +4 -4
  44. package/dist/tsdown.js +3 -3
  45. package/dist/tsup.cjs +4 -4
  46. package/dist/tsup.js +3 -3
  47. package/dist/unloader.cjs +3 -3
  48. package/dist/unloader.js +2 -2
  49. package/dist/unplugin.cjs +8 -8
  50. package/dist/unplugin.js +4 -4
  51. package/dist/vite.cjs +6 -6
  52. package/dist/vite.js +3 -3
  53. package/dist/webpack.cjs +6 -6
  54. package/dist/webpack.js +3 -3
  55. package/package.json +2 -2
  56. package/dist/chunk-D7545A3W.cjs +0 -12
  57. package/dist/chunk-YTXKB2NX.cjs +0 -12
  58. package/dist/lib/chunk-57INYYJ7.cjs.map +0 -1
  59. package/dist/lib/chunk-LGJOP2GH.js.map +0 -1
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkP24DSFF4_cjs = require('./chunk-P24DSFF4.cjs');
3
+ var chunk2ESGIL56_cjs = require('./chunk-2ESGIL56.cjs');
4
4
  require('./chunk-B6DVCLP5.cjs');
5
5
  require('./chunk-V5WOGN7O.cjs');
6
6
  require('./chunk-Z6ARQDHR.cjs');
@@ -10,7 +10,7 @@ require('./chunk-PK6SKIKE.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PowerlinesAPI", {
12
12
  enumerable: true,
13
- get: function () { return chunkP24DSFF4_cjs.PowerlinesAPI; }
13
+ get: function () { return chunk2ESGIL56_cjs.PowerlinesAPI; }
14
14
  });
15
15
  //# sourceMappingURL=api.cjs.map
16
16
  //# sourceMappingURL=api.cjs.map
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- export { PowerlinesAPI } from './chunk-XIBDIPTT.js';
1
+ export { PowerlinesAPI } from './chunk-L4OM5KXO.js';
2
2
  import './chunk-PQXP7XQK.js';
3
3
  import './chunk-NITQ5IYP.js';
4
4
  import './chunk-2MYPFASJ.js';
package/dist/astro.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkCUGOCGSK_cjs = require('./chunk-CUGOCGSK.cjs');
5
+ var chunkBSKRKIB5_cjs = require('./chunk-BSKRKIB5.cjs');
6
6
  require('./chunk-MKIL6OVG.cjs');
7
- require('./chunk-6DKPMU3L.cjs');
8
- require('./chunk-P24DSFF4.cjs');
7
+ require('./chunk-LFHXRRZX.cjs');
8
+ require('./chunk-2ESGIL56.cjs');
9
9
  require('./chunk-B6DVCLP5.cjs');
10
10
  require('./chunk-V5WOGN7O.cjs');
11
11
  require('./chunk-Z6ARQDHR.cjs');
@@ -15,7 +15,7 @@ var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
15
15
  var astro = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((config) => ({
16
16
  vite: {
17
17
  plugins: [
18
- chunkCUGOCGSK_cjs.vite_default(config)
18
+ chunkBSKRKIB5_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-EHCLZGBR.js';
1
+ import { vite_default } from './chunk-PQOEG6WQ.js';
2
2
  import './chunk-BNVPJWSG.js';
3
- import './chunk-LX3ZZP62.js';
4
- import './chunk-XIBDIPTT.js';
3
+ import './chunk-5OE3ACWC.js';
4
+ import './chunk-L4OM5KXO.js';
5
5
  import './chunk-PQXP7XQK.js';
6
6
  import './chunk-NITQ5IYP.js';
7
7
  import './chunk-2MYPFASJ.js';
@@ -3,7 +3,6 @@
3
3
  var chunkB6DVCLP5_cjs = require('./chunk-B6DVCLP5.cjs');
4
4
  var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
- var core = require('@babel/core');
7
6
  var console = require('@storm-software/config-tools/logger/console');
8
7
  var toArray = require('@stryke/convert/to-array');
9
8
  var helpers = require('@stryke/fs/helpers');
@@ -26,8 +25,6 @@ var isSetString = require('@stryke/type-checks/is-set-string');
26
25
  var isString = require('@stryke/type-checks/is-string');
27
26
  var chalk5 = require('chalk');
28
27
  var Handlebars = require('handlebars');
29
- var helperPluginUtils = require('@babel/helper-plugin-utils');
30
- var t = require('@babel/types');
31
28
  var isParentPath = require('@stryke/path/is-parent-path');
32
29
  var prettyBytes = require('@stryke/string-format/pretty-bytes');
33
30
  var tsMorph = require('ts-morph');
@@ -103,116 +100,15 @@ function _interopNamespace(e) {
103
100
 
104
101
  var chalk5__default = /*#__PURE__*/_interopDefault(chalk5);
105
102
  var Handlebars__default = /*#__PURE__*/_interopDefault(Handlebars);
106
- var t__namespace = /*#__PURE__*/_interopNamespace(t);
107
103
  var defu7__default = /*#__PURE__*/_interopDefault(defu7);
108
104
  var ts__default = /*#__PURE__*/_interopDefault(ts);
109
105
  var $__namespace = /*#__PURE__*/_interopNamespace($);
110
106
 
111
107
  // package.json
112
108
  var name = "powerlines";
113
- var version = "0.37.54";
109
+ var version = "0.37.55";
114
110
  var package_default = {
115
111
  version};
116
- function resolveModulePath(nodePath, state) {
117
- if (!t__namespace.isStringLiteral(nodePath.node)) {
118
- return;
119
- }
120
- const resolvedPath = state.context?.fs.resolveSync(nodePath.node.value);
121
- if (resolvedPath) {
122
- nodePath.replaceWith(t__namespace.stringLiteral(
123
- // Remove the file extension if it exists
124
- resolvedPath.replace(/\.(?:ts|mts|cts)x?$/, "")
125
- ));
126
- }
127
- }
128
- chunkPK6SKIKE_cjs.__name(resolveModulePath, "resolveModulePath");
129
- var TRANSFORM_FUNCTIONS = [
130
- "require",
131
- "require.resolve",
132
- "System.import",
133
- // Jest methods
134
- "jest.genMockFromModule",
135
- "jest.mock",
136
- "jest.unmock",
137
- "jest.doMock",
138
- // eslint-disable-next-line @cspell/spellchecker
139
- "jest.dontMock",
140
- "jest.setMock",
141
- "jest.requireActual",
142
- "jest.requireMock",
143
- // Older Jest methods
144
- "require.requireActual",
145
- "require.requireMock"
146
- ];
147
- function matchesPattern(state, calleePath, pattern) {
148
- const { node } = calleePath;
149
- if (t__namespace.isMemberExpression(node)) {
150
- return calleePath.matchesPattern(pattern);
151
- }
152
- if (!t__namespace.isIdentifier(node) || pattern.includes(".")) {
153
- return false;
154
- }
155
- const name2 = pattern.split(".")[0];
156
- return node.name === name2;
157
- }
158
- chunkPK6SKIKE_cjs.__name(matchesPattern, "matchesPattern");
159
- var importVisitors = {
160
- CallExpression: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((nodePath, state) => {
161
- if (state.moduleResolverVisited.has(nodePath)) {
162
- return;
163
- }
164
- const calleePath = nodePath.get("callee");
165
- if (calleePath && TRANSFORM_FUNCTIONS.some((pattern) => matchesPattern(state, calleePath, pattern)) || t__namespace.isImport(nodePath.node.callee)) {
166
- state.moduleResolverVisited.add(nodePath);
167
- resolveModulePath(nodePath.get("arguments.0"), state);
168
- }
169
- }, "CallExpression"),
170
- // eslint-disable-next-line ts/naming-convention
171
- "ImportDeclaration|ExportDeclaration|ExportAllDeclaration": /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((nodePath, state) => {
172
- if (!nodePath || !nodePath.get("source") || state.moduleResolverVisited.has(nodePath)) {
173
- return;
174
- }
175
- state.moduleResolverVisited.add(nodePath);
176
- resolveModulePath(nodePath.get("source"), state);
177
- }, "ImportDeclaration|ExportDeclaration|ExportAllDeclaration")
178
- };
179
- var moduleResolverBabelPlugin = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((context) => {
180
- return helperPluginUtils.declare(/* @__PURE__ */ chunkPK6SKIKE_cjs.__name(function builder(api) {
181
- let moduleResolverVisited = /* @__PURE__ */ new Set();
182
- return {
183
- name: "powerlines:module-resolver",
184
- manipulateOptions(opts) {
185
- opts.filename ??= "unknown";
186
- },
187
- pre() {
188
- moduleResolverVisited = /* @__PURE__ */ new Set();
189
- },
190
- visitor: {
191
- Program: {
192
- enter(programPath, state) {
193
- programPath.traverse(importVisitors, {
194
- ...state,
195
- context,
196
- moduleResolverVisited,
197
- api
198
- });
199
- },
200
- exit(programPath, state) {
201
- programPath.traverse(importVisitors, {
202
- ...state,
203
- context,
204
- moduleResolverVisited,
205
- api
206
- });
207
- }
208
- }
209
- },
210
- post() {
211
- moduleResolverVisited.clear();
212
- }
213
- };
214
- }, "builder"));
215
- }, "moduleResolverBabelPlugin");
216
112
  var VirtualFileSystemHost = class extends tsMorph.InMemoryFileSystemHost {
217
113
  static {
218
114
  chunkPK6SKIKE_cjs.__name(this, "VirtualFileSystemHost");
@@ -4502,39 +4398,6 @@ ${console.formatLogMessage({
4502
4398
  }
4503
4399
  context.debug("Transforming built-ins runtime modules files.");
4504
4400
  const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
4505
- const result2 = await core.transformAsync(file.code.toString(), {
4506
- highlightCode: true,
4507
- code: true,
4508
- ast: false,
4509
- cloneInputAst: false,
4510
- comments: true,
4511
- sourceType: "module",
4512
- configFile: false,
4513
- babelrc: false,
4514
- envName: context.config.mode,
4515
- caller: {
4516
- name: "powerlines"
4517
- },
4518
- ...context.config.transform.babel,
4519
- filename: file.path,
4520
- plugins: [
4521
- [
4522
- "@babel/plugin-syntax-typescript"
4523
- ],
4524
- [
4525
- moduleResolverBabelPlugin(context)
4526
- ]
4527
- ]
4528
- });
4529
- if (!result2?.code) {
4530
- throw new Error(`Powerlines - Generate Types failed to compile ${file.id}`);
4531
- }
4532
- if (!file.id) {
4533
- context.warn(`File ID is missing for a built-in runtime file at ${file.path}.`);
4534
- file.id = replace.replacePath(replace.replacePath(file.path, context.workspaceConfig.workspaceRoot), context.builtinsPath);
4535
- }
4536
- context.trace(`Writing transformed built-in runtime file ${file.id}.`);
4537
- await context.emitBuiltin(result2.code, file.id);
4538
4401
  return append.appendPath(file.path, context.builtinsPath);
4539
4402
  }));
4540
4403
  const typescriptPath = await resolve.resolvePackage("typescript");
@@ -5081,5 +4944,5 @@ exports.extendLog = extendLog;
5081
4944
  exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
5082
4945
  exports.name = name;
5083
4946
  exports.version = version;
5084
- //# sourceMappingURL=chunk-P24DSFF4.cjs.map
5085
- //# sourceMappingURL=chunk-P24DSFF4.cjs.map
4947
+ //# sourceMappingURL=chunk-2ESGIL56.cjs.map
4948
+ //# sourceMappingURL=chunk-2ESGIL56.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BNVPJWSG.js';
2
- import { createUnpluginFactory } from './chunk-LX3ZZP62.js';
2
+ import { createUnpluginFactory } from './chunk-5OE3ACWC.js';
3
3
  import { __name } from './chunk-7QVYU63E.js';
4
4
  import { isUndefined } from '@stryke/type-checks/is-undefined';
5
5
  import { createEsbuildPlugin } from 'unplugin';
@@ -29,5 +29,5 @@ var esbuild = createEsbuildPlugin(createUnpluginFactory("esbuild", (api, plugin)
29
29
  var esbuild_default = esbuild;
30
30
 
31
31
  export { esbuild, esbuild_default };
32
- //# sourceMappingURL=chunk-6YCSSTVC.js.map
33
- //# sourceMappingURL=chunk-6YCSSTVC.js.map
32
+ //# sourceMappingURL=chunk-2VUAOV5V.js.map
33
+ //# sourceMappingURL=chunk-2VUAOV5V.js.map
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-XIBDIPTT.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-L4OM5KXO.js';
2
2
  import { __name } from './chunk-7QVYU63E.js';
3
3
  import { LogLevelLabel } from '@storm-software/config-tools/types';
4
4
  import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
@@ -134,5 +134,5 @@ function createUnpluginFactory(variant, decorate) {
134
134
  __name(createUnpluginFactory, "createUnpluginFactory");
135
135
 
136
136
  export { createUnpluginFactory, getString };
137
- //# sourceMappingURL=chunk-LX3ZZP62.js.map
138
- //# sourceMappingURL=chunk-LX3ZZP62.js.map
137
+ //# sourceMappingURL=chunk-5OE3ACWC.js.map
138
+ //# sourceMappingURL=chunk-5OE3ACWC.js.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-LX3ZZP62.js';
1
+ import { createUnpluginFactory } from './chunk-5OE3ACWC.js';
2
2
  import { createWebpackPlugin } from 'unplugin';
3
3
 
4
4
  var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));
5
5
  var webpack_default = webpack;
6
6
 
7
7
  export { webpack, webpack_default };
8
- //# sourceMappingURL=chunk-BW5NDBWH.js.map
9
- //# sourceMappingURL=chunk-BW5NDBWH.js.map
8
+ //# sourceMappingURL=chunk-7LH63BFW.js.map
9
+ //# sourceMappingURL=chunk-7LH63BFW.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkMKIL6OVG_cjs = require('./chunk-MKIL6OVG.cjs');
4
- var chunk6DKPMU3L_cjs = require('./chunk-6DKPMU3L.cjs');
4
+ var chunkLFHXRRZX_cjs = require('./chunk-LFHXRRZX.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
6
  var environmentChecks = require('@stryke/env/environment-checks');
7
7
  var defu = require('defu');
@@ -97,7 +97,7 @@ function extractViteConfig(context) {
97
97
  chunkPK6SKIKE_cjs.__name(extractViteConfig, "extractViteConfig");
98
98
 
99
99
  // src/vite.ts
100
- var vite = unplugin.createVitePlugin(chunk6DKPMU3L_cjs.createUnpluginFactory("vite", (api, plugin) => {
100
+ var vite = unplugin.createVitePlugin(chunkLFHXRRZX_cjs.createUnpluginFactory("vite", (api, plugin) => {
101
101
  return {
102
102
  ...plugin,
103
103
  vite: {
@@ -158,5 +158,5 @@ var vite_default = vite;
158
158
 
159
159
  exports.vite = vite;
160
160
  exports.vite_default = vite_default;
161
- //# sourceMappingURL=chunk-CUGOCGSK.cjs.map
162
- //# sourceMappingURL=chunk-CUGOCGSK.cjs.map
161
+ //# sourceMappingURL=chunk-BSKRKIB5.cjs.map
162
+ //# sourceMappingURL=chunk-BSKRKIB5.cjs.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkLFHXRRZX_cjs = require('./chunk-LFHXRRZX.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var webpack = unplugin.createWebpackPlugin(chunkLFHXRRZX_cjs.createUnpluginFactory("webpack"));
7
+ var webpack_default = webpack;
8
+
9
+ exports.webpack = webpack;
10
+ exports.webpack_default = webpack_default;
11
+ //# sourceMappingURL=chunk-JK5Y4ABM.cjs.map
12
+ //# sourceMappingURL=chunk-JK5Y4ABM.cjs.map
@@ -1,7 +1,6 @@
1
1
  import { PLUGIN_NON_HOOK_FIELDS, PLUGIN_HOOKS_FIELDS } from './chunk-PQXP7XQK.js';
2
2
  import { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
3
3
  import { __name } from './chunk-7QVYU63E.js';
4
- import { transformAsync } from '@babel/core';
5
4
  import { formatLogMessage } from '@storm-software/config-tools/logger/console';
6
5
  import { toArray } from '@stryke/convert/to-array';
7
6
  import { createDirectorySync, createDirectory } from '@stryke/fs/helpers';
@@ -24,8 +23,6 @@ import { isSetString } from '@stryke/type-checks/is-set-string';
24
23
  import { isString } from '@stryke/type-checks/is-string';
25
24
  import chalk5 from 'chalk';
26
25
  import Handlebars from 'handlebars';
27
- import { declare } from '@babel/helper-plugin-utils';
28
- import * as t from '@babel/types';
29
26
  import { isParentPath } from '@stryke/path/is-parent-path';
30
27
  import { prettyBytes } from '@stryke/string-format/pretty-bytes';
31
28
  import { InMemoryFileSystemHost, Project, DiagnosticCategory } from 'ts-morph';
@@ -81,109 +78,9 @@ import '@stryke/fs/remove-file';
81
78
 
82
79
  // package.json
83
80
  var name = "powerlines";
84
- var version = "0.37.54";
81
+ var version = "0.37.55";
85
82
  var package_default = {
86
83
  version};
87
- function resolveModulePath(nodePath, state) {
88
- if (!t.isStringLiteral(nodePath.node)) {
89
- return;
90
- }
91
- const resolvedPath = state.context?.fs.resolveSync(nodePath.node.value);
92
- if (resolvedPath) {
93
- nodePath.replaceWith(t.stringLiteral(
94
- // Remove the file extension if it exists
95
- resolvedPath.replace(/\.(?:ts|mts|cts)x?$/, "")
96
- ));
97
- }
98
- }
99
- __name(resolveModulePath, "resolveModulePath");
100
- var TRANSFORM_FUNCTIONS = [
101
- "require",
102
- "require.resolve",
103
- "System.import",
104
- // Jest methods
105
- "jest.genMockFromModule",
106
- "jest.mock",
107
- "jest.unmock",
108
- "jest.doMock",
109
- // eslint-disable-next-line @cspell/spellchecker
110
- "jest.dontMock",
111
- "jest.setMock",
112
- "jest.requireActual",
113
- "jest.requireMock",
114
- // Older Jest methods
115
- "require.requireActual",
116
- "require.requireMock"
117
- ];
118
- function matchesPattern(state, calleePath, pattern) {
119
- const { node } = calleePath;
120
- if (t.isMemberExpression(node)) {
121
- return calleePath.matchesPattern(pattern);
122
- }
123
- if (!t.isIdentifier(node) || pattern.includes(".")) {
124
- return false;
125
- }
126
- const name2 = pattern.split(".")[0];
127
- return node.name === name2;
128
- }
129
- __name(matchesPattern, "matchesPattern");
130
- var importVisitors = {
131
- CallExpression: /* @__PURE__ */ __name((nodePath, state) => {
132
- if (state.moduleResolverVisited.has(nodePath)) {
133
- return;
134
- }
135
- const calleePath = nodePath.get("callee");
136
- if (calleePath && TRANSFORM_FUNCTIONS.some((pattern) => matchesPattern(state, calleePath, pattern)) || t.isImport(nodePath.node.callee)) {
137
- state.moduleResolverVisited.add(nodePath);
138
- resolveModulePath(nodePath.get("arguments.0"), state);
139
- }
140
- }, "CallExpression"),
141
- // eslint-disable-next-line ts/naming-convention
142
- "ImportDeclaration|ExportDeclaration|ExportAllDeclaration": /* @__PURE__ */ __name((nodePath, state) => {
143
- if (!nodePath || !nodePath.get("source") || state.moduleResolverVisited.has(nodePath)) {
144
- return;
145
- }
146
- state.moduleResolverVisited.add(nodePath);
147
- resolveModulePath(nodePath.get("source"), state);
148
- }, "ImportDeclaration|ExportDeclaration|ExportAllDeclaration")
149
- };
150
- var moduleResolverBabelPlugin = /* @__PURE__ */ __name((context) => {
151
- return declare(/* @__PURE__ */ __name(function builder(api) {
152
- let moduleResolverVisited = /* @__PURE__ */ new Set();
153
- return {
154
- name: "powerlines:module-resolver",
155
- manipulateOptions(opts) {
156
- opts.filename ??= "unknown";
157
- },
158
- pre() {
159
- moduleResolverVisited = /* @__PURE__ */ new Set();
160
- },
161
- visitor: {
162
- Program: {
163
- enter(programPath, state) {
164
- programPath.traverse(importVisitors, {
165
- ...state,
166
- context,
167
- moduleResolverVisited,
168
- api
169
- });
170
- },
171
- exit(programPath, state) {
172
- programPath.traverse(importVisitors, {
173
- ...state,
174
- context,
175
- moduleResolverVisited,
176
- api
177
- });
178
- }
179
- }
180
- },
181
- post() {
182
- moduleResolverVisited.clear();
183
- }
184
- };
185
- }, "builder"));
186
- }, "moduleResolverBabelPlugin");
187
84
  var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
188
85
  static {
189
86
  __name(this, "VirtualFileSystemHost");
@@ -4473,39 +4370,6 @@ ${formatLogMessage({
4473
4370
  }
4474
4371
  context.debug("Transforming built-ins runtime modules files.");
4475
4372
  const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
4476
- const result2 = await transformAsync(file.code.toString(), {
4477
- highlightCode: true,
4478
- code: true,
4479
- ast: false,
4480
- cloneInputAst: false,
4481
- comments: true,
4482
- sourceType: "module",
4483
- configFile: false,
4484
- babelrc: false,
4485
- envName: context.config.mode,
4486
- caller: {
4487
- name: "powerlines"
4488
- },
4489
- ...context.config.transform.babel,
4490
- filename: file.path,
4491
- plugins: [
4492
- [
4493
- "@babel/plugin-syntax-typescript"
4494
- ],
4495
- [
4496
- moduleResolverBabelPlugin(context)
4497
- ]
4498
- ]
4499
- });
4500
- if (!result2?.code) {
4501
- throw new Error(`Powerlines - Generate Types failed to compile ${file.id}`);
4502
- }
4503
- if (!file.id) {
4504
- context.warn(`File ID is missing for a built-in runtime file at ${file.path}.`);
4505
- file.id = replacePath(replacePath(file.path, context.workspaceConfig.workspaceRoot), context.builtinsPath);
4506
- }
4507
- context.trace(`Writing transformed built-in runtime file ${file.id}.`);
4508
- await context.emitBuiltin(result2.code, file.id);
4509
4373
  return appendPath(file.path, context.builtinsPath);
4510
4374
  }));
4511
4375
  const typescriptPath = await resolvePackage("typescript");
@@ -5040,5 +4904,5 @@ Note: Please ensure the plugin package's default export is a class that extends
5040
4904
  };
5041
4905
 
5042
4906
  export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, combineContexts, createLog, extendLog, isUnpluginBuilderVariant, name, version };
5043
- //# sourceMappingURL=chunk-XIBDIPTT.js.map
5044
- //# sourceMappingURL=chunk-XIBDIPTT.js.map
4907
+ //# sourceMappingURL=chunk-L4OM5KXO.js.map
4908
+ //# sourceMappingURL=chunk-L4OM5KXO.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkP24DSFF4_cjs = require('./chunk-P24DSFF4.cjs');
3
+ var chunk2ESGIL56_cjs = require('./chunk-2ESGIL56.cjs');
4
4
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
5
5
  var types = require('@storm-software/config-tools/types');
6
6
  var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
@@ -27,7 +27,7 @@ chunkPK6SKIKE_cjs.__name(getString, "getString");
27
27
  // src/lib/unplugin/factory.ts
28
28
  function createUnpluginFactory(variant, decorate) {
29
29
  return (config, meta) => {
30
- const log = chunkP24DSFF4_cjs.createLog("unplugin", config);
30
+ const log = chunk2ESGIL56_cjs.createLog("unplugin", config);
31
31
  log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
32
32
  try {
33
33
  const userConfig = {
@@ -38,7 +38,7 @@ function createUnpluginFactory(variant, decorate) {
38
38
  let api;
39
39
  async function buildStart() {
40
40
  log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
41
- api = await chunkP24DSFF4_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
41
+ api = await chunk2ESGIL56_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
42
42
  unplugin.setParseImpl(api.context.parse);
43
43
  log(types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
44
44
  await api.prepare({
@@ -137,5 +137,5 @@ chunkPK6SKIKE_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
137
137
 
138
138
  exports.createUnpluginFactory = createUnpluginFactory;
139
139
  exports.getString = getString;
140
- //# sourceMappingURL=chunk-6DKPMU3L.cjs.map
141
- //# sourceMappingURL=chunk-6DKPMU3L.cjs.map
140
+ //# sourceMappingURL=chunk-LFHXRRZX.cjs.map
141
+ //# sourceMappingURL=chunk-LFHXRRZX.cjs.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-LX3ZZP62.js';
1
+ import { createUnpluginFactory } from './chunk-5OE3ACWC.js';
2
2
  import { createRolldownPlugin } from 'unplugin';
3
3
 
4
4
  var rolldown = createRolldownPlugin(createUnpluginFactory("rolldown"));
5
5
  var rolldown_default = rolldown;
6
6
 
7
7
  export { rolldown, rolldown_default };
8
- //# sourceMappingURL=chunk-3IBKHRRH.js.map
9
- //# sourceMappingURL=chunk-3IBKHRRH.js.map
8
+ //# sourceMappingURL=chunk-NUYBKMON.js.map
9
+ //# sourceMappingURL=chunk-NUYBKMON.js.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkLFHXRRZX_cjs = require('./chunk-LFHXRRZX.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var rolldown = unplugin.createRolldownPlugin(chunkLFHXRRZX_cjs.createUnpluginFactory("rolldown"));
7
+ var rolldown_default = rolldown;
8
+
9
+ exports.rolldown = rolldown;
10
+ exports.rolldown_default = rolldown_default;
11
+ //# sourceMappingURL=chunk-PCQFHZKL.cjs.map
12
+ //# sourceMappingURL=chunk-PCQFHZKL.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BNVPJWSG.js';
2
- import { createUnpluginFactory } from './chunk-LX3ZZP62.js';
2
+ import { createUnpluginFactory } from './chunk-5OE3ACWC.js';
3
3
  import { __name } from './chunk-7QVYU63E.js';
4
4
  import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
5
5
  import defu from 'defu';
@@ -151,5 +151,5 @@ var vite = createVitePlugin(createUnpluginFactory("vite", (api, plugin) => {
151
151
  var vite_default = vite;
152
152
 
153
153
  export { vite, vite_default };
154
- //# sourceMappingURL=chunk-EHCLZGBR.js.map
155
- //# sourceMappingURL=chunk-EHCLZGBR.js.map
154
+ //# sourceMappingURL=chunk-PQOEG6WQ.js.map
155
+ //# sourceMappingURL=chunk-PQOEG6WQ.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkMKIL6OVG_cjs = require('./chunk-MKIL6OVG.cjs');
4
- var chunk6DKPMU3L_cjs = require('./chunk-6DKPMU3L.cjs');
4
+ var chunkLFHXRRZX_cjs = require('./chunk-LFHXRRZX.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
6
  var isUndefined = require('@stryke/type-checks/is-undefined');
7
7
  var unplugin = require('unplugin');
8
8
 
9
- var esbuild = unplugin.createEsbuildPlugin(chunk6DKPMU3L_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunkLFHXRRZX_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
10
10
  return {
11
11
  ...plugin,
12
12
  esbuild: {
@@ -32,5 +32,5 @@ var esbuild_default = esbuild;
32
32
 
33
33
  exports.esbuild = esbuild;
34
34
  exports.esbuild_default = esbuild_default;
35
- //# sourceMappingURL=chunk-6VDZHJEH.cjs.map
36
- //# sourceMappingURL=chunk-6VDZHJEH.cjs.map
35
+ //# sourceMappingURL=chunk-QQ6V5SC5.cjs.map
36
+ //# sourceMappingURL=chunk-QQ6V5SC5.cjs.map
package/dist/esbuild.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunk6VDZHJEH_cjs = require('./chunk-6VDZHJEH.cjs');
5
+ var chunkQQ6V5SC5_cjs = require('./chunk-QQ6V5SC5.cjs');
6
6
  require('./chunk-MKIL6OVG.cjs');
7
- require('./chunk-6DKPMU3L.cjs');
8
- require('./chunk-P24DSFF4.cjs');
7
+ require('./chunk-LFHXRRZX.cjs');
8
+ require('./chunk-2ESGIL56.cjs');
9
9
  require('./chunk-B6DVCLP5.cjs');
10
10
  require('./chunk-V5WOGN7O.cjs');
11
11
  require('./chunk-Z6ARQDHR.cjs');
@@ -15,15 +15,15 @@ require('./chunk-PK6SKIKE.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "default", {
17
17
  enumerable: true,
18
- get: function () { return chunk6VDZHJEH_cjs.esbuild_default; }
18
+ get: function () { return chunkQQ6V5SC5_cjs.esbuild_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "esbuild", {
21
21
  enumerable: true,
22
- get: function () { return chunk6VDZHJEH_cjs.esbuild; }
22
+ get: function () { return chunkQQ6V5SC5_cjs.esbuild; }
23
23
  });
24
24
  Object.defineProperty(exports, "module.exports", {
25
25
  enumerable: true,
26
- get: function () { return chunk6VDZHJEH_cjs.esbuild; }
26
+ get: function () { return chunkQQ6V5SC5_cjs.esbuild; }
27
27
  });
28
28
  //# sourceMappingURL=esbuild.cjs.map
29
29
  //# sourceMappingURL=esbuild.cjs.map
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
- export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-6YCSSTVC.js';
1
+ export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-2VUAOV5V.js';
2
2
  import './chunk-BNVPJWSG.js';
3
- import './chunk-LX3ZZP62.js';
4
- import './chunk-XIBDIPTT.js';
3
+ import './chunk-5OE3ACWC.js';
4
+ import './chunk-L4OM5KXO.js';
5
5
  import './chunk-PQXP7XQK.js';
6
6
  import './chunk-NITQ5IYP.js';
7
7
  import './chunk-2MYPFASJ.js';
package/dist/farm.cjs CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunk6DKPMU3L_cjs = require('./chunk-6DKPMU3L.cjs');
6
- require('./chunk-P24DSFF4.cjs');
5
+ var chunkLFHXRRZX_cjs = require('./chunk-LFHXRRZX.cjs');
6
+ require('./chunk-2ESGIL56.cjs');
7
7
  require('./chunk-B6DVCLP5.cjs');
8
8
  require('./chunk-V5WOGN7O.cjs');
9
9
  require('./chunk-Z6ARQDHR.cjs');
10
10
  require('./chunk-PK6SKIKE.cjs');
11
11
  var unplugin = require('unplugin');
12
12
 
13
- var farm = unplugin.createFarmPlugin(chunk6DKPMU3L_cjs.createUnpluginFactory("farm"));
13
+ var farm = unplugin.createFarmPlugin(chunkLFHXRRZX_cjs.createUnpluginFactory("farm"));
14
14
  var farm_default = farm;
15
15
 
16
16
  exports.default = farm_default;