powerlines 0.37.54 → 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 (120) 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-DMSPAYHA.cjs → chunk-2ESGIL56.cjs} +5 -142
  6. package/dist/{chunk-C25WKEO2.js → chunk-2VUAOV5V.js} +3 -3
  7. package/dist/{chunk-4DWSMUC2.js → chunk-5OE3ACWC.js} +3 -3
  8. package/dist/{chunk-DKYPRXSW.js → chunk-7LH63BFW.js} +3 -3
  9. package/dist/{chunk-EHGIUEFJ.cjs → chunk-BSKRKIB5.cjs} +4 -4
  10. package/dist/chunk-JK5Y4ABM.cjs +12 -0
  11. package/dist/{chunk-WVLRUTAI.js → chunk-L4OM5KXO.js} +5 -141
  12. package/dist/{chunk-G5QXE5QH.cjs → chunk-LFHXRRZX.cjs} +5 -5
  13. package/dist/{chunk-RPEWOQOR.js → chunk-NUYBKMON.js} +3 -3
  14. package/dist/chunk-PCQFHZKL.cjs +12 -0
  15. package/dist/{chunk-FBPHSZXY.js → chunk-PQOEG6WQ.js} +3 -3
  16. package/dist/{chunk-PTMMULXX.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/build/esbuild.cjs +5 -5
  24. package/dist/lib/build/esbuild.js +2 -2
  25. package/dist/lib/build/index.cjs +12 -12
  26. package/dist/lib/build/index.js +4 -4
  27. package/dist/lib/build/tsup.cjs +6 -6
  28. package/dist/lib/build/tsup.js +3 -3
  29. package/dist/lib/build/vite.cjs +5 -5
  30. package/dist/lib/build/vite.js +3 -3
  31. package/dist/lib/{chunk-4DLYGQZC.cjs → chunk-26DEN74R.cjs} +6 -6
  32. package/dist/lib/{chunk-4DLYGQZC.cjs.map → chunk-26DEN74R.cjs.map} +1 -1
  33. package/dist/lib/{chunk-UDP5UT5U.cjs → chunk-43LFJIBT.cjs} +4 -4
  34. package/dist/lib/{chunk-UDP5UT5U.cjs.map → chunk-43LFJIBT.cjs.map} +1 -1
  35. package/dist/lib/{chunk-5LL3YTST.cjs → chunk-ALXWGYR7.cjs} +4 -4
  36. package/dist/lib/{chunk-5LL3YTST.cjs.map → chunk-ALXWGYR7.cjs.map} +1 -1
  37. package/dist/lib/{chunk-P5JP3DHH.js → chunk-CIBV7IDT.js} +5 -141
  38. package/dist/lib/chunk-CIBV7IDT.js.map +1 -0
  39. package/dist/lib/{chunk-6CXIQSZI.cjs → chunk-DMSD5NS5.cjs} +19 -19
  40. package/dist/lib/{chunk-6CXIQSZI.cjs.map → chunk-DMSD5NS5.cjs.map} +1 -1
  41. package/dist/lib/{chunk-QA5Q2UBH.cjs → chunk-DTGZYBQX.cjs} +4 -4
  42. package/dist/lib/{chunk-QA5Q2UBH.cjs.map → chunk-DTGZYBQX.cjs.map} +1 -1
  43. package/dist/lib/{chunk-DUROA7IY.cjs → chunk-DWKRVCBP.cjs} +17 -172
  44. package/dist/lib/chunk-DWKRVCBP.cjs.map +1 -0
  45. package/dist/lib/{chunk-ARPXWAQM.cjs → chunk-FIXA5XLP.cjs} +4 -4
  46. package/dist/lib/{chunk-ARPXWAQM.cjs.map → chunk-FIXA5XLP.cjs.map} +1 -1
  47. package/dist/lib/{chunk-M4Q6V2EL.js → chunk-G2GLLLRU.js} +4 -4
  48. package/dist/lib/{chunk-M4Q6V2EL.js.map → chunk-G2GLLLRU.js.map} +1 -1
  49. package/dist/lib/{chunk-5RFTIHJY.cjs → chunk-HCDETYRM.cjs} +4 -4
  50. package/dist/lib/chunk-HCDETYRM.cjs.map +1 -0
  51. package/dist/lib/{chunk-DSQDA3AX.js → chunk-I4LBDWHI.js} +3 -3
  52. package/dist/lib/{chunk-DSQDA3AX.js.map → chunk-I4LBDWHI.js.map} +1 -1
  53. package/dist/lib/{chunk-MT6U737Y.js → chunk-I4VVVKOI.js} +3 -3
  54. package/dist/lib/{chunk-MT6U737Y.js.map → chunk-I4VVVKOI.js.map} +1 -1
  55. package/dist/lib/{chunk-XOLWPP4K.cjs → chunk-IEWCXR3Q.cjs} +5 -5
  56. package/dist/lib/{chunk-XOLWPP4K.cjs.map → chunk-IEWCXR3Q.cjs.map} +1 -1
  57. package/dist/lib/{chunk-3VHQ4ICQ.js → chunk-IJ534W5N.js} +3 -3
  58. package/dist/lib/{chunk-3VHQ4ICQ.js.map → chunk-IJ534W5N.js.map} +1 -1
  59. package/dist/lib/{chunk-YFI33VEM.cjs → chunk-ODRURQ3X.cjs} +4 -4
  60. package/dist/lib/{chunk-YFI33VEM.cjs.map → chunk-ODRURQ3X.cjs.map} +1 -1
  61. package/dist/lib/{chunk-BZUPF244.js → chunk-PMOMJSBN.js} +3 -3
  62. package/dist/lib/{chunk-BZUPF244.js.map → chunk-PMOMJSBN.js.map} +1 -1
  63. package/dist/lib/{chunk-S52XMZ4T.js → chunk-VWKNWAN3.js} +4 -4
  64. package/dist/lib/{chunk-S52XMZ4T.js.map → chunk-VWKNWAN3.js.map} +1 -1
  65. package/dist/lib/{chunk-FUY5E7BG.js → chunk-VXFMR22Q.js} +3 -3
  66. package/dist/lib/{chunk-FUY5E7BG.js.map → chunk-VXFMR22Q.js.map} +1 -1
  67. package/dist/lib/{chunk-ZW6KFCBI.js → chunk-Y7RUTBOF.js} +3 -3
  68. package/dist/lib/{chunk-ZW6KFCBI.js.map → chunk-Y7RUTBOF.js.map} +1 -1
  69. package/dist/lib/{chunk-CJI6MHJH.js → chunk-YVFFKAMF.js} +3 -3
  70. package/dist/lib/{chunk-CJI6MHJH.js.map → chunk-YVFFKAMF.js.map} +1 -1
  71. package/dist/lib/contexts/api-context.cjs +5 -5
  72. package/dist/lib/contexts/api-context.js +4 -4
  73. package/dist/lib/contexts/context.cjs +3 -3
  74. package/dist/lib/contexts/context.js +2 -2
  75. package/dist/lib/contexts/environment-context.cjs +4 -4
  76. package/dist/lib/contexts/environment-context.js +3 -3
  77. package/dist/lib/contexts/index.cjs +7 -7
  78. package/dist/lib/contexts/index.js +4 -4
  79. package/dist/lib/entry.cjs +8 -8
  80. package/dist/lib/entry.js +1 -1
  81. package/dist/lib/index.cjs +21 -21
  82. package/dist/lib/index.js +8 -8
  83. package/dist/lib/unplugin/factory.cjs +6 -6
  84. package/dist/lib/unplugin/factory.js +5 -5
  85. package/dist/lib/unplugin/index.cjs +6 -6
  86. package/dist/lib/unplugin/index.js +5 -5
  87. package/dist/lib/utilities/bundle.cjs +4 -4
  88. package/dist/lib/utilities/bundle.js +3 -3
  89. package/dist/lib/utilities/index.cjs +6 -6
  90. package/dist/lib/utilities/index.js +4 -4
  91. package/dist/lib/utilities/resolve.cjs +5 -5
  92. package/dist/lib/utilities/resolve.js +4 -4
  93. package/dist/next.cjs +4 -4
  94. package/dist/next.js +3 -3
  95. package/dist/nuxt.cjs +8 -8
  96. package/dist/nuxt.js +4 -4
  97. package/dist/rolldown.cjs +6 -6
  98. package/dist/rolldown.js +3 -3
  99. package/dist/rollup.cjs +3 -3
  100. package/dist/rollup.js +2 -2
  101. package/dist/rspack.cjs +3 -3
  102. package/dist/rspack.js +2 -2
  103. package/dist/tsdown.cjs +4 -4
  104. package/dist/tsdown.js +3 -3
  105. package/dist/tsup.cjs +4 -4
  106. package/dist/tsup.js +3 -3
  107. package/dist/unloader.cjs +3 -3
  108. package/dist/unloader.js +2 -2
  109. package/dist/unplugin.cjs +8 -8
  110. package/dist/unplugin.js +4 -4
  111. package/dist/vite.cjs +6 -6
  112. package/dist/vite.js +3 -3
  113. package/dist/webpack.cjs +6 -6
  114. package/dist/webpack.js +3 -3
  115. package/package.json +2 -2
  116. package/dist/chunk-5WCKSLT7.cjs +0 -12
  117. package/dist/chunk-KE67B233.cjs +0 -12
  118. package/dist/lib/chunk-5RFTIHJY.cjs.map +0 -1
  119. package/dist/lib/chunk-DUROA7IY.cjs.map +0 -1
  120. package/dist/lib/chunk-P5JP3DHH.js.map +0 -1
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkDMSPAYHA_cjs = require('./chunk-DMSPAYHA.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 chunkDMSPAYHA_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-WVLRUTAI.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 chunkEHGIUEFJ_cjs = require('./chunk-EHGIUEFJ.cjs');
5
+ var chunkBSKRKIB5_cjs = require('./chunk-BSKRKIB5.cjs');
6
6
  require('./chunk-MKIL6OVG.cjs');
7
- require('./chunk-G5QXE5QH.cjs');
8
- require('./chunk-DMSPAYHA.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
- chunkEHGIUEFJ_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-FBPHSZXY.js';
1
+ import { vite_default } from './chunk-PQOEG6WQ.js';
2
2
  import './chunk-BNVPJWSG.js';
3
- import './chunk-4DWSMUC2.js';
4
- import './chunk-WVLRUTAI.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.53";
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");
@@ -961,12 +857,12 @@ function resolveEntriesSync(context, typeDefinitions) {
961
857
  const filePath = isType.isAbsolutePath(typeDefinition.file) ? typeDefinition.file : append.appendPath(typeDefinition.file, context.config.projectRoot);
962
858
  if (context.fs.isFileSync(filePath)) {
963
859
  return resolveEntry(context, {
964
- file: replace.replacePath(filePath, context.config.projectRoot),
860
+ file: append.appendPath(filePath, context.workspaceConfig.workspaceRoot),
965
861
  name: typeDefinition.name
966
862
  });
967
863
  }
968
864
  return context.fs.globSync(append.appendPath(filePath, context.workspaceConfig.workspaceRoot)).map((file) => resolveEntry(context, {
969
- file: replace.replacePath(file, context.config.projectRoot),
865
+ file,
970
866
  name: typeDefinition.name
971
867
  }));
972
868
  }).flat().filter(Boolean);
@@ -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-DMSPAYHA.cjs.map
5085
- //# sourceMappingURL=chunk-DMSPAYHA.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-4DWSMUC2.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-C25WKEO2.js.map
33
- //# sourceMappingURL=chunk-C25WKEO2.js.map
32
+ //# sourceMappingURL=chunk-2VUAOV5V.js.map
33
+ //# sourceMappingURL=chunk-2VUAOV5V.js.map
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-WVLRUTAI.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-4DWSMUC2.js.map
138
- //# sourceMappingURL=chunk-4DWSMUC2.js.map
137
+ //# sourceMappingURL=chunk-5OE3ACWC.js.map
138
+ //# sourceMappingURL=chunk-5OE3ACWC.js.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-4DWSMUC2.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-DKYPRXSW.js.map
9
- //# sourceMappingURL=chunk-DKYPRXSW.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 chunkG5QXE5QH_cjs = require('./chunk-G5QXE5QH.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(chunkG5QXE5QH_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-EHGIUEFJ.cjs.map
162
- //# sourceMappingURL=chunk-EHGIUEFJ.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.53";
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");
@@ -932,12 +829,12 @@ function resolveEntriesSync(context, typeDefinitions) {
932
829
  const filePath = isAbsolutePath(typeDefinition.file) ? typeDefinition.file : appendPath(typeDefinition.file, context.config.projectRoot);
933
830
  if (context.fs.isFileSync(filePath)) {
934
831
  return resolveEntry(context, {
935
- file: replacePath(filePath, context.config.projectRoot),
832
+ file: appendPath(filePath, context.workspaceConfig.workspaceRoot),
936
833
  name: typeDefinition.name
937
834
  });
938
835
  }
939
836
  return context.fs.globSync(appendPath(filePath, context.workspaceConfig.workspaceRoot)).map((file) => resolveEntry(context, {
940
- file: replacePath(file, context.config.projectRoot),
837
+ file,
941
838
  name: typeDefinition.name
942
839
  }));
943
840
  }).flat().filter(Boolean);
@@ -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-WVLRUTAI.js.map
5044
- //# sourceMappingURL=chunk-WVLRUTAI.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 chunkDMSPAYHA_cjs = require('./chunk-DMSPAYHA.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 = chunkDMSPAYHA_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 chunkDMSPAYHA_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-G5QXE5QH.cjs.map
141
- //# sourceMappingURL=chunk-G5QXE5QH.cjs.map
140
+ //# sourceMappingURL=chunk-LFHXRRZX.cjs.map
141
+ //# sourceMappingURL=chunk-LFHXRRZX.cjs.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-4DWSMUC2.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-RPEWOQOR.js.map
9
- //# sourceMappingURL=chunk-RPEWOQOR.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-4DWSMUC2.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-FBPHSZXY.js.map
155
- //# sourceMappingURL=chunk-FBPHSZXY.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 chunkG5QXE5QH_cjs = require('./chunk-G5QXE5QH.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(chunkG5QXE5QH_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-PTMMULXX.cjs.map
36
- //# sourceMappingURL=chunk-PTMMULXX.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 chunkPTMMULXX_cjs = require('./chunk-PTMMULXX.cjs');
5
+ var chunkQQ6V5SC5_cjs = require('./chunk-QQ6V5SC5.cjs');
6
6
  require('./chunk-MKIL6OVG.cjs');
7
- require('./chunk-G5QXE5QH.cjs');
8
- require('./chunk-DMSPAYHA.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 chunkPTMMULXX_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 chunkPTMMULXX_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 chunkPTMMULXX_cjs.esbuild; }
26
+ get: function () { return chunkQQ6V5SC5_cjs.esbuild; }
27
27
  });
28
28
  //# sourceMappingURL=esbuild.cjs.map
29
29
  //# sourceMappingURL=esbuild.cjs.map