powerlines 0.42.32 → 0.42.34

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 (122) hide show
  1. package/dist/api-0aKfs398.mjs +1010 -0
  2. package/dist/api-0aKfs398.mjs.map +1 -0
  3. package/dist/api-7bOKZ8DC.cjs +1030 -0
  4. package/dist/{api-context-k3dnn5KR.cjs → api-context-4t-rlsAr.cjs} +64 -442
  5. package/dist/{api-context-BQi9M07D.mjs → api-context-CmuOyg7q.mjs} +62 -432
  6. package/dist/api-context-CmuOyg7q.mjs.map +1 -0
  7. package/dist/astro.mjs.map +1 -1
  8. package/dist/{chunk-7azAqIA9.cjs → chunk-AIJqnxB6.cjs} +0 -7
  9. package/dist/{chunk-WJdhOJK3.mjs → chunk-CtajNgzt.mjs} +1 -10
  10. package/dist/config.cjs +1 -1
  11. package/dist/config.mjs +1 -1
  12. package/dist/constants.cjs +1 -1
  13. package/dist/constants.mjs +1 -1
  14. package/dist/context/index.cjs +1 -1
  15. package/dist/context/index.d.cts +11 -260
  16. package/dist/context/index.d.cts.map +1 -1
  17. package/dist/context/index.d.mts +12 -261
  18. package/dist/context/index.d.mts.map +1 -1
  19. package/dist/context/index.mjs +1 -1
  20. package/dist/esbuild.cjs +9 -4
  21. package/dist/esbuild.d.cts +2 -2
  22. package/dist/esbuild.d.cts.map +1 -1
  23. package/dist/esbuild.d.mts +2 -2
  24. package/dist/esbuild.d.mts.map +1 -1
  25. package/dist/esbuild.mjs +2 -2
  26. package/dist/esbuild.mjs.map +1 -1
  27. package/dist/farm.cjs +1 -1
  28. package/dist/index.cjs +3 -3
  29. package/dist/index.d.cts +1 -1
  30. package/dist/index.d.mts +2 -2
  31. package/dist/index.mjs +2 -2
  32. package/dist/next.mjs.map +1 -1
  33. package/dist/nuxt.cjs +2 -2
  34. package/dist/nuxt.d.mts +1 -1
  35. package/dist/nuxt.mjs +1 -1
  36. package/dist/nuxt.mjs.map +1 -1
  37. package/dist/plugin-utils.cjs +1 -1
  38. package/dist/plugin-utils.mjs +1 -1
  39. package/dist/rolldown.cjs +7 -2
  40. package/dist/rolldown.d.cts +2 -2
  41. package/dist/rolldown.d.cts.map +1 -1
  42. package/dist/rolldown.d.mts +2 -2
  43. package/dist/rolldown.d.mts.map +1 -1
  44. package/dist/rolldown.mjs +2 -2
  45. package/dist/rolldown.mjs.map +1 -1
  46. package/dist/rollup.cjs +7 -2
  47. package/dist/rollup.d.cts +2 -2
  48. package/dist/rollup.d.cts.map +1 -1
  49. package/dist/rollup.d.mts +2 -2
  50. package/dist/rollup.d.mts.map +1 -1
  51. package/dist/rollup.mjs +2 -2
  52. package/dist/rollup.mjs.map +1 -1
  53. package/dist/rspack.cjs +7 -2
  54. package/dist/rspack.d.cts +2 -2
  55. package/dist/rspack.d.cts.map +1 -1
  56. package/dist/rspack.d.mts +2 -2
  57. package/dist/rspack.d.mts.map +1 -1
  58. package/dist/rspack.mjs +2 -2
  59. package/dist/rspack.mjs.map +1 -1
  60. package/dist/storage/index.cjs +1 -1
  61. package/dist/storage/index.d.cts +1 -1
  62. package/dist/storage/index.d.mts +2 -2
  63. package/dist/storage/index.mjs +1 -1
  64. package/dist/ts-morph-B85ZbV1Q.mjs +102 -0
  65. package/dist/ts-morph-B85ZbV1Q.mjs.map +1 -0
  66. package/dist/ts-morph-Cf4wz3E0.cjs +114 -0
  67. package/dist/{tsconfig-BhVGZ2DK.cjs → tsconfig-ChmbpAO7.cjs} +2 -2
  68. package/dist/{tsconfig-CzYPBpDS.mjs → tsconfig-DoV1dUYg.mjs} +2 -2
  69. package/dist/{tsconfig-CzYPBpDS.mjs.map → tsconfig-DoV1dUYg.mjs.map} +1 -1
  70. package/dist/tsdown.cjs +8 -3
  71. package/dist/tsdown.d.cts +2 -2
  72. package/dist/tsdown.d.cts.map +1 -1
  73. package/dist/tsdown.d.mts +2 -2
  74. package/dist/tsdown.d.mts.map +1 -1
  75. package/dist/tsdown.mjs +3 -3
  76. package/dist/tsdown.mjs.map +1 -1
  77. package/dist/tsup.cjs +8 -3
  78. package/dist/tsup.d.cts +3 -547
  79. package/dist/tsup.d.cts.map +1 -1
  80. package/dist/tsup.d.mts +3 -547
  81. package/dist/tsup.d.mts.map +1 -1
  82. package/dist/tsup.mjs +3 -3
  83. package/dist/tsup.mjs.map +1 -1
  84. package/dist/{types-hdziyQIH.d.mts → types-9O-s0Fpu.d.mts} +1 -1
  85. package/dist/types-9O-s0Fpu.d.mts.map +1 -0
  86. package/dist/typescript/index.cjs +4 -104
  87. package/dist/typescript/index.d.cts +1 -6
  88. package/dist/typescript/index.d.cts.map +1 -1
  89. package/dist/typescript/index.d.mts +2 -7
  90. package/dist/typescript/index.d.mts.map +1 -1
  91. package/dist/typescript/index.mjs +3 -102
  92. package/dist/unloader.cjs +1 -1
  93. package/dist/unplugin.cjs +2 -2
  94. package/dist/unplugin.mjs +1 -1
  95. package/dist/utils.cjs +1 -1
  96. package/dist/utils.mjs +1 -1
  97. package/dist/{virtual-BHb4iMd_.cjs → virtual-BNy8T32w.cjs} +3 -3
  98. package/dist/{virtual-OEHgBu0s.mjs → virtual-PaZGNIrj.mjs} +3 -3
  99. package/dist/{virtual-OEHgBu0s.mjs.map → virtual-PaZGNIrj.mjs.map} +1 -1
  100. package/dist/vite.cjs +7 -2
  101. package/dist/vite.d.cts +2 -2
  102. package/dist/vite.d.mts +2 -2
  103. package/dist/vite.mjs +2 -2
  104. package/dist/vite.mjs.map +1 -1
  105. package/dist/webpack.cjs +7 -2
  106. package/dist/webpack.d.cts +2 -2
  107. package/dist/webpack.d.cts.map +1 -1
  108. package/dist/webpack.d.mts +2 -2
  109. package/dist/webpack.d.mts.map +1 -1
  110. package/dist/webpack.mjs +2 -2
  111. package/dist/webpack.mjs.map +1 -1
  112. package/package.json +14 -13
  113. package/dist/api-D6i8MmbC.mjs +0 -6063
  114. package/dist/api-D6i8MmbC.mjs.map +0 -1
  115. package/dist/api-DZoRNTY7.cjs +0 -6083
  116. package/dist/api-context-BQi9M07D.mjs.map +0 -1
  117. package/dist/base-Bl_AMAlI.d.cts +0 -12
  118. package/dist/base-Bl_AMAlI.d.cts.map +0 -1
  119. package/dist/base-hjCHfNY6.d.mts +0 -12
  120. package/dist/base-hjCHfNY6.d.mts.map +0 -1
  121. package/dist/types-hdziyQIH.d.mts.map +0 -1
  122. package/dist/typescript/index.mjs.map +0 -1
package/dist/rolldown.mjs CHANGED
@@ -2,7 +2,7 @@ import { createUnpluginFactory } from "./unplugin.mjs";
2
2
  import { defu } from "defu";
3
3
  import { createRolldownPlugin } from "unplugin";
4
4
  import { resolveOptions } from "@powerlines/plugin-rolldown/helpers/resolve-options";
5
- import plugin from "@powerlines/plugin-rolldown";
5
+ import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
6
6
 
7
7
  //#region src/rolldown.ts
8
8
  /**
@@ -31,5 +31,5 @@ const unplugin = createRolldownPlugin(createUnpluginFactory("rolldown", (api, pl
31
31
  }));
32
32
 
33
33
  //#endregion
34
- export { plugin, unplugin as rolldown, unplugin };
34
+ export { plugin, rolldown, unplugin };
35
35
  //# sourceMappingURL=rolldown.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginUserConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin } from \"@powerlines/plugin-rolldown\";\n\n/**\n * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRolldownPlugin<Partial<RolldownPluginUserConfig>>(\n createUnpluginFactory<RolldownPluginContext>(\"rolldown\", (api, plugin) => {\n return {\n ...plugin,\n rolldown: {\n async options(options: InputOptions) {\n const merged = defu(await api.context.getEnvironment(), this);\n\n return defu(\n resolveOptions(merged),\n options,\n api.callHook(\n \"rolldown:options\",\n { environment: merged },\n options\n ) ?? {}\n );\n }\n }\n };\n })\n);\n\nexport { unplugin as rolldown };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAa,WAAW,qBACtB,sBAA6C,aAAa,KAAK,WAAW;AACxE,QAAO;EACL,GAAG;EACH,UAAU,EACR,MAAM,QAAQ,SAAuB;GACnC,MAAM,SAAS,KAAK,MAAM,IAAI,QAAQ,gBAAgB,EAAE,KAAK;AAE7D,UAAO,KACL,eAAe,OAAO,EACtB,SACA,IAAI,SACF,oBACA,EAAE,aAAa,QAAQ,EACvB,QACD,IAAI,EAAE,CACR;KAEJ;EACF;EACD,CACH"}
1
+ {"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginUserConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rolldown\n} from \"@powerlines/plugin-rolldown\";\n\n/**\n * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRolldownPlugin<Partial<RolldownPluginUserConfig>>(\n createUnpluginFactory<RolldownPluginContext>(\"rolldown\", (api, plugin) => {\n return {\n ...plugin,\n rolldown: {\n async options(options: InputOptions) {\n const merged = defu(await api.context.getEnvironment(), this);\n\n return defu(\n resolveOptions(merged),\n options,\n api.callHook(\n \"rolldown:options\",\n { environment: merged },\n options\n ) ?? {}\n );\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,qBACtB,sBAA6C,aAAa,KAAK,WAAW;AACxE,QAAO;EACL,GAAG;EACH,UAAU,EACR,MAAM,QAAQ,SAAuB;GACnC,MAAM,SAAS,KAAK,MAAM,IAAI,QAAQ,gBAAgB,EAAE,KAAK;AAE7D,UAAO,KACL,eAAe,OAAO,EACtB,SACA,IAAI,SACF,oBACA,EAAE,aAAa,QAAQ,EACvB,QACD,IAAI,EAAE,CACR;KAEJ;EACF;EACD,CACH"}
package/dist/rollup.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-7azAqIA9.cjs');
2
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
3
  const require_unplugin = require('./unplugin.cjs');
4
4
  let unplugin = require("unplugin");
5
5
  let _powerlines_plugin_rollup = require("@powerlines/plugin-rollup");
@@ -31,5 +31,10 @@ Object.defineProperty(exports, 'plugin', {
31
31
  return _powerlines_plugin_rollup.default;
32
32
  }
33
33
  });
34
- exports.rollup = unplugin$1;
34
+ Object.defineProperty(exports, 'rollup', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return _powerlines_plugin_rollup.default;
38
+ }
39
+ });
35
40
  exports.unplugin = unplugin$1;
package/dist/rollup.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _$rollup from "rollup";
2
2
  import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
3
- import plugin from "@powerlines/plugin-rollup";
3
+ import plugin, { default as rollup } from "@powerlines/plugin-rollup";
4
4
 
5
5
  //#region src/rollup.d.ts
6
6
  /**
@@ -21,5 +21,5 @@ import plugin from "@powerlines/plugin-rollup";
21
21
  */
22
22
  declare const unplugin: (options: Partial<RollupPluginUserConfig>) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
23
23
  //#endregion
24
- export { plugin, unplugin as rollup, unplugin };
24
+ export { plugin, rollup, unplugin };
25
25
  //# sourceMappingURL=rollup.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.d.cts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"rollup.d.cts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
package/dist/rollup.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import plugin from "@powerlines/plugin-rollup";
1
+ import plugin, { default as rollup } from "@powerlines/plugin-rollup";
2
2
  import * as _$rollup from "rollup";
3
3
  import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
4
4
 
@@ -21,5 +21,5 @@ import { RollupPluginUserConfig } from "@powerlines/plugin-rollup/types/plugin";
21
21
  */
22
22
  declare const unplugin: (options: Partial<RollupPluginUserConfig>) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
23
23
  //#endregion
24
- export { plugin, unplugin as rollup, unplugin };
24
+ export { plugin, rollup, unplugin };
25
25
  //# sourceMappingURL=rollup.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.d.mts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"rollup.d.mts","names":[],"sources":["../src/rollup.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,QAAA,CAAA,MAAA,QAAA,QAAA,CAAA,MAAA"}
package/dist/rollup.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createUnpluginFactory } from "./unplugin.mjs";
2
2
  import { createRollupPlugin } from "unplugin";
3
- import plugin from "@powerlines/plugin-rollup";
3
+ import plugin, { default as rollup } from "@powerlines/plugin-rollup";
4
4
 
5
5
  //#region src/rollup.ts
6
6
  /**
@@ -22,5 +22,5 @@ import plugin from "@powerlines/plugin-rollup";
22
22
  const unplugin = createRollupPlugin(createUnpluginFactory("rollup"));
23
23
 
24
24
  //#endregion
25
- export { plugin, unplugin as rollup, unplugin };
25
+ export { plugin, rollup, unplugin };
26
26
  //# sourceMappingURL=rollup.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.mjs","names":[],"sources":["../src/rollup.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { RollupPluginUserConfig } from \"@powerlines/plugin-rollup/types/plugin\";\nimport { createRollupPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin } from \"@powerlines/plugin-rollup\";\n\n/**\n * A Rollup plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n *\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRollupPlugin<Partial<RollupPluginUserConfig>>(\n createUnpluginFactory(\"rollup\")\n);\n\nexport { unplugin as rollup };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
1
+ {"version":3,"file":"rollup.mjs","names":[],"sources":["../src/rollup.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { RollupPluginUserConfig } from \"@powerlines/plugin-rollup/types/plugin\";\nimport { createRollupPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rollup\n} from \"@powerlines/plugin-rollup\";\n\n/**\n * A Rollup plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n *\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRollupPlugin<Partial<RollupPluginUserConfig>>(\n createUnpluginFactory(\"rollup\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
package/dist/rspack.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-7azAqIA9.cjs');
2
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
3
  const require_unplugin = require('./unplugin.cjs');
4
4
  let unplugin = require("unplugin");
5
5
  let _powerlines_plugin_rspack = require("@powerlines/plugin-rspack");
@@ -31,5 +31,10 @@ Object.defineProperty(exports, 'plugin', {
31
31
  return _powerlines_plugin_rspack.default;
32
32
  }
33
33
  });
34
- exports.rspack = unplugin$1;
34
+ Object.defineProperty(exports, 'rspack', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return _powerlines_plugin_rspack.default;
38
+ }
39
+ });
35
40
  exports.unplugin = unplugin$1;
package/dist/rspack.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _$unplugin from "unplugin";
2
2
  import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
3
- import plugin from "@powerlines/plugin-rspack";
3
+ import plugin, { default as rspack } from "@powerlines/plugin-rspack";
4
4
 
5
5
  //#region src/rspack.d.ts
6
6
  /**
@@ -21,5 +21,5 @@ import plugin from "@powerlines/plugin-rspack";
21
21
  */
22
22
  declare const unplugin: (options: Partial<RspackPluginUserConfig>) => _$unplugin.RspackPluginInstance;
23
23
  //#endregion
24
- export { plugin, unplugin as rspack, unplugin };
24
+ export { plugin, rspack, unplugin };
25
25
  //# sourceMappingURL=rspack.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.d.cts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
1
+ {"version":3,"file":"rspack.d.cts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
package/dist/rspack.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _$unplugin from "unplugin";
2
- import plugin from "@powerlines/plugin-rspack";
2
+ import plugin, { default as rspack } from "@powerlines/plugin-rspack";
3
3
  import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
4
4
 
5
5
  //#region src/rspack.d.ts
@@ -21,5 +21,5 @@ import { RspackPluginUserConfig } from "@powerlines/plugin-rspack/types/plugin";
21
21
  */
22
22
  declare const unplugin: (options: Partial<RspackPluginUserConfig>) => _$unplugin.RspackPluginInstance;
23
23
  //#endregion
24
- export { plugin, unplugin as rspack, unplugin };
24
+ export { plugin, rspack, unplugin };
25
25
  //# sourceMappingURL=rspack.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.d.mts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AAwCA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
1
+ {"version":3,"file":"rspack.d.mts","names":[],"sources":["../src/rspack.ts"],"mappings":";;;;;;;;AA2CA;;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,sBAAA,MAAA,UAAA,CAAA,oBAAA"}
package/dist/rspack.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createUnpluginFactory } from "./unplugin.mjs";
2
2
  import { createRspackPlugin } from "unplugin";
3
- import plugin from "@powerlines/plugin-rspack";
3
+ import plugin, { default as rspack } from "@powerlines/plugin-rspack";
4
4
 
5
5
  //#region src/rspack.ts
6
6
  /**
@@ -22,5 +22,5 @@ import plugin from "@powerlines/plugin-rspack";
22
22
  const unplugin = createRspackPlugin(createUnpluginFactory("rspack"));
23
23
 
24
24
  //#endregion
25
- export { plugin, unplugin as rspack, unplugin };
25
+ export { plugin, rspack, unplugin };
26
26
  //# sourceMappingURL=rspack.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.mjs","names":[],"sources":["../src/rspack.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { RspackPluginUserConfig } from \"@powerlines/plugin-rspack/types/plugin\";\nimport { createRspackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin } from \"@powerlines/plugin-rspack\";\n\n/**\n * An Rspack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rspack.dev/concepts/plugins\n *\n * @example\n * ```ts\n * // rspack.config.ts\n *\n * import powerlines from \"powerlines/rspack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createRspackPlugin<Partial<RspackPluginUserConfig>>(\n createUnpluginFactory(\"rspack\")\n);\n\nexport { unplugin as rspack };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
1
+ {"version":3,"file":"rspack.mjs","names":[],"sources":["../src/rspack.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { RspackPluginUserConfig } from \"@powerlines/plugin-rspack/types/plugin\";\nimport { createRspackPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rspack\n} from \"@powerlines/plugin-rspack\";\n\n/**\n * An Rspack plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rspack.dev/concepts/plugins\n *\n * @example\n * ```ts\n * // rspack.config.ts\n *\n * import powerlines from \"powerlines/rspack\";\n *\n * export default {\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * }\n * ```\n */\nexport const unplugin = createRspackPlugin<Partial<RspackPluginUserConfig>>(\n createUnpluginFactory(\"rspack\")\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,WAAW,mBACtB,sBAAsB,SAAS,CAChC"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_virtual = require('../virtual-BHb4iMd_.cjs');
2
+ const require_virtual = require('../virtual-BNy8T32w.cjs');
3
3
 
4
4
  exports.BaseStorageAdapter = require_virtual.BaseStorageAdapter;
5
5
  exports.FileSystemStorageAdapter = require_virtual.FileSystemStorageAdapter;
@@ -1,5 +1,5 @@
1
1
  import { t as types_d_exports } from "../types-DerAvFjs.cjs";
2
- import { t as MaybePromise } from "../base-Bl_AMAlI.cjs";
2
+ import { MaybePromise } from "@stryke/types/base";
3
3
  import { writeFile, writeFileSync } from "@stryke/fs/write-file";
4
4
 
5
5
  //#region src/storage/base.d.ts
@@ -1,6 +1,6 @@
1
- import { t as types_d_exports } from "../types-hdziyQIH.mjs";
2
- import { t as MaybePromise } from "../base-hjCHfNY6.mjs";
1
+ import { t as types_d_exports } from "../types-9O-s0Fpu.mjs";
3
2
  import { writeFile, writeFileSync } from "@stryke/fs/write-file";
3
+ import { MaybePromise } from "@stryke/types/base";
4
4
 
5
5
  //#region src/storage/base.d.ts
6
6
  interface StorageAdapterOptions {
@@ -1,3 +1,3 @@
1
- import { a as isFileError, i as ignoreNotfound, n as FileSystemStorageAdapter, o as BaseStorageAdapter, r as ignoreExists, t as VirtualStorageAdapter } from "../virtual-OEHgBu0s.mjs";
1
+ import { a as isFileError, i as ignoreNotfound, n as FileSystemStorageAdapter, o as BaseStorageAdapter, r as ignoreExists, t as VirtualStorageAdapter } from "../virtual-PaZGNIrj.mjs";
2
2
 
3
3
  export { BaseStorageAdapter, FileSystemStorageAdapter, VirtualStorageAdapter, ignoreExists, ignoreNotfound, isFileError };
@@ -0,0 +1,102 @@
1
+ import defu$1 from "defu";
2
+ import { InMemoryFileSystemHost, Project } from "ts-morph";
3
+
4
+ //#region src/typescript/ts-morph.ts
5
+ var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
6
+ #context;
7
+ constructor(context) {
8
+ super();
9
+ this.#context = context;
10
+ }
11
+ deleteSync(path) {
12
+ this.#context.fs.removeSync(path);
13
+ }
14
+ readDirSync(dirPath) {
15
+ if (!this.#context.fs.isDirectorySync(dirPath)) return [];
16
+ return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {
17
+ const fullPath = this.#context.fs.resolveSync(entry);
18
+ if (fullPath) ret.push({
19
+ name: entry,
20
+ isDirectory: this.#context.fs.isDirectorySync(fullPath),
21
+ isFile: this.#context.fs.isFileSync(fullPath),
22
+ isSymlink: false
23
+ });
24
+ return ret;
25
+ }, []);
26
+ }
27
+ async readFile(filePath) {
28
+ if (!this.#context.fs.isFileSync(filePath)) return "";
29
+ return await this.#context.fs.read(filePath);
30
+ }
31
+ readFileSync(filePath) {
32
+ if (!this.#context.fs.isFileSync(filePath)) return "";
33
+ return this.#context.fs.readSync(filePath);
34
+ }
35
+ async writeFile(filePath, fileText) {
36
+ return this.#context.fs.write(filePath, fileText);
37
+ }
38
+ writeFileSync(filePath, fileText) {
39
+ this.#context.fs.writeSync(filePath, fileText);
40
+ }
41
+ async mkdir(dirPath) {
42
+ await this.#context.fs.mkdir(dirPath);
43
+ }
44
+ mkdirSync(dirPath) {
45
+ this.#context.fs.mkdirSync(dirPath);
46
+ }
47
+ async move(srcPath, destPath) {
48
+ await this.#context.fs.move(srcPath, destPath);
49
+ }
50
+ moveSync(srcPath, destPath) {
51
+ this.#context.fs.moveSync(srcPath, destPath);
52
+ }
53
+ async copy(srcPath, destPath) {
54
+ await this.#context.fs.copy(srcPath, destPath);
55
+ }
56
+ copySync(srcPath, destPath) {
57
+ this.#context.fs.copySync(srcPath, destPath);
58
+ }
59
+ async fileExists(filePath) {
60
+ return this.#context.fs.isFile(filePath);
61
+ }
62
+ fileExistsSync(filePath) {
63
+ return this.#context.fs.isFileSync(filePath);
64
+ }
65
+ async directoryExists(dirPath) {
66
+ return this.#context.fs.isDirectory(dirPath);
67
+ }
68
+ directoryExistsSync(dirPath) {
69
+ return this.#context.fs.isDirectorySync(dirPath);
70
+ }
71
+ realpathSync(path) {
72
+ return this.#context.fs.resolveSync(path) || path;
73
+ }
74
+ getCurrentDirectory() {
75
+ return this.#context.workspaceConfig.workspaceRoot;
76
+ }
77
+ async glob(patterns) {
78
+ return this.#context.fs.glob(patterns);
79
+ }
80
+ globSync(patterns) {
81
+ return this.#context.fs.globSync(patterns);
82
+ }
83
+ };
84
+ /**
85
+ * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing
86
+ *
87
+ * @param context - The Powerlines context
88
+ * @returns A ts-morph {@link Project} instance
89
+ */
90
+ function createProgram(context, override) {
91
+ context.debug(`Creating ts-morph Project instance with configuration from: ${context.tsconfig.tsconfigFilePath}.`);
92
+ return new Project(defu$1(override ?? {}, {
93
+ skipAddingFilesFromTsConfig: false,
94
+ tsConfigFilePath: context.tsconfig.tsconfigFilePath,
95
+ fileSystem: new VirtualFileSystemHost(context),
96
+ compilerOptions: defu$1(context.tsconfig.options ?? {}, { lib: ["lib.esnext.full.d.ts"] })
97
+ }));
98
+ }
99
+
100
+ //#endregion
101
+ export { createProgram as n, VirtualFileSystemHost as t };
102
+ //# sourceMappingURL=ts-morph-B85ZbV1Q.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-morph-B85ZbV1Q.mjs","names":["#context","defu"],"sources":["../src/typescript/ts-morph.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Context } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport {\n CompilerOptions,\n FileSystemHost,\n InMemoryFileSystemHost,\n Project,\n ProjectOptions,\n RuntimeDirEntry\n} from \"ts-morph\";\n\nexport class VirtualFileSystemHost\n extends InMemoryFileSystemHost\n implements FileSystemHost\n{\n #context: Context;\n\n public constructor(context: Context) {\n super();\n\n this.#context = context;\n }\n\n public override deleteSync(path: string) {\n this.#context.fs.removeSync(path);\n }\n\n public override readDirSync(dirPath: string): RuntimeDirEntry[] {\n if (!this.#context.fs.isDirectorySync(dirPath)) {\n return [];\n }\n\n return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {\n const fullPath = this.#context.fs.resolveSync(entry);\n if (fullPath) {\n ret.push({\n name: entry,\n isDirectory: this.#context.fs.isDirectorySync(fullPath),\n isFile: this.#context.fs.isFileSync(fullPath),\n isSymlink: false\n });\n }\n\n return ret;\n }, [] as RuntimeDirEntry[]);\n }\n\n public override async readFile(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return (await this.#context.fs.read(filePath))!;\n }\n\n public override readFileSync(filePath: string) {\n if (!this.#context.fs.isFileSync(filePath)) {\n return \"\";\n }\n\n return this.#context.fs.readSync(filePath)!;\n }\n\n public override async writeFile(filePath: string, fileText: string) {\n return this.#context.fs.write(filePath, fileText);\n }\n\n public override writeFileSync(filePath: string, fileText: string) {\n this.#context.fs.writeSync(filePath, fileText);\n }\n\n public override async mkdir(dirPath: string) {\n await this.#context.fs.mkdir(dirPath);\n }\n\n public override mkdirSync(dirPath: string) {\n this.#context.fs.mkdirSync(dirPath);\n }\n\n public override async move(srcPath: string, destPath: string) {\n await this.#context.fs.move(srcPath, destPath);\n }\n\n public override moveSync(srcPath: string, destPath: string) {\n this.#context.fs.moveSync(srcPath, destPath);\n }\n\n public override async copy(srcPath: string, destPath: string) {\n await this.#context.fs.copy(srcPath, destPath);\n }\n\n public override copySync(srcPath: string, destPath: string) {\n this.#context.fs.copySync(srcPath, destPath);\n }\n\n public override async fileExists(filePath: string) {\n return this.#context.fs.isFile(filePath);\n }\n\n public override fileExistsSync(filePath: string) {\n return this.#context.fs.isFileSync(filePath);\n }\n\n public override async directoryExists(dirPath: string) {\n return this.#context.fs.isDirectory(dirPath);\n }\n\n public override directoryExistsSync(dirPath: string): boolean {\n return this.#context.fs.isDirectorySync(dirPath);\n }\n\n public override realpathSync(path: string) {\n return this.#context.fs.resolveSync(path) || path;\n }\n\n public override getCurrentDirectory() {\n return this.#context.workspaceConfig.workspaceRoot;\n }\n\n public override async glob(\n patterns: ReadonlyArray<string>\n ): Promise<string[]> {\n return this.#context.fs.glob(patterns as string[]);\n }\n\n public override globSync(patterns: ReadonlyArray<string>): string[] {\n return this.#context.fs.globSync(patterns as string[]);\n }\n}\n\n/**\n * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing\n *\n * @param context - The Powerlines context\n * @returns A ts-morph {@link Project} instance\n */\nexport function createProgram(\n context: Context,\n override: Partial<ProjectOptions>\n): Project {\n context.debug(\n `Creating ts-morph Project instance with configuration from: ${\n context.tsconfig.tsconfigFilePath\n }.`\n );\n\n const project = new Project(\n defu(override ?? {}, {\n skipAddingFilesFromTsConfig: false,\n tsConfigFilePath: context.tsconfig.tsconfigFilePath,\n fileSystem: new VirtualFileSystemHost(context),\n compilerOptions: defu(context.tsconfig.options ?? {}, {\n lib: [\"lib.esnext.full.d.ts\"]\n }) as CompilerOptions\n })\n );\n\n return project;\n}\n"],"mappings":";;;;AA6BA,IAAa,wBAAb,cACU,uBAEV;CACE;CAEA,AAAO,YAAY,SAAkB;AACnC,SAAO;AAEP,QAAKA,UAAW;;CAGlB,AAAgB,WAAW,MAAc;AACvC,QAAKA,QAAS,GAAG,WAAW,KAAK;;CAGnC,AAAgB,YAAY,SAAoC;AAC9D,MAAI,CAAC,MAAKA,QAAS,GAAG,gBAAgB,QAAQ,CAC5C,QAAO,EAAE;AAGX,SAAO,MAAKA,QAAS,GAAG,SAAS,QAAQ,CAAC,QAAQ,KAAK,UAAU;GAC/D,MAAM,WAAW,MAAKA,QAAS,GAAG,YAAY,MAAM;AACpD,OA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W,SAAS;;CAG9C,MAAsB,gBAAgB,SAAiB;AACrD,SAAO,MAAKA,QAAS,GAAG,YAAY,QAAQ;;CAG9C,AAAgB,oBAAoB,SAA0B;AAC5D,SAAO,MAAKA,QAAS,GAAG,gBAAgB,QAAQ;;CAGlD,AAAgB,aAAa,MAAc;AACzC,SAAO,MAAKA,QAAS,GAAG,YAAY,KAAK,IAAI;;CAG/C,AAAgB,sBAAsB;AACpC,SAAO,MAAKA,QAAS,gBAAgB;;CAGvC,MAAsB,KACpB,UACmB;AACnB,SAAO,MAAKA,QAAS,GAAG,KAAK,SAAqB;;CAGpD,AAAgB,SAAS,UAA2C;AAClE,SAAO,MAAKA,QAAS,GAAG,SAAS,SAAqB;;;;;;;;;AAU1D,SAAgB,cACd,SACA,UACS;AACT,SAAQ,MACN,+DACE,QAAQ,SAAS,iBAClB,GACF;AAaD,QAXgB,IAAI,QAClBC,OAAK,YAAY,EAAE,EAAE;EACnB,6BAA6B;EAC7B,kBAAkB,QAAQ,SAAS;EACnC,YAAY,IAAI,sBAAsB,QAAQ;EAC9C,iBAAiBA,OAAK,QAAQ,SAAS,WAAW,EAAE,EAAE,EACpD,KAAK,CAAC,uBAAuB,EAC9B,CAAC;EACH,CAAC,CACH"}
@@ -0,0 +1,114 @@
1
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ let defu = require("defu");
3
+ defu = require_chunk.__toESM(defu);
4
+ let ts_morph = require("ts-morph");
5
+
6
+ //#region src/typescript/ts-morph.ts
7
+ var VirtualFileSystemHost = class extends ts_morph.InMemoryFileSystemHost {
8
+ #context;
9
+ constructor(context) {
10
+ super();
11
+ this.#context = context;
12
+ }
13
+ deleteSync(path) {
14
+ this.#context.fs.removeSync(path);
15
+ }
16
+ readDirSync(dirPath) {
17
+ if (!this.#context.fs.isDirectorySync(dirPath)) return [];
18
+ return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {
19
+ const fullPath = this.#context.fs.resolveSync(entry);
20
+ if (fullPath) ret.push({
21
+ name: entry,
22
+ isDirectory: this.#context.fs.isDirectorySync(fullPath),
23
+ isFile: this.#context.fs.isFileSync(fullPath),
24
+ isSymlink: false
25
+ });
26
+ return ret;
27
+ }, []);
28
+ }
29
+ async readFile(filePath) {
30
+ if (!this.#context.fs.isFileSync(filePath)) return "";
31
+ return await this.#context.fs.read(filePath);
32
+ }
33
+ readFileSync(filePath) {
34
+ if (!this.#context.fs.isFileSync(filePath)) return "";
35
+ return this.#context.fs.readSync(filePath);
36
+ }
37
+ async writeFile(filePath, fileText) {
38
+ return this.#context.fs.write(filePath, fileText);
39
+ }
40
+ writeFileSync(filePath, fileText) {
41
+ this.#context.fs.writeSync(filePath, fileText);
42
+ }
43
+ async mkdir(dirPath) {
44
+ await this.#context.fs.mkdir(dirPath);
45
+ }
46
+ mkdirSync(dirPath) {
47
+ this.#context.fs.mkdirSync(dirPath);
48
+ }
49
+ async move(srcPath, destPath) {
50
+ await this.#context.fs.move(srcPath, destPath);
51
+ }
52
+ moveSync(srcPath, destPath) {
53
+ this.#context.fs.moveSync(srcPath, destPath);
54
+ }
55
+ async copy(srcPath, destPath) {
56
+ await this.#context.fs.copy(srcPath, destPath);
57
+ }
58
+ copySync(srcPath, destPath) {
59
+ this.#context.fs.copySync(srcPath, destPath);
60
+ }
61
+ async fileExists(filePath) {
62
+ return this.#context.fs.isFile(filePath);
63
+ }
64
+ fileExistsSync(filePath) {
65
+ return this.#context.fs.isFileSync(filePath);
66
+ }
67
+ async directoryExists(dirPath) {
68
+ return this.#context.fs.isDirectory(dirPath);
69
+ }
70
+ directoryExistsSync(dirPath) {
71
+ return this.#context.fs.isDirectorySync(dirPath);
72
+ }
73
+ realpathSync(path) {
74
+ return this.#context.fs.resolveSync(path) || path;
75
+ }
76
+ getCurrentDirectory() {
77
+ return this.#context.workspaceConfig.workspaceRoot;
78
+ }
79
+ async glob(patterns) {
80
+ return this.#context.fs.glob(patterns);
81
+ }
82
+ globSync(patterns) {
83
+ return this.#context.fs.globSync(patterns);
84
+ }
85
+ };
86
+ /**
87
+ * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing
88
+ *
89
+ * @param context - The Powerlines context
90
+ * @returns A ts-morph {@link Project} instance
91
+ */
92
+ function createProgram(context, override) {
93
+ context.debug(`Creating ts-morph Project instance with configuration from: ${context.tsconfig.tsconfigFilePath}.`);
94
+ return new ts_morph.Project((0, defu.default)(override ?? {}, {
95
+ skipAddingFilesFromTsConfig: false,
96
+ tsConfigFilePath: context.tsconfig.tsconfigFilePath,
97
+ fileSystem: new VirtualFileSystemHost(context),
98
+ compilerOptions: (0, defu.default)(context.tsconfig.options ?? {}, { lib: ["lib.esnext.full.d.ts"] })
99
+ }));
100
+ }
101
+
102
+ //#endregion
103
+ Object.defineProperty(exports, 'VirtualFileSystemHost', {
104
+ enumerable: true,
105
+ get: function () {
106
+ return VirtualFileSystemHost;
107
+ }
108
+ });
109
+ Object.defineProperty(exports, 'createProgram', {
110
+ enumerable: true,
111
+ get: function () {
112
+ return createProgram;
113
+ }
114
+ });
@@ -1,12 +1,12 @@
1
- const require_chunk = require('./chunk-7azAqIA9.cjs');
1
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
2
  let _stryke_fs_exists = require("@stryke/fs/exists");
3
3
  let _stryke_path_append = require("@stryke/path/append");
4
4
  let _stryke_path_join_paths = require("@stryke/path/join-paths");
5
5
  let defu = require("defu");
6
6
  defu = require_chunk.__toESM(defu);
7
+ let _stryke_fs_json = require("@stryke/fs/json");
7
8
  let typescript = require("typescript");
8
9
  typescript = require_chunk.__toESM(typescript);
9
- let _stryke_fs_json = require("@stryke/fs/json");
10
10
 
11
11
  //#region src/typescript/tsconfig.ts
12
12
  /**
@@ -2,8 +2,8 @@ import { existsSync } from "@stryke/fs/exists";
2
2
  import { appendPath } from "@stryke/path/append";
3
3
  import { joinPaths } from "@stryke/path/join-paths";
4
4
  import defu$1 from "defu";
5
- import ts from "typescript";
6
5
  import { readJsonFileSync } from "@stryke/fs/json";
6
+ import ts from "typescript";
7
7
 
8
8
  //#region src/typescript/tsconfig.ts
9
9
  /**
@@ -152,4 +152,4 @@ ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && err
152
152
 
153
153
  //#endregion
154
154
  export { isIncludeMatchFound as a, getTsconfigFilePath as i, findMatch as n, isMatchFound as o, getParsedTypeScriptConfig as r, tryTsconfigFilePath as s, findIncludeMatch as t };
155
- //# sourceMappingURL=tsconfig-CzYPBpDS.mjs.map
155
+ //# sourceMappingURL=tsconfig-DoV1dUYg.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig-CzYPBpDS.mjs","names":["defu"],"sources":["../src/typescript/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParsedTypeScriptConfig, TSConfig } from \"@powerlines/core\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFileSync } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n } else {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.app.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.lib.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n projectRoot\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, projectRoot);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(\n tsconfig,\n appendPath(projectRoot, workspaceRoot)\n );\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,SAAgB,oBACd,eACA,aACA,UACQ;CACR,IAAI;AACJ,KAAI,SACF,oBAAmB,oBACjB,eACA,aACA,SACD;MACI;AACL,qBAAmB,oBACjB,eACA,aACA,oBACD;AACD,MAAI,CAAC,kBAAkB;AACrB,sBAAmB,oBACjB,eACA,aACA,oBACD;AACD,OAAI,CAAC,iBACH,oBAAmB,oBACjB,eACA,aACA,gBACD;;;AAKP,KAAI,CAAC,iBACH,OAAM,IAAI,MACR,2EACE,YACD,GACF;AAGH,QAAO;;;;;;;;;;;AAYT,SAAgB,oBACd,eACA,aACA,UACoB;CACpB,IAAI,mBAAmB;AACvB,KAAI,CAAC,WAAW,iBAAiB,EAAE;AACjC,qBAAmB,WAAW,UAAU,YAAY;AACpD,MAAI,CAAC,WAAW,iBAAiB,EAAE;AACjC,sBAAmB,WACjB,UACA,WAAW,aAAa,cAAc,CACvC;AACD,OAAI,CAAC,WAAW,iBAAiB,CAC/B;;;AAKN,QAAO;;;;;;;;;AAUT,SAAgB,UACd,cACA,OACA,aAAuB;CAAC;CAAO;CAAQ;CAAQ,EACX;AACpC,QAAO,MAAM,MACX,SACE,cAAc,UAAU,CAAC,aAAa,KACpC,MAAM,UAAU,CAAC,aAAa,IAChC,cAAc,UAAU,CAAC,aAAa,KACpC,KAAK,MAAM,UAAU,CAAC,aAAa,MACrC,KAAK,cAAc,UAAU,CAAC,aAAa,OACzC,MAAM,UAAU,CAAC,aAAa,IAChC,WAAW,MACT,QACE,GAAG,cAAc,UAAU,CAAC,aAAa,GAAG,UAC1C,MAAM,UAAU,CAAC,aAAa,IAChC,GAAG,cAA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ACjC,MAAM,MAAM,YAAY,UAAU,GAE3C,CACA,KAAK,KAAK,CAAC;;AAGV,QAAM,IAAI,MAAM,aAAa;;AAG/B,QAAO;EACL,GAAG;EACH,sBAAuB,wBACrB;EACF;EACA;EACD"}
1
+ {"version":3,"file":"tsconfig-DoV1dUYg.mjs","names":["defu"],"sources":["../src/typescript/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParsedTypeScriptConfig, TSConfig } from \"@powerlines/core\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFileSync } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n } else {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.app.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.lib.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n projectRoot\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, projectRoot);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(\n tsconfig,\n appendPath(projectRoot, workspaceRoot)\n );\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFileP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
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-7azAqIA9.cjs');
2
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
3
  const require_rolldown = require('./rolldown.cjs');
4
4
  let _stryke_convert_to_array = require("@stryke/convert/to-array");
5
5
  let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
@@ -36,7 +36,7 @@ function unplugin(options = {}) {
36
36
  return {
37
37
  ...options,
38
38
  entry: options.entry,
39
- plugins: [require_rolldown.rolldown({
39
+ plugins: [require_rolldown.unplugin({
40
40
  name: options.name,
41
41
  root: options.cwd ?? process.cwd(),
42
42
  output: {
@@ -87,5 +87,10 @@ Object.defineProperty(exports, 'plugin', {
87
87
  return _powerlines_plugin_tsdown.default;
88
88
  }
89
89
  });
90
- exports.tsdown = unplugin;
90
+ Object.defineProperty(exports, 'tsdown', {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _powerlines_plugin_tsdown.default;
94
+ }
95
+ });
91
96
  exports.unplugin = unplugin;
package/dist/tsdown.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UserConfig } from "tsdown/config";
2
- import plugin from "@powerlines/plugin-tsdown";
2
+ import plugin, { default as tsdown } from "@powerlines/plugin-tsdown";
3
3
 
4
4
  //#region src/tsdown.d.ts
5
5
  /**
@@ -27,5 +27,5 @@ import plugin from "@powerlines/plugin-tsdown";
27
27
  */
28
28
  declare function unplugin(options?: UserConfig): UserConfig;
29
29
  //#endregion
30
- export { plugin, unplugin as tsdown, unplugin };
30
+ export { plugin, tsdown, unplugin };
31
31
  //# sourceMappingURL=tsdown.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.d.cts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}
1
+ {"version":3,"file":"tsdown.d.cts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAwDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}
package/dist/tsdown.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import plugin from "@powerlines/plugin-tsdown";
1
+ import plugin, { default as tsdown } from "@powerlines/plugin-tsdown";
2
2
  import { UserConfig } from "tsdown/config";
3
3
 
4
4
  //#region src/tsdown.d.ts
@@ -27,5 +27,5 @@ import { UserConfig } from "tsdown/config";
27
27
  */
28
28
  declare function unplugin(options?: UserConfig): UserConfig;
29
29
  //#endregion
30
- export { plugin, unplugin as tsdown, unplugin };
30
+ export { plugin, tsdown, unplugin };
31
31
  //# sourceMappingURL=tsdown.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.d.mts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAqDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}
1
+ {"version":3,"file":"tsdown.d.mts","names":[],"sources":["../src/tsdown.ts"],"mappings":";;;;;;AAwDA;;;;;;;;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,OAAA,GAAS,UAAA,GAAkB,UAAA"}