powerlines 0.37.45 → 0.37.46

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 (87) 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-RHUW2TOW.js → chunk-2KFVP7PK.js} +27 -35
  6. package/dist/{chunk-LA5XXKM6.cjs → chunk-5HQYRBKT.cjs} +4 -4
  7. package/dist/chunk-7OGAS5PG.cjs +12 -0
  8. package/dist/{chunk-HOMG6EO2.js → chunk-BG4PIMQN.js} +3 -3
  9. package/dist/{chunk-6RPSOJAZ.js → chunk-DFLUJMCI.js} +3 -3
  10. package/dist/{chunk-HBN3FBUW.cjs → chunk-ENEMWUFY.cjs} +4 -4
  11. package/dist/chunk-FBUBCGXH.cjs +12 -0
  12. package/dist/{chunk-S4AJRQ5B.cjs → chunk-RULSJ2SK.cjs} +5 -5
  13. package/dist/{chunk-7YZHCI6R.cjs → chunk-RUYGKNBM.cjs} +27 -35
  14. package/dist/{chunk-QYA2KUZD.js → chunk-ST2QOD7K.js} +3 -3
  15. package/dist/{chunk-55YNSLNB.js → chunk-SV5CZ6T5.js} +3 -3
  16. package/dist/{chunk-3LYYE5EN.js → chunk-YJRPFM2Q.js} +3 -3
  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-EQRUYU2S.cjs → chunk-2XCDEMMO.cjs} +26 -34
  24. package/dist/lib/chunk-2XCDEMMO.cjs.map +1 -0
  25. package/dist/lib/{chunk-RDH2EJ5I.cjs → chunk-5QBG6QCZ.cjs} +6 -6
  26. package/dist/lib/{chunk-RDH2EJ5I.cjs.map → chunk-5QBG6QCZ.cjs.map} +1 -1
  27. package/dist/lib/{chunk-CMAHCKYS.js → chunk-7XIWJ5IH.js} +3 -3
  28. package/dist/lib/{chunk-CMAHCKYS.js.map → chunk-7XIWJ5IH.js.map} +1 -1
  29. package/dist/lib/{chunk-MGJPUTU6.js → chunk-DXM5MX7M.js} +5 -5
  30. package/dist/lib/{chunk-MGJPUTU6.js.map → chunk-DXM5MX7M.js.map} +1 -1
  31. package/dist/lib/{chunk-YGFZHAZB.cjs → chunk-EQLYPKNF.cjs} +19 -19
  32. package/dist/lib/{chunk-YGFZHAZB.cjs.map → chunk-EQLYPKNF.cjs.map} +1 -1
  33. package/dist/lib/{chunk-NYKVJUON.cjs → chunk-LXD3CZ3T.cjs} +17 -17
  34. package/dist/lib/{chunk-NYKVJUON.cjs.map → chunk-LXD3CZ3T.cjs.map} +1 -1
  35. package/dist/lib/{chunk-GQXUYZDF.js → chunk-PTVOWTSC.js} +3 -3
  36. package/dist/lib/{chunk-GQXUYZDF.js.map → chunk-PTVOWTSC.js.map} +1 -1
  37. package/dist/lib/{chunk-RHPNB53E.cjs → chunk-QOL47PXI.cjs} +5 -5
  38. package/dist/lib/{chunk-RHPNB53E.cjs.map → chunk-QOL47PXI.cjs.map} +1 -1
  39. package/dist/lib/{chunk-ABT2BGDN.js → chunk-VZCNKJBT.js} +26 -34
  40. package/dist/lib/chunk-VZCNKJBT.js.map +1 -0
  41. package/dist/lib/{chunk-KQKA4HWJ.js → chunk-WPRZ6Y3Q.js} +4 -4
  42. package/dist/lib/{chunk-KQKA4HWJ.js.map → chunk-WPRZ6Y3Q.js.map} +1 -1
  43. package/dist/lib/contexts/api-context.cjs +5 -5
  44. package/dist/lib/contexts/api-context.js +4 -4
  45. package/dist/lib/contexts/context.cjs +3 -3
  46. package/dist/lib/contexts/context.js +2 -2
  47. package/dist/lib/contexts/environment-context.cjs +4 -4
  48. package/dist/lib/contexts/environment-context.js +3 -3
  49. package/dist/lib/contexts/index.cjs +7 -7
  50. package/dist/lib/contexts/index.js +4 -4
  51. package/dist/lib/fs/index.cjs +2 -2
  52. package/dist/lib/fs/index.js +1 -1
  53. package/dist/lib/fs/vfs.cjs +2 -2
  54. package/dist/lib/fs/vfs.js +1 -1
  55. package/dist/lib/index.cjs +10 -10
  56. package/dist/lib/index.js +5 -5
  57. package/dist/lib/unplugin/factory.cjs +6 -6
  58. package/dist/lib/unplugin/factory.js +5 -5
  59. package/dist/lib/unplugin/index.cjs +6 -6
  60. package/dist/lib/unplugin/index.js +5 -5
  61. package/dist/next.cjs +4 -4
  62. package/dist/next.js +3 -3
  63. package/dist/nuxt.cjs +8 -8
  64. package/dist/nuxt.js +4 -4
  65. package/dist/rolldown.cjs +6 -6
  66. package/dist/rolldown.js +3 -3
  67. package/dist/rollup.cjs +3 -3
  68. package/dist/rollup.js +2 -2
  69. package/dist/rspack.cjs +3 -3
  70. package/dist/rspack.js +2 -2
  71. package/dist/tsdown.cjs +4 -4
  72. package/dist/tsdown.js +3 -3
  73. package/dist/tsup.cjs +4 -4
  74. package/dist/tsup.js +3 -3
  75. package/dist/unloader.cjs +3 -3
  76. package/dist/unloader.js +2 -2
  77. package/dist/unplugin.cjs +8 -8
  78. package/dist/unplugin.js +4 -4
  79. package/dist/vite.cjs +6 -6
  80. package/dist/vite.js +3 -3
  81. package/dist/webpack.cjs +6 -6
  82. package/dist/webpack.js +3 -3
  83. package/package.json +15 -15
  84. package/dist/chunk-FPDVCAGF.cjs +0 -12
  85. package/dist/chunk-TMWUCFE4.cjs +0 -12
  86. package/dist/lib/chunk-ABT2BGDN.js.map +0 -1
  87. package/dist/lib/chunk-EQRUYU2S.cjs.map +0 -1
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk7YZHCI6R_cjs = require('./chunk-7YZHCI6R.cjs');
3
+ var chunkRUYGKNBM_cjs = require('./chunk-RUYGKNBM.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 chunk7YZHCI6R_cjs.PowerlinesAPI; }
13
+ get: function () { return chunkRUYGKNBM_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-RHUW2TOW.js';
1
+ export { PowerlinesAPI } from './chunk-2KFVP7PK.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 chunkHBN3FBUW_cjs = require('./chunk-HBN3FBUW.cjs');
5
+ var chunkENEMWUFY_cjs = require('./chunk-ENEMWUFY.cjs');
6
6
  require('./chunk-VBGDN56Q.cjs');
7
- require('./chunk-S4AJRQ5B.cjs');
8
- require('./chunk-7YZHCI6R.cjs');
7
+ require('./chunk-RULSJ2SK.cjs');
8
+ require('./chunk-RUYGKNBM.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
- chunkHBN3FBUW_cjs.vite_default(config)
18
+ chunkENEMWUFY_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-6RPSOJAZ.js';
1
+ import { vite_default } from './chunk-DFLUJMCI.js';
2
2
  import './chunk-FJHS7DAU.js';
3
- import './chunk-3LYYE5EN.js';
4
- import './chunk-RHUW2TOW.js';
3
+ import './chunk-YJRPFM2Q.js';
4
+ import './chunk-2KFVP7PK.js';
5
5
  import './chunk-PQXP7XQK.js';
6
6
  import './chunk-NITQ5IYP.js';
7
7
  import './chunk-2MYPFASJ.js';
@@ -60,6 +60,7 @@ import { parseTypeDefinition } from '@stryke/convert/parse-type-definition';
60
60
  import * as $ from '@stryke/capnp';
61
61
  import { readFileBuffer, readFileBufferSync, writeFileBuffer } from '@stryke/fs/buffer';
62
62
  import { correctPath, stripStars } from '@stryke/path/correct-path';
63
+ import { globToRegex } from '@stryke/path/glob-to-regex';
63
64
  import { isAbsolutePath } from '@stryke/path/is-type';
64
65
  import { isRegExp } from '@stryke/type-checks/is-regexp';
65
66
  import { Blob as Blob$1 } from 'node:buffer';
@@ -80,7 +81,7 @@ import '@stryke/fs/remove-file';
80
81
 
81
82
  // package.json
82
83
  var name = "powerlines";
83
- var version = "0.37.44";
84
+ var version = "0.37.45";
84
85
  var package_default = {
85
86
  version};
86
87
  function resolveModulePath(nodePath, state) {
@@ -1799,16 +1800,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
1799
1800
  return normalizePath(path.includes("{") || path.includes("}") ? replacePathTokens(this.#context, path) : path, this.#context.builtinsPath, this.#context.config.output.builtinPrefix);
1800
1801
  }
1801
1802
  /**
1802
- * Builds a regular expression from a string pattern for path matching.
1803
- *
1804
- * @param path - The string pattern to convert.
1805
- * @returns A regular expression for matching paths.
1806
- */
1807
- #buildRegex(path) {
1808
- const token = "::GLOBSTAR::";
1809
- return new RegExp(`^${this.#normalizePath(path).replace(/\*\*/g, token).replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]").replace(new RegExp(token, "g"), ".*")}$`);
1810
- }
1811
- /**
1812
1803
  * Gets the storage adapter and relative key for a given key.
1813
1804
  *
1814
1805
  * @remarks
@@ -1851,7 +1842,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
1851
1842
  */
1852
1843
  #getStorages(base = "", includeParent = false) {
1853
1844
  const baseKey = this.resolveSync(base) || base;
1854
- return Object.keys(this.#storage).sort().reverse().filter((key) => isParentPath(key, baseKey) || includeParent && isParentPath(baseKey, key) || baseKey.includes("*") && (isParentPath(stripStars(baseKey), key) || this.#buildRegex(replaceExtension(baseKey)).test(key))).map((key) => ({
1845
+ return Object.keys(this.#storage).sort().reverse().filter((key) => isParentPath(key, baseKey) || includeParent && isParentPath(baseKey, key) || baseKey.includes("*") && (isParentPath(stripStars(baseKey), key) || globToRegex(replaceExtension(baseKey)).test(key))).map((key) => ({
1855
1846
  relativeBase: baseKey.length > key.length ? baseKey.slice(key.length) : void 0,
1856
1847
  base: key,
1857
1848
  adapter: this.#storage[key]
@@ -2258,7 +2249,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2258
2249
  const results = [];
2259
2250
  for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
2260
2251
  const normalized = this.#normalizePath(pattern);
2261
- if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
2252
+ if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("*")) {
2262
2253
  if (this.isDirectorySync(normalized)) {
2263
2254
  results.push(...await this.list(normalized));
2264
2255
  } else {
@@ -2267,17 +2258,17 @@ var VirtualFileSystem = class _VirtualFileSystem {
2267
2258
  results.push(resolved);
2268
2259
  }
2269
2260
  }
2270
- continue;
2271
- }
2272
- const absPattern = isAbsolutePath(normalized) ? normalized : this.#normalizePath(appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2273
- await Promise.all((await this.list(stripStars(absPattern))).map(async (file) => {
2274
- if (this.#buildRegex(absPattern).test(file)) {
2275
- const resolved = this.resolveSync(file);
2276
- if (resolved && !results.includes(resolved)) {
2277
- results.push(resolved);
2261
+ } else {
2262
+ const absPattern = isAbsolutePath(normalized) ? normalized : this.#normalizePath(appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2263
+ await Promise.all((await this.list(stripStars(absPattern))).map(async (file) => {
2264
+ if (globToRegex(absPattern).test(file)) {
2265
+ const resolved = await this.resolve(file);
2266
+ if (resolved && !results.includes(resolved)) {
2267
+ results.push(resolved);
2268
+ }
2278
2269
  }
2279
- }
2280
- }));
2270
+ }));
2271
+ }
2281
2272
  }
2282
2273
  return results;
2283
2274
  }
@@ -2291,7 +2282,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2291
2282
  const results = [];
2292
2283
  for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
2293
2284
  const normalized = this.#normalizePath(pattern);
2294
- if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
2285
+ if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("*")) {
2295
2286
  if (this.isDirectorySync(normalized)) {
2296
2287
  results.push(...this.listSync(normalized));
2297
2288
  } else {
@@ -2300,15 +2291,16 @@ var VirtualFileSystem = class _VirtualFileSystem {
2300
2291
  results.push(resolved);
2301
2292
  }
2302
2293
  }
2303
- continue;
2304
- }
2305
- const absPattern = isAbsolutePath(normalized) ? normalized : this.#normalizePath(appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2306
- const files = this.listSync(stripStars(absPattern));
2307
- for (const file of files) {
2308
- if (this.#buildRegex(absPattern).test(file)) {
2309
- const resolved = this.resolveSync(file);
2310
- if (resolved && !results.includes(resolved)) {
2311
- results.push(resolved);
2294
+ } else {
2295
+ const absPattern = isAbsolutePath(normalized) ? normalized : this.#normalizePath(appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2296
+ const files = this.listSync(stripStars(absPattern));
2297
+ for (const file of files) {
2298
+ const regex = globToRegex(absPattern);
2299
+ if (regex.test(file)) {
2300
+ const resolved = this.resolveSync(file);
2301
+ if (resolved && !results.includes(resolved)) {
2302
+ results.push(resolved);
2303
+ }
2312
2304
  }
2313
2305
  }
2314
2306
  }
@@ -5059,5 +5051,5 @@ Note: Please ensure the plugin package's default export is a class that extends
5059
5051
  };
5060
5052
 
5061
5053
  export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, combineContexts, createLog, extendLog, isUnpluginBuilderVariant, name, version };
5062
- //# sourceMappingURL=chunk-RHUW2TOW.js.map
5063
- //# sourceMappingURL=chunk-RHUW2TOW.js.map
5054
+ //# sourceMappingURL=chunk-2KFVP7PK.js.map
5055
+ //# sourceMappingURL=chunk-2KFVP7PK.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkVBGDN56Q_cjs = require('./chunk-VBGDN56Q.cjs');
4
- var chunkS4AJRQ5B_cjs = require('./chunk-S4AJRQ5B.cjs');
4
+ var chunkRULSJ2SK_cjs = require('./chunk-RULSJ2SK.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(chunkS4AJRQ5B_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunkRULSJ2SK_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-LA5XXKM6.cjs.map
36
- //# sourceMappingURL=chunk-LA5XXKM6.cjs.map
35
+ //# sourceMappingURL=chunk-5HQYRBKT.cjs.map
36
+ //# sourceMappingURL=chunk-5HQYRBKT.cjs.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkRULSJ2SK_cjs = require('./chunk-RULSJ2SK.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var webpack = unplugin.createWebpackPlugin(chunkRULSJ2SK_cjs.createUnpluginFactory("webpack"));
7
+ var webpack_default = webpack;
8
+
9
+ exports.webpack = webpack;
10
+ exports.webpack_default = webpack_default;
11
+ //# sourceMappingURL=chunk-7OGAS5PG.cjs.map
12
+ //# sourceMappingURL=chunk-7OGAS5PG.cjs.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-3LYYE5EN.js';
1
+ import { createUnpluginFactory } from './chunk-YJRPFM2Q.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-HOMG6EO2.js.map
9
- //# sourceMappingURL=chunk-HOMG6EO2.js.map
8
+ //# sourceMappingURL=chunk-BG4PIMQN.js.map
9
+ //# sourceMappingURL=chunk-BG4PIMQN.js.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-FJHS7DAU.js';
2
- import { createUnpluginFactory } from './chunk-3LYYE5EN.js';
2
+ import { createUnpluginFactory } from './chunk-YJRPFM2Q.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-6RPSOJAZ.js.map
155
- //# sourceMappingURL=chunk-6RPSOJAZ.js.map
154
+ //# sourceMappingURL=chunk-DFLUJMCI.js.map
155
+ //# sourceMappingURL=chunk-DFLUJMCI.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkVBGDN56Q_cjs = require('./chunk-VBGDN56Q.cjs');
4
- var chunkS4AJRQ5B_cjs = require('./chunk-S4AJRQ5B.cjs');
4
+ var chunkRULSJ2SK_cjs = require('./chunk-RULSJ2SK.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(chunkS4AJRQ5B_cjs.createUnpluginFactory("vite", (api, plugin) => {
100
+ var vite = unplugin.createVitePlugin(chunkRULSJ2SK_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-HBN3FBUW.cjs.map
162
- //# sourceMappingURL=chunk-HBN3FBUW.cjs.map
161
+ //# sourceMappingURL=chunk-ENEMWUFY.cjs.map
162
+ //# sourceMappingURL=chunk-ENEMWUFY.cjs.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkRULSJ2SK_cjs = require('./chunk-RULSJ2SK.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var rolldown = unplugin.createRolldownPlugin(chunkRULSJ2SK_cjs.createUnpluginFactory("rolldown"));
7
+ var rolldown_default = rolldown;
8
+
9
+ exports.rolldown = rolldown;
10
+ exports.rolldown_default = rolldown_default;
11
+ //# sourceMappingURL=chunk-FBUBCGXH.cjs.map
12
+ //# sourceMappingURL=chunk-FBUBCGXH.cjs.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk7YZHCI6R_cjs = require('./chunk-7YZHCI6R.cjs');
3
+ var chunkRUYGKNBM_cjs = require('./chunk-RUYGKNBM.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 = chunk7YZHCI6R_cjs.createLog("unplugin", config);
30
+ const log = chunkRUYGKNBM_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 chunk7YZHCI6R_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
41
+ api = await chunkRUYGKNBM_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-S4AJRQ5B.cjs.map
141
- //# sourceMappingURL=chunk-S4AJRQ5B.cjs.map
140
+ //# sourceMappingURL=chunk-RULSJ2SK.cjs.map
141
+ //# sourceMappingURL=chunk-RULSJ2SK.cjs.map
@@ -62,6 +62,7 @@ var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
62
62
  var $ = require('@stryke/capnp');
63
63
  var buffer = require('@stryke/fs/buffer');
64
64
  var correctPath = require('@stryke/path/correct-path');
65
+ var globToRegex = require('@stryke/path/glob-to-regex');
65
66
  var isType = require('@stryke/path/is-type');
66
67
  var isRegexp = require('@stryke/type-checks/is-regexp');
67
68
  var buffer$1 = require('buffer');
@@ -109,7 +110,7 @@ var $__namespace = /*#__PURE__*/_interopNamespace($);
109
110
 
110
111
  // package.json
111
112
  var name = "powerlines";
112
- var version = "0.37.44";
113
+ var version = "0.37.45";
113
114
  var package_default = {
114
115
  version};
115
116
  function resolveModulePath(nodePath, state) {
@@ -1828,16 +1829,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
1828
1829
  return normalizePath(path.includes("{") || path.includes("}") ? replacePathTokens(this.#context, path) : path, this.#context.builtinsPath, this.#context.config.output.builtinPrefix);
1829
1830
  }
1830
1831
  /**
1831
- * Builds a regular expression from a string pattern for path matching.
1832
- *
1833
- * @param path - The string pattern to convert.
1834
- * @returns A regular expression for matching paths.
1835
- */
1836
- #buildRegex(path) {
1837
- const token = "::GLOBSTAR::";
1838
- return new RegExp(`^${this.#normalizePath(path).replace(/\*\*/g, token).replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]").replace(new RegExp(token, "g"), ".*")}$`);
1839
- }
1840
- /**
1841
1832
  * Gets the storage adapter and relative key for a given key.
1842
1833
  *
1843
1834
  * @remarks
@@ -1880,7 +1871,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
1880
1871
  */
1881
1872
  #getStorages(base = "", includeParent = false) {
1882
1873
  const baseKey = this.resolveSync(base) || base;
1883
- return Object.keys(this.#storage).sort().reverse().filter((key) => isParentPath.isParentPath(key, baseKey) || includeParent && isParentPath.isParentPath(baseKey, key) || baseKey.includes("*") && (isParentPath.isParentPath(correctPath.stripStars(baseKey), key) || this.#buildRegex(replace.replaceExtension(baseKey)).test(key))).map((key) => ({
1874
+ return Object.keys(this.#storage).sort().reverse().filter((key) => isParentPath.isParentPath(key, baseKey) || includeParent && isParentPath.isParentPath(baseKey, key) || baseKey.includes("*") && (isParentPath.isParentPath(correctPath.stripStars(baseKey), key) || globToRegex.globToRegex(replace.replaceExtension(baseKey)).test(key))).map((key) => ({
1884
1875
  relativeBase: baseKey.length > key.length ? baseKey.slice(key.length) : void 0,
1885
1876
  base: key,
1886
1877
  adapter: this.#storage[key]
@@ -2287,7 +2278,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2287
2278
  const results = [];
2288
2279
  for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
2289
2280
  const normalized = this.#normalizePath(pattern);
2290
- if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
2281
+ if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("*")) {
2291
2282
  if (this.isDirectorySync(normalized)) {
2292
2283
  results.push(...await this.list(normalized));
2293
2284
  } else {
@@ -2296,17 +2287,17 @@ var VirtualFileSystem = class _VirtualFileSystem {
2296
2287
  results.push(resolved);
2297
2288
  }
2298
2289
  }
2299
- continue;
2300
- }
2301
- const absPattern = isType.isAbsolutePath(normalized) ? normalized : this.#normalizePath(append.appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2302
- await Promise.all((await this.list(correctPath.stripStars(absPattern))).map(async (file) => {
2303
- if (this.#buildRegex(absPattern).test(file)) {
2304
- const resolved = this.resolveSync(file);
2305
- if (resolved && !results.includes(resolved)) {
2306
- results.push(resolved);
2290
+ } else {
2291
+ const absPattern = isType.isAbsolutePath(normalized) ? normalized : this.#normalizePath(append.appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2292
+ await Promise.all((await this.list(correctPath.stripStars(absPattern))).map(async (file) => {
2293
+ if (globToRegex.globToRegex(absPattern).test(file)) {
2294
+ const resolved = await this.resolve(file);
2295
+ if (resolved && !results.includes(resolved)) {
2296
+ results.push(resolved);
2297
+ }
2307
2298
  }
2308
- }
2309
- }));
2299
+ }));
2300
+ }
2310
2301
  }
2311
2302
  return results;
2312
2303
  }
@@ -2320,7 +2311,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2320
2311
  const results = [];
2321
2312
  for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
2322
2313
  const normalized = this.#normalizePath(pattern);
2323
- if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
2314
+ if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("*")) {
2324
2315
  if (this.isDirectorySync(normalized)) {
2325
2316
  results.push(...this.listSync(normalized));
2326
2317
  } else {
@@ -2329,15 +2320,16 @@ var VirtualFileSystem = class _VirtualFileSystem {
2329
2320
  results.push(resolved);
2330
2321
  }
2331
2322
  }
2332
- continue;
2333
- }
2334
- const absPattern = isType.isAbsolutePath(normalized) ? normalized : this.#normalizePath(append.appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2335
- const files = this.listSync(correctPath.stripStars(absPattern));
2336
- for (const file of files) {
2337
- if (this.#buildRegex(absPattern).test(file)) {
2338
- const resolved = this.resolveSync(file);
2339
- if (resolved && !results.includes(resolved)) {
2340
- results.push(resolved);
2323
+ } else {
2324
+ const absPattern = isType.isAbsolutePath(normalized) ? normalized : this.#normalizePath(append.appendPath(normalized, this.#context.workspaceConfig.workspaceRoot));
2325
+ const files = this.listSync(correctPath.stripStars(absPattern));
2326
+ for (const file of files) {
2327
+ const regex = globToRegex.globToRegex(absPattern);
2328
+ if (regex.test(file)) {
2329
+ const resolved = this.resolveSync(file);
2330
+ if (resolved && !results.includes(resolved)) {
2331
+ results.push(resolved);
2332
+ }
2341
2333
  }
2342
2334
  }
2343
2335
  }
@@ -5100,5 +5092,5 @@ exports.extendLog = extendLog;
5100
5092
  exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
5101
5093
  exports.name = name;
5102
5094
  exports.version = version;
5103
- //# sourceMappingURL=chunk-7YZHCI6R.cjs.map
5104
- //# sourceMappingURL=chunk-7YZHCI6R.cjs.map
5095
+ //# sourceMappingURL=chunk-RUYGKNBM.cjs.map
5096
+ //# sourceMappingURL=chunk-RUYGKNBM.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-FJHS7DAU.js';
2
- import { createUnpluginFactory } from './chunk-3LYYE5EN.js';
2
+ import { createUnpluginFactory } from './chunk-YJRPFM2Q.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-QYA2KUZD.js.map
33
- //# sourceMappingURL=chunk-QYA2KUZD.js.map
32
+ //# sourceMappingURL=chunk-ST2QOD7K.js.map
33
+ //# sourceMappingURL=chunk-ST2QOD7K.js.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-3LYYE5EN.js';
1
+ import { createUnpluginFactory } from './chunk-YJRPFM2Q.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-55YNSLNB.js.map
9
- //# sourceMappingURL=chunk-55YNSLNB.js.map
8
+ //# sourceMappingURL=chunk-SV5CZ6T5.js.map
9
+ //# sourceMappingURL=chunk-SV5CZ6T5.js.map
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-RHUW2TOW.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-2KFVP7PK.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-3LYYE5EN.js.map
138
- //# sourceMappingURL=chunk-3LYYE5EN.js.map
137
+ //# sourceMappingURL=chunk-YJRPFM2Q.js.map
138
+ //# sourceMappingURL=chunk-YJRPFM2Q.js.map
package/dist/esbuild.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkLA5XXKM6_cjs = require('./chunk-LA5XXKM6.cjs');
5
+ var chunk5HQYRBKT_cjs = require('./chunk-5HQYRBKT.cjs');
6
6
  require('./chunk-VBGDN56Q.cjs');
7
- require('./chunk-S4AJRQ5B.cjs');
8
- require('./chunk-7YZHCI6R.cjs');
7
+ require('./chunk-RULSJ2SK.cjs');
8
+ require('./chunk-RUYGKNBM.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 chunkLA5XXKM6_cjs.esbuild_default; }
18
+ get: function () { return chunk5HQYRBKT_cjs.esbuild_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "esbuild", {
21
21
  enumerable: true,
22
- get: function () { return chunkLA5XXKM6_cjs.esbuild; }
22
+ get: function () { return chunk5HQYRBKT_cjs.esbuild; }
23
23
  });
24
24
  Object.defineProperty(exports, "module.exports", {
25
25
  enumerable: true,
26
- get: function () { return chunkLA5XXKM6_cjs.esbuild; }
26
+ get: function () { return chunk5HQYRBKT_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-QYA2KUZD.js';
1
+ export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-ST2QOD7K.js';
2
2
  import './chunk-FJHS7DAU.js';
3
- import './chunk-3LYYE5EN.js';
4
- import './chunk-RHUW2TOW.js';
3
+ import './chunk-YJRPFM2Q.js';
4
+ import './chunk-2KFVP7PK.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 chunkS4AJRQ5B_cjs = require('./chunk-S4AJRQ5B.cjs');
6
- require('./chunk-7YZHCI6R.cjs');
5
+ var chunkRULSJ2SK_cjs = require('./chunk-RULSJ2SK.cjs');
6
+ require('./chunk-RUYGKNBM.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(chunkS4AJRQ5B_cjs.createUnpluginFactory("farm"));
13
+ var farm = unplugin.createFarmPlugin(chunkRULSJ2SK_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-3LYYE5EN.js';
2
- import './chunk-RHUW2TOW.js';
1
+ import { createUnpluginFactory } from './chunk-YJRPFM2Q.js';
2
+ import './chunk-2KFVP7PK.js';
3
3
  import './chunk-PQXP7XQK.js';
4
4
  import './chunk-NITQ5IYP.js';
5
5
  import './chunk-2MYPFASJ.js';
package/dist/index.cjs CHANGED
@@ -13,7 +13,7 @@ require('./chunk-4JCNAKOE.cjs');
13
13
  require('./chunk-D6GGZQLC.cjs');
14
14
  var chunkA7AUGAHH_cjs = require('./chunk-A7AUGAHH.cjs');
15
15
  var chunk42ZHOCZJ_cjs = require('./chunk-42ZHOCZJ.cjs');
16
- var chunk7YZHCI6R_cjs = require('./chunk-7YZHCI6R.cjs');
16
+ var chunkRUYGKNBM_cjs = require('./chunk-RUYGKNBM.cjs');
17
17
  var chunkB6DVCLP5_cjs = require('./chunk-B6DVCLP5.cjs');
18
18
  var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
19
19
  var chunkZ6ARQDHR_cjs = require('./chunk-Z6ARQDHR.cjs');
@@ -27,10 +27,10 @@ chunkPK6SKIKE_cjs.__name(defineConfig, "defineConfig");
27
27
  async function createPowerlines(options = {}) {
28
28
  options.root ??= process.cwd();
29
29
  const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(options.root);
30
- return chunk7YZHCI6R_cjs.PowerlinesAPI.from(workspaceRoot, options);
30
+ return chunkRUYGKNBM_cjs.PowerlinesAPI.from(workspaceRoot, options);
31
31
  }
32
32
  chunkPK6SKIKE_cjs.__name(createPowerlines, "createPowerlines");
33
- var index_default = chunk7YZHCI6R_cjs.PowerlinesAPI;
33
+ var index_default = chunkRUYGKNBM_cjs.PowerlinesAPI;
34
34
 
35
35
  Object.defineProperty(exports, "STORAGE_PRESETS", {
36
36
  enumerable: true,
@@ -50,31 +50,31 @@ Object.defineProperty(exports, "HOOKS_LIST_ORDERS", {
50
50
  });
51
51
  Object.defineProperty(exports, "FileId", {
52
52
  enumerable: true,
53
- get: function () { return chunk7YZHCI6R_cjs.FileId; }
53
+ get: function () { return chunkRUYGKNBM_cjs.FileId; }
54
54
  });
55
55
  Object.defineProperty(exports, "FileMetadata", {
56
56
  enumerable: true,
57
- get: function () { return chunk7YZHCI6R_cjs.FileMetadata; }
57
+ get: function () { return chunkRUYGKNBM_cjs.FileMetadata; }
58
58
  });
59
59
  Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
60
60
  enumerable: true,
61
- get: function () { return chunk7YZHCI6R_cjs.FileMetadata_KeyValuePair; }
61
+ get: function () { return chunkRUYGKNBM_cjs.FileMetadata_KeyValuePair; }
62
62
  });
63
63
  Object.defineProperty(exports, "FileStorage", {
64
64
  enumerable: true,
65
- get: function () { return chunk7YZHCI6R_cjs.FileStorage; }
65
+ get: function () { return chunkRUYGKNBM_cjs.FileStorage; }
66
66
  });
67
67
  Object.defineProperty(exports, "FileSystem", {
68
68
  enumerable: true,
69
- get: function () { return chunk7YZHCI6R_cjs.FileSystem; }
69
+ get: function () { return chunkRUYGKNBM_cjs.FileSystem; }
70
70
  });
71
71
  Object.defineProperty(exports, "PowerlinesAPI", {
72
72
  enumerable: true,
73
- get: function () { return chunk7YZHCI6R_cjs.PowerlinesAPI; }
73
+ get: function () { return chunkRUYGKNBM_cjs.PowerlinesAPI; }
74
74
  });
75
75
  Object.defineProperty(exports, "_capnpFileId", {
76
76
  enumerable: true,
77
- get: function () { return chunk7YZHCI6R_cjs._capnpFileId; }
77
+ get: function () { return chunkRUYGKNBM_cjs._capnpFileId; }
78
78
  });
79
79
  Object.defineProperty(exports, "KNOWN_PLUGIN_FIELDS", {
80
80
  enumerable: true,
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ import './chunk-OYASPHNL.js';
9
9
  import './chunk-OD4BINRW.js';
10
10
  export { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from './chunk-KXRVVFNK.js';
11
11
  export { HOOKS_LIST_ORDERS } from './chunk-CCJQBJKQ.js';
12
- import { PowerlinesAPI } from './chunk-RHUW2TOW.js';
13
- export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-RHUW2TOW.js';
12
+ import { PowerlinesAPI } from './chunk-2KFVP7PK.js';
13
+ export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-2KFVP7PK.js';
14
14
  export { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS } from './chunk-PQXP7XQK.js';
15
15
  export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
16
16
  export { SUPPORTED_COMMANDS } from './chunk-2MYPFASJ.js';