@powerlines/unplugin 0.0.75 → 0.0.76

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 (147) hide show
  1. package/dist/astro.cjs +11 -0
  2. package/dist/astro.mjs +6 -1
  3. package/dist/astro.mjs.map +1 -1
  4. package/dist/astro.test.cjs +23 -0
  5. package/dist/astro.test.d.cts +1 -0
  6. package/dist/astro.test.d.mts +2 -0
  7. package/dist/astro.test.mjs +25 -0
  8. package/dist/astro.test.mjs.map +1 -0
  9. package/dist/esbuild.d.cts.map +1 -1
  10. package/dist/esbuild.d.mts.map +1 -1
  11. package/dist/esbuild.test.cjs +32 -0
  12. package/dist/esbuild.test.d.cts +1 -0
  13. package/dist/esbuild.test.d.mts +2 -0
  14. package/dist/esbuild.test.mjs +34 -0
  15. package/dist/esbuild.test.mjs.map +1 -0
  16. package/dist/farm.cjs +12 -1
  17. package/dist/farm.d.cts.map +1 -1
  18. package/dist/farm.d.mts.map +1 -1
  19. package/dist/farm.mjs +6 -1
  20. package/dist/farm.mjs.map +1 -1
  21. package/dist/farm.test.cjs +23 -0
  22. package/dist/farm.test.d.cts +1 -0
  23. package/dist/farm.test.d.mts +2 -0
  24. package/dist/farm.test.mjs +25 -0
  25. package/dist/farm.test.mjs.map +1 -0
  26. package/dist/index.cjs +2 -1
  27. package/dist/index.mjs +2 -1
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/index.test.cjs +35 -0
  30. package/dist/index.test.d.cts +1 -0
  31. package/dist/index.test.d.mts +2 -0
  32. package/dist/index.test.mjs +37 -0
  33. package/dist/index.test.mjs.map +1 -0
  34. package/dist/next.cjs +12 -1
  35. package/dist/next.mjs +6 -1
  36. package/dist/next.mjs.map +1 -1
  37. package/dist/next.test.cjs +23 -0
  38. package/dist/next.test.d.cts +1 -0
  39. package/dist/next.test.d.mts +2 -0
  40. package/dist/next.test.mjs +25 -0
  41. package/dist/next.test.mjs.map +1 -0
  42. package/dist/nuxt.cjs +10 -1
  43. package/dist/nuxt.mjs +3 -1
  44. package/dist/nuxt.mjs.map +1 -1
  45. package/dist/nuxt.test.cjs +23 -0
  46. package/dist/nuxt.test.d.cts +1 -0
  47. package/dist/nuxt.test.d.mts +2 -0
  48. package/dist/nuxt.test.mjs +25 -0
  49. package/dist/nuxt.test.mjs.map +1 -0
  50. package/dist/package.cjs +1 -1
  51. package/dist/package.mjs +1 -1
  52. package/dist/rolldown.cjs +13 -1
  53. package/dist/rolldown.d.cts.map +1 -1
  54. package/dist/rolldown.d.mts.map +1 -1
  55. package/dist/rolldown.mjs +8 -1
  56. package/dist/rolldown.mjs.map +1 -1
  57. package/dist/rolldown.test.cjs +23 -0
  58. package/dist/rolldown.test.d.cts +1 -0
  59. package/dist/rolldown.test.d.mts +2 -0
  60. package/dist/rolldown.test.mjs +25 -0
  61. package/dist/rolldown.test.mjs.map +1 -0
  62. package/dist/rollup.cjs +14 -1
  63. package/dist/rollup.d.cts.map +1 -1
  64. package/dist/rollup.d.mts.map +1 -1
  65. package/dist/rollup.mjs +9 -1
  66. package/dist/rollup.mjs.map +1 -1
  67. package/dist/rollup.test.cjs +23 -0
  68. package/dist/rollup.test.d.cts +1 -0
  69. package/dist/rollup.test.d.mts +2 -0
  70. package/dist/rollup.test.mjs +25 -0
  71. package/dist/rollup.test.mjs.map +1 -0
  72. package/dist/rspack.cjs +13 -1
  73. package/dist/rspack.d.cts.map +1 -1
  74. package/dist/rspack.d.mts.map +1 -1
  75. package/dist/rspack.mjs +8 -1
  76. package/dist/rspack.mjs.map +1 -1
  77. package/dist/rspack.test.cjs +23 -0
  78. package/dist/rspack.test.d.cts +1 -0
  79. package/dist/rspack.test.d.mts +2 -0
  80. package/dist/rspack.test.mjs +25 -0
  81. package/dist/rspack.test.mjs.map +1 -0
  82. package/dist/tsdown.cjs +16 -1
  83. package/dist/tsdown.d.cts.map +1 -1
  84. package/dist/tsdown.d.mts.map +1 -1
  85. package/dist/tsdown.mjs +11 -1
  86. package/dist/tsdown.mjs.map +1 -1
  87. package/dist/tsdown.test.cjs +23 -0
  88. package/dist/tsdown.test.d.cts +1 -0
  89. package/dist/tsdown.test.d.mts +2 -0
  90. package/dist/tsdown.test.mjs +25 -0
  91. package/dist/tsdown.test.mjs.map +1 -0
  92. package/dist/tsup.cjs +14 -1
  93. package/dist/tsup.d.cts.map +1 -1
  94. package/dist/tsup.d.mts.map +1 -1
  95. package/dist/tsup.mjs +9 -1
  96. package/dist/tsup.mjs.map +1 -1
  97. package/dist/tsup.test.cjs +23 -0
  98. package/dist/tsup.test.d.cts +1 -0
  99. package/dist/tsup.test.d.mts +2 -0
  100. package/dist/tsup.test.mjs +25 -0
  101. package/dist/tsup.test.mjs.map +1 -0
  102. package/dist/types.cjs +13 -0
  103. package/dist/types.mjs +8 -1
  104. package/dist/types.mjs.map +1 -0
  105. package/dist/types.test.cjs +23 -0
  106. package/dist/types.test.d.cts +1 -0
  107. package/dist/types.test.d.mts +2 -0
  108. package/dist/types.test.mjs +25 -0
  109. package/dist/types.test.mjs.map +1 -0
  110. package/dist/unloader.cjs +13 -1
  111. package/dist/unloader.d.cts.map +1 -1
  112. package/dist/unloader.d.mts.map +1 -1
  113. package/dist/unloader.mjs +7 -1
  114. package/dist/unloader.mjs.map +1 -1
  115. package/dist/unloader.test.cjs +23 -0
  116. package/dist/unloader.test.d.cts +1 -0
  117. package/dist/unloader.test.d.mts +2 -0
  118. package/dist/unloader.test.mjs +25 -0
  119. package/dist/unloader.test.mjs.map +1 -0
  120. package/dist/unplugin.cjs +8 -0
  121. package/dist/unplugin.d.cts.map +1 -1
  122. package/dist/unplugin.d.mts.map +1 -1
  123. package/dist/unplugin.mjs +4 -1
  124. package/dist/unplugin.mjs.map +1 -1
  125. package/dist/unplugin.test.cjs +23 -0
  126. package/dist/unplugin.test.d.cts +1 -0
  127. package/dist/unplugin.test.d.mts +2 -0
  128. package/dist/unplugin.test.mjs +25 -0
  129. package/dist/unplugin.test.mjs.map +1 -0
  130. package/dist/vite.d.cts.map +1 -1
  131. package/dist/vite.d.mts.map +1 -1
  132. package/dist/vite.test.cjs +26 -0
  133. package/dist/vite.test.d.cts +1 -0
  134. package/dist/vite.test.d.mts +2 -0
  135. package/dist/vite.test.mjs +28 -0
  136. package/dist/vite.test.mjs.map +1 -0
  137. package/dist/webpack.cjs +13 -1
  138. package/dist/webpack.d.cts.map +1 -1
  139. package/dist/webpack.d.mts.map +1 -1
  140. package/dist/webpack.mjs +8 -1
  141. package/dist/webpack.mjs.map +1 -1
  142. package/dist/webpack.test.cjs +23 -0
  143. package/dist/webpack.test.d.cts +1 -0
  144. package/dist/webpack.test.d.mts +2 -0
  145. package/dist/webpack.test.mjs +25 -0
  146. package/dist/webpack.test.mjs.map +1 -0
  147. package/package.json +77 -13
package/dist/astro.cjs CHANGED
@@ -7,9 +7,14 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
9
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
10
11
  const require_vite = require('./vite.cjs');
11
12
 
12
13
  //#region src/astro.ts
14
+ var astro_exports = /* @__PURE__ */ require_runtime.__exportAll({
15
+ default: () => withPlugin,
16
+ withPlugin: () => withPlugin
17
+ });
13
18
  /**
14
19
  * An Astro plugin that will invoke the Powerlines API hooks during the build process.
15
20
  *
@@ -41,5 +46,11 @@ function withPlugin(options) {
41
46
  }
42
47
 
43
48
  //#endregion
49
+ Object.defineProperty(exports, 'astro_exports', {
50
+ enumerable: true,
51
+ get: function () {
52
+ return astro_exports;
53
+ }
54
+ });
44
55
  exports.default = withPlugin;
45
56
  exports.withPlugin = withPlugin;
package/dist/astro.mjs CHANGED
@@ -6,9 +6,14 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
9
10
  import plugin from "./vite.mjs";
10
11
 
11
12
  //#region src/astro.ts
13
+ var astro_exports = /* @__PURE__ */ __exportAll({
14
+ default: () => withPlugin,
15
+ withPlugin: () => withPlugin
16
+ });
12
17
  /**
13
18
  * An Astro plugin that will invoke the Powerlines API hooks during the build process.
14
19
  *
@@ -40,5 +45,5 @@ function withPlugin(options) {
40
45
  }
41
46
 
42
47
  //#endregion
43
- export { withPlugin as default, withPlugin };
48
+ export { astro_exports, withPlugin as default, withPlugin };
44
49
  //# sourceMappingURL=astro.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"astro.mjs","names":["vite"],"sources":["../src/astro.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 { AstroUserConfig } from \"astro\";\nimport vite from \"./vite\";\n\n/**\n * An Astro plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://docs.astro.build/en/guides/integrations-guide/#creating-an-integration\n *\n * @example\n * ```js\n * // astro.config.mjs\n * import { defineConfig } from \"astro/config\";\n * import powerlines from \"@powerlines/unplugin/astro\";\n *\n * export default defineConfig({\n * integrations: [powerlines({ name: \"example-app\", ... })]\n * });\n *\n * ```\n *\n * @param options - The Astro options to merge with the Powerlines configuration.\n * @returns The merged Astro configuration options.\n */\nexport function withPlugin(options: AstroUserConfig): AstroUserConfig {\n return {\n ...options,\n vite: {\n ...options.vite,\n plugins: [...(options.vite?.plugins ?? []), vite()] as NonNullable<\n AstroUserConfig[\"vite\"]\n >[\"plugins\"]\n }\n };\n}\n\nexport default withPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,WAAW,SAA2C;CACpE,OAAO;EACL,GAAG;EACH,MAAM;GACJ,GAAG,QAAQ;GACX,SAAS,CAAC,GAAI,QAAQ,MAAM,WAAW,CAAC,GAAIA,OAAK,CAAC;EAGpD;CACF;AACF"}
1
+ {"version":3,"file":"astro.mjs","names":["vite"],"sources":["../src/astro.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 { AstroUserConfig } from \"astro\";\nimport vite from \"./vite\";\n\n/**\n * An Astro plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://docs.astro.build/en/guides/integrations-guide/#creating-an-integration\n *\n * @example\n * ```js\n * // astro.config.mjs\n * import { defineConfig } from \"astro/config\";\n * import powerlines from \"@powerlines/unplugin/astro\";\n *\n * export default defineConfig({\n * integrations: [powerlines({ name: \"example-app\", ... })]\n * });\n *\n * ```\n *\n * @param options - The Astro options to merge with the Powerlines configuration.\n * @returns The merged Astro configuration options.\n */\nexport function withPlugin(options: AstroUserConfig): AstroUserConfig {\n return {\n ...options,\n vite: {\n ...options.vite,\n plugins: [...(options.vite?.plugins ?? []), vite()] as NonNullable<\n AstroUserConfig[\"vite\"]\n >[\"plugins\"]\n }\n };\n}\n\nexport default withPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,WAAW,SAA2C;CACpE,OAAO;EACL,GAAG;EACH,MAAM;GACJ,GAAG,QAAQ;GACX,SAAS,CAAC,GAAI,QAAQ,MAAM,WAAW,CAAC,GAAIA,OAAK,CAAC;EAGpD;CACF;AACF"}
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_astro = require('./astro.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/astro.test.ts
13
+ (0, vitest.describe)("devkit/unplugin/src/astro.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_astro.astro_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_astro.astro_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_astro.astro_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,25 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { astro_exports } from "./astro.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/astro.test.ts
13
+ describe("devkit/unplugin/src/astro.ts", () => {
14
+ it("loads module exports", () => {
15
+ expect(astro_exports).toBeDefined();
16
+ expect(typeof astro_exports).toBe("object");
17
+ });
18
+ it("has at least one runtime export", () => {
19
+ expect(Object.keys(astro_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
24
+ export { };
25
+ //# sourceMappingURL=astro.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro.test.mjs","names":["moduleExports"],"sources":["../src/astro.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./astro\";\n\ndescribe(\"devkit/unplugin/src/astro.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,sCAAsC;CAC7C,GAAG,8BAA8B;EAC/B,OAAOA,aAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,aAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,aAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild.d.cts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;cAyCa,eAAA,EAAiB,OAAO,CAAC,YAAA;;;AAAtC;;;;AAAkD;iBAqBlC,YAAA,kBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,WAAA,GAAa,0BAAA,gBACZ,YAAA;;;;;;;;iBAuBa,cAAA,kBAAgC,iBAAA,CAAA,CAC9C,OAAA,EAAS,QAAA,EACT,QAAA,GAAU,WAAA,CAAY,YAAA,IACrB,YAAA;;;;;;;;;AA1BY;AAuBf;;;;;;;;;;;;;iBAgHgB,oBAAA,kBAAsC,gBAAA,CAAA,CACpD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;;AA/GpD;AA6Gf;;;;;;;;;;cAqDM,MAAA,GAAM,OAAA,GAA8C,wBAA9C,mCAAA,MAAA"}
1
+ {"version":3,"file":"esbuild.d.cts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;cAyCa,eAAA,EAAiB,OAAO,CAAC,YAAA;;;AAAtC;;;;AAAkD;iBAqBlC,YAAA,kBAA8B,iBAAA,EAC5C,OAAA,EAAS,QAAA,EACT,WAAA,GAAa,0BAAA,gBACZ,YAAA;;;;;;;;iBAuBa,cAAA,kBAAgC,iBAAA,EAC9C,OAAA,EAAS,QAAA,EACT,QAAA,GAAU,WAAA,CAAY,YAAA,IACrB,YAAA;;;;;;;;;AA1BY;AAuBf;;;;;;;;;;;;;iBAgHgB,oBAAA,kBAAsC,gBAAA,EACpD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;;AA/GpD;AA6Gf;;;;;;;;;;cAqDM,MAAA,GAAM,OAAA,GAA8C,wBAA9C,mCAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild.d.mts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;;;cAyCa,eAAA,EAAiB,OAAO,CAAC,YAAA;;;;;;;;iBAqBtB,YAAA,kBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,WAAA,GAAa,0BAAA,gBACZ,YAAA;;;AAxBH;;;;AAAkD;iBA+ClC,cAAA,kBAAgC,iBAAA,CAAA,CAC9C,OAAA,EAAS,QAAA,EACT,QAAA,GAAU,WAAA,CAAY,YAAA,IACrB,YAAA;;;;;;;;;;;;;;;;;AA1BY;AAuBf;;;;;iBAgHgB,oBAAA,kBAAsC,gBAAA,CAAA,CACpD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;;;;;;;;;;AA/GpD;AA6Gf;;cAqDM,MAAA,GAAM,OAAA,GAA8C,wBAA9C,mCAAA,MAAA"}
1
+ {"version":3,"file":"esbuild.d.mts","names":[],"sources":["../src/esbuild.ts"],"mappings":";;;;;;;;;cAyCa,eAAA,EAAiB,OAAO,CAAC,YAAA;;;;;;;;iBAqBtB,YAAA,kBAA8B,iBAAA,EAC5C,OAAA,EAAS,QAAA,EACT,WAAA,GAAa,0BAAA,gBACZ,YAAA;;;AAxBH;;;;AAAkD;iBA+ClC,cAAA,kBAAgC,iBAAA,EAC9C,OAAA,EAAS,QAAA,EACT,QAAA,GAAU,WAAA,CAAY,YAAA,IACrB,YAAA;;;;;;;;;;;;;;;;;AA1BY;AAuBf;;;;;iBAgHgB,oBAAA,kBAAsC,gBAAA,EACpD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;;;;;;;;;;AA/GpD;AA6Gf;;cAqDM,MAAA,GAAM,OAAA,GAA8C,wBAA9C,mCAAA,MAAA"}
@@ -0,0 +1,32 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_esbuild = require('./esbuild.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/esbuild.test.ts
13
+ (0, vitest.describe)("esbuild DEFAULT_OPTIONS", () => {
14
+ (0, vitest.it)("is an object", () => {
15
+ (0, vitest.expect)(typeof require_esbuild.DEFAULT_OPTIONS).toBe("object");
16
+ (0, vitest.expect)(require_esbuild.DEFAULT_OPTIONS).not.toBeNull();
17
+ });
18
+ (0, vitest.it)("has target set to esnext", () => {
19
+ (0, vitest.expect)(require_esbuild.DEFAULT_OPTIONS.target).toBe("esnext");
20
+ });
21
+ (0, vitest.it)("has format set to esm", () => {
22
+ (0, vitest.expect)(require_esbuild.DEFAULT_OPTIONS.format).toBe("esm");
23
+ });
24
+ (0, vitest.it)("has bundle set to true", () => {
25
+ (0, vitest.expect)(require_esbuild.DEFAULT_OPTIONS.bundle).toBe(true);
26
+ });
27
+ (0, vitest.it)("has logLevel set to silent", () => {
28
+ (0, vitest.expect)(require_esbuild.DEFAULT_OPTIONS.logLevel).toBe("silent");
29
+ });
30
+ });
31
+
32
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,34 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { DEFAULT_OPTIONS } from "./esbuild.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/esbuild.test.ts
13
+ describe("esbuild DEFAULT_OPTIONS", () => {
14
+ it("is an object", () => {
15
+ expect(typeof DEFAULT_OPTIONS).toBe("object");
16
+ expect(DEFAULT_OPTIONS).not.toBeNull();
17
+ });
18
+ it("has target set to esnext", () => {
19
+ expect(DEFAULT_OPTIONS.target).toBe("esnext");
20
+ });
21
+ it("has format set to esm", () => {
22
+ expect(DEFAULT_OPTIONS.format).toBe("esm");
23
+ });
24
+ it("has bundle set to true", () => {
25
+ expect(DEFAULT_OPTIONS.bundle).toBe(true);
26
+ });
27
+ it("has logLevel set to silent", () => {
28
+ expect(DEFAULT_OPTIONS.logLevel).toBe("silent");
29
+ });
30
+ });
31
+
32
+ //#endregion
33
+ export { };
34
+ //# sourceMappingURL=esbuild.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.test.mjs","names":[],"sources":["../src/esbuild.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { DEFAULT_OPTIONS } from \"./esbuild\";\n\ndescribe(\"esbuild DEFAULT_OPTIONS\", () => {\n it(\"is an object\", () => {\n expect(typeof DEFAULT_OPTIONS).toBe(\"object\");\n expect(DEFAULT_OPTIONS).not.toBeNull();\n });\n\n it(\"has target set to esnext\", () => {\n expect(DEFAULT_OPTIONS.target).toBe(\"esnext\");\n });\n\n it(\"has format set to esm\", () => {\n expect(DEFAULT_OPTIONS.format).toBe(\"esm\");\n });\n\n it(\"has bundle set to true\", () => {\n expect(DEFAULT_OPTIONS.bundle).toBe(true);\n });\n\n it(\"has logLevel set to silent\", () => {\n expect(DEFAULT_OPTIONS.logLevel).toBe(\"silent\");\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,iCAAiC;CACxC,GAAG,sBAAsB;EACvB,OAAO,OAAO,eAAe,EAAE,KAAK,QAAQ;EAC5C,OAAO,eAAe,EAAE,IAAI,SAAS;CACvC,CAAC;CAED,GAAG,kCAAkC;EACnC,OAAO,gBAAgB,MAAM,EAAE,KAAK,QAAQ;CAC9C,CAAC;CAED,GAAG,+BAA+B;EAChC,OAAO,gBAAgB,MAAM,EAAE,KAAK,KAAK;CAC3C,CAAC;CAED,GAAG,gCAAgC;EACjC,OAAO,gBAAgB,MAAM,EAAE,KAAK,IAAI;CAC1C,CAAC;CAED,GAAG,oCAAoC;EACrC,OAAO,gBAAgB,QAAQ,EAAE,KAAK,QAAQ;CAChD,CAAC;AACH,CAAC"}
package/dist/farm.cjs CHANGED
@@ -7,10 +7,15 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
9
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
10
11
  const require_unplugin = require('./unplugin.cjs');
11
12
  let unplugin = require("unplugin");
12
13
 
13
14
  //#region src/farm.ts
15
+ var farm_exports = /* @__PURE__ */ require_runtime.__exportAll({
16
+ createFarmFactory: () => createFarmFactory,
17
+ default: () => farm
18
+ });
14
19
  /**
15
20
  * Creates a Farm plugin factory that generates a plugin instance.
16
21
  *
@@ -60,4 +65,10 @@ const farm = (0, unplugin.createFarmPlugin)(createFarmFactory());
60
65
 
61
66
  //#endregion
62
67
  exports.createFarmFactory = createFarmFactory;
63
- exports.default = farm;
68
+ exports.default = farm;
69
+ Object.defineProperty(exports, 'farm_exports', {
70
+ enumerable: true,
71
+ get: function () {
72
+ return farm_exports;
73
+ }
74
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"farm.d.cts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;;;;;;;;iBAAgB,iBAAA,kBAAmC,gBAAA,CAAA,CACjD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;AAAA;AAKlE;;;;;;;;AAmBiD;;;;cAA5C,IAAA,GAAI,OAAA,GAAwC,wBAAxC,wCAAA,QAAA"}
1
+ {"version":3,"file":"farm.d.cts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;;;;;;;;iBAAgB,iBAAA,kBAAmC,gBAAA,EACjD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;AAAA;AAKlE;;;;;;;;AAmBiD;;;;cAA5C,IAAA,GAAI,OAAA,GAAwC,wBAAxC,wCAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"farm.d.mts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAgDA;;;;;;;;;;;iBAAgB,iBAAA,kBAAmC,gBAAA,CAAA,CACjD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;;;;;;;;;AAAA;AAKlE;;;;cAmBK,IAAA,GAAI,OAAA,GAAwC,wBAAxC,wCAAA,QAAA"}
1
+ {"version":3,"file":"farm.d.mts","names":[],"sources":["../src/farm.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAgDA;;;;;;;;;;;iBAAgB,iBAAA,kBAAmC,gBAAA,EACjD,OAAA,GAAS,IAAA,CAAK,sBAAA,cACd,QAAA,GAAU,wBAAA,CAAyB,QAAA,IAA8B,eAAA,CAAA,gBAAA,4BAAA,cAAA;;;;;;;;;;;;;AAAA;AAKlE;;;;cAmBK,IAAA,GAAI,OAAA,GAAwC,wBAAxC,wCAAA,QAAA"}
package/dist/farm.mjs CHANGED
@@ -6,10 +6,15 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
9
10
  import { createUnpluginFactory } from "./unplugin.mjs";
10
11
  import { createFarmPlugin } from "unplugin";
11
12
 
12
13
  //#region src/farm.ts
14
+ var farm_exports = /* @__PURE__ */ __exportAll({
15
+ createFarmFactory: () => createFarmFactory,
16
+ default: () => farm
17
+ });
13
18
  /**
14
19
  * Creates a Farm plugin factory that generates a plugin instance.
15
20
  *
@@ -58,5 +63,5 @@ function createFarmFactory(options = {}, decorate = (options) => options) {
58
63
  const farm = createFarmPlugin(createFarmFactory());
59
64
 
60
65
  //#endregion
61
- export { createFarmFactory, farm as default };
66
+ export { createFarmFactory, farm as default, farm_exports };
62
67
  //# sourceMappingURL=farm.mjs.map
package/dist/farm.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"farm.mjs","names":[],"sources":["../src/farm.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 { ExecutionContext, UnpluginOptions } from \"@powerlines/core\";\nimport { createFarmPlugin } from \"unplugin\";\nimport {\n createUnpluginFactory,\n UnpluginFactoryDecorator,\n UnpluginFactoryOptions\n} from \"./unplugin\";\n\n/**\n * Creates a Farm plugin factory that generates a plugin instance.\n *\n * @see https://farmjs.dev/plugins/writing-plugins\n *\n * @example\n * ```ts\n * // farm.config.ts\n * import { createFarmFactory } from \"@powerlines/unplugin/farm\";\n *\n * const powerlinesPlugin = createFarmFactory({ name: \"example-app\", ... });\n *\n * export default defineConfig({\n * plugins: [powerlinesPlugin()],\n * });\n *\n * ```\n *\n * @param options - The options to create the plugin factory with.\n * @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options.\n * @returns A function that generates a Farm plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Farm build.\n */\nexport function createFarmFactory<TContext extends ExecutionContext>(\n options: Omit<UnpluginFactoryOptions, \"variant\"> = {},\n decorate: UnpluginFactoryDecorator<TContext> = options => options\n) {\n return createUnpluginFactory({ ...options, variant: \"farm\" }, unplugin =>\n decorate(unplugin as UnpluginOptions<TContext>)\n );\n}\n\n/**\n * A Farm plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://farmjs.dev/plugins/writing-plugins\n *\n * @example\n * ```ts\n * // farm.config.ts\n * import powerlines from \"@powerlines/unplugin/farm\";\n * import { defineConfig } from \"@farmfe/core\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nconst farm = createFarmPlugin(createFarmFactory());\n\nexport default farm;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,kBACd,UAAmD,CAAC,GACpD,YAA+C,YAAW,SAC1D;CACA,OAAO,sBAAsB;EAAE,GAAG;EAAS,SAAS;CAAO,IAAG,aAC5D,SAAS,QAAqC,CAChD;AACF;;;;;;;;;;;;;;;;;;AAmBA,MAAM,OAAO,iBAAiB,kBAAkB,CAAC"}
1
+ {"version":3,"file":"farm.mjs","names":[],"sources":["../src/farm.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 { ExecutionContext, UnpluginOptions } from \"@powerlines/core\";\nimport { createFarmPlugin } from \"unplugin\";\nimport {\n createUnpluginFactory,\n UnpluginFactoryDecorator,\n UnpluginFactoryOptions\n} from \"./unplugin\";\n\n/**\n * Creates a Farm plugin factory that generates a plugin instance.\n *\n * @see https://farmjs.dev/plugins/writing-plugins\n *\n * @example\n * ```ts\n * // farm.config.ts\n * import { createFarmFactory } from \"@powerlines/unplugin/farm\";\n *\n * const powerlinesPlugin = createFarmFactory({ name: \"example-app\", ... });\n *\n * export default defineConfig({\n * plugins: [powerlinesPlugin()],\n * });\n *\n * ```\n *\n * @param options - The options to create the plugin factory with.\n * @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options.\n * @returns A function that generates a Farm plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Farm build.\n */\nexport function createFarmFactory<TContext extends ExecutionContext>(\n options: Omit<UnpluginFactoryOptions, \"variant\"> = {},\n decorate: UnpluginFactoryDecorator<TContext> = options => options\n) {\n return createUnpluginFactory({ ...options, variant: \"farm\" }, unplugin =>\n decorate(unplugin as UnpluginOptions<TContext>)\n );\n}\n\n/**\n * A Farm plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://farmjs.dev/plugins/writing-plugins\n *\n * @example\n * ```ts\n * // farm.config.ts\n * import powerlines from \"@powerlines/unplugin/farm\";\n * import { defineConfig } from \"@farmfe/core\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nconst farm = createFarmPlugin(createFarmFactory());\n\nexport default farm;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,kBACd,UAAmD,CAAC,GACpD,YAA+C,YAAW,SAC1D;CACA,OAAO,sBAAsB;EAAE,GAAG;EAAS,SAAS;CAAO,IAAG,aAC5D,SAAS,QAAqC,CAChD;AACF;;;;;;;;;;;;;;;;;;AAmBA,MAAM,OAAO,iBAAiB,kBAAkB,CAAC"}
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_farm = require('./farm.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/farm.test.ts
13
+ (0, vitest.describe)("devkit/unplugin/src/farm.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_farm.farm_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_farm.farm_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_farm.farm_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,25 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { farm_exports } from "./farm.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/farm.test.ts
13
+ describe("devkit/unplugin/src/farm.ts", () => {
14
+ it("loads module exports", () => {
15
+ expect(farm_exports).toBeDefined();
16
+ expect(typeof farm_exports).toBe("object");
17
+ });
18
+ it("has at least one runtime export", () => {
19
+ expect(Object.keys(farm_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
24
+ export { };
25
+ //# sourceMappingURL=farm.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"farm.test.mjs","names":["moduleExports"],"sources":["../src/farm.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./farm\";\n\ndescribe(\"devkit/unplugin/src/farm.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,qCAAqC;CAC5C,GAAG,8BAA8B;EAC/B,OAAOA,YAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,YAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,YAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
package/dist/index.cjs CHANGED
@@ -28,12 +28,13 @@ var src_exports = /* @__PURE__ */ require_runtime.__exportAll({
28
28
  default: () => plugins,
29
29
  plugins: () => plugins
30
30
  });
31
+ require_runtime.__reExport(src_exports, require_unplugin.unplugin_exports);
31
32
  const plugins = {
32
33
  astro: require_astro.default,
33
34
  esbuild: require_esbuild.default,
34
35
  farm: require_farm.default,
35
36
  next: require_next.default,
36
- nuxt: require_nuxt,
37
+ nuxt: require_nuxt.default,
37
38
  rolldown: require_rolldown.default,
38
39
  rollup: require_rollup.default,
39
40
  rspack: require_rspack.default,
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
9
  import { __exportAll, __reExport } from "./_virtual/_rolldown/runtime.mjs";
10
- import { createUnpluginFactory } from "./unplugin.mjs";
10
+ import { createUnpluginFactory, unplugin_exports } from "./unplugin.mjs";
11
11
  import plugin from "./esbuild.mjs";
12
12
  import plugin$1 from "./rolldown.mjs";
13
13
  import plugin$2 from "./vite.mjs";
@@ -29,6 +29,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
29
29
  default: () => plugins,
30
30
  plugins: () => plugins
31
31
  });
32
+ __reExport(src_exports, unplugin_exports);
32
33
  const plugins = {
33
34
  astro: withPlugin,
34
35
  esbuild: plugin,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 astro from \"./astro\";\nimport esbuild from \"./esbuild\";\nimport farm from \"./farm\";\nimport next from \"./next\";\nimport nuxt from \"./nuxt\";\nimport rolldown from \"./rolldown\";\nimport rollup from \"./rollup\";\nimport rspack from \"./rspack\";\nimport tsdown from \"./tsdown\";\nimport tsup from \"./tsup\";\nimport unloader from \"./unloader\";\nimport vite from \"./vite\";\n\nexport type * from \"./types\";\nexport * from \"./unplugin\";\n\nexport const plugins = {\n astro,\n esbuild,\n farm,\n next,\n nuxt,\n rolldown,\n rollup,\n rspack,\n tsdown,\n tsup,\n unloader,\n vite\n};\n\nexport default plugins;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,UAAU;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 astro from \"./astro\";\nimport esbuild from \"./esbuild\";\nimport farm from \"./farm\";\nimport next from \"./next\";\nimport nuxt from \"./nuxt\";\nimport rolldown from \"./rolldown\";\nimport rollup from \"./rollup\";\nimport rspack from \"./rspack\";\nimport tsdown from \"./tsdown\";\nimport tsup from \"./tsup\";\nimport unloader from \"./unloader\";\nimport vite from \"./vite\";\n\nexport type * from \"./types\";\nexport * from \"./unplugin\";\n\nexport const plugins = {\n astro,\n esbuild,\n farm,\n next,\n nuxt,\n rolldown,\n rollup,\n rspack,\n tsdown,\n tsup,\n unloader,\n vite\n};\n\nexport default plugins;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,UAAU;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -0,0 +1,35 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_index = require('./index.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/index.test.ts
13
+ (0, vitest.describe)("unplugin index", () => {
14
+ (0, vitest.it)("exports plugins as default", () => {
15
+ (0, vitest.expect)(typeof require_index.default).toBe("object");
16
+ (0, vitest.expect)(require_index.default).not.toBeNull();
17
+ });
18
+ (0, vitest.it)("exports named plugins object", () => {
19
+ (0, vitest.expect)(typeof require_index.default).toBe("object");
20
+ (0, vitest.expect)(require_index.default).not.toBeNull();
21
+ });
22
+ (0, vitest.it)("plugins includes common bundler adapters", () => {
23
+ (0, vitest.expect)(typeof require_index.default.vite).toBeDefined();
24
+ (0, vitest.expect)(typeof require_index.default.esbuild).toBeDefined();
25
+ (0, vitest.expect)(typeof require_index.default.rollup).toBeDefined();
26
+ (0, vitest.expect)(typeof require_index.default.rolldown).toBeDefined();
27
+ (0, vitest.expect)(typeof require_index.default.webpack).toBeFalsy();
28
+ });
29
+ (0, vitest.it)("plugins includes tsup and tsdown adapters", () => {
30
+ (0, vitest.expect)(require_index.default.tsup).toBeDefined();
31
+ (0, vitest.expect)(require_index.default.tsdown).toBeDefined();
32
+ });
33
+ });
34
+
35
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,37 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import plugins from "./index.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/index.test.ts
13
+ describe("unplugin index", () => {
14
+ it("exports plugins as default", () => {
15
+ expect(typeof plugins).toBe("object");
16
+ expect(plugins).not.toBeNull();
17
+ });
18
+ it("exports named plugins object", () => {
19
+ expect(typeof plugins).toBe("object");
20
+ expect(plugins).not.toBeNull();
21
+ });
22
+ it("plugins includes common bundler adapters", () => {
23
+ expect(typeof plugins.vite).toBeDefined();
24
+ expect(typeof plugins.esbuild).toBeDefined();
25
+ expect(typeof plugins.rollup).toBeDefined();
26
+ expect(typeof plugins.rolldown).toBeDefined();
27
+ expect(typeof plugins.webpack).toBeFalsy();
28
+ });
29
+ it("plugins includes tsup and tsdown adapters", () => {
30
+ expect(plugins.tsup).toBeDefined();
31
+ expect(plugins.tsdown).toBeDefined();
32
+ });
33
+ });
34
+
35
+ //#endregion
36
+ export { };
37
+ //# sourceMappingURL=index.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.mjs","names":["namedPlugins"],"sources":["../src/index.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport plugins, { plugins as namedPlugins } from \"./index\";\n\ndescribe(\"unplugin index\", () => {\n it(\"exports plugins as default\", () => {\n expect(typeof plugins).toBe(\"object\");\n expect(plugins).not.toBeNull();\n });\n\n it(\"exports named plugins object\", () => {\n expect(typeof namedPlugins).toBe(\"object\");\n expect(namedPlugins).not.toBeNull();\n });\n\n it(\"plugins includes common bundler adapters\", () => {\n expect(typeof plugins.vite).toBeDefined();\n expect(typeof plugins.esbuild).toBeDefined();\n expect(typeof plugins.rollup).toBeDefined();\n expect(typeof plugins.rolldown).toBeDefined();\n expect(typeof plugins.webpack).toBeFalsy();\n });\n\n it(\"plugins includes tsup and tsdown adapters\", () => {\n expect(plugins.tsup).toBeDefined();\n expect(plugins.tsdown).toBeDefined();\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,wBAAwB;CAC/B,GAAG,oCAAoC;EACrC,OAAO,OAAO,OAAO,EAAE,KAAK,QAAQ;EACpC,OAAO,OAAO,EAAE,IAAI,SAAS;CAC/B,CAAC;CAED,GAAG,sCAAsC;EACvC,OAAO,OAAOA,OAAY,EAAE,KAAK,QAAQ;EACzC,OAAOA,OAAY,EAAE,IAAI,SAAS;CACpC,CAAC;CAED,GAAG,kDAAkD;EACnD,OAAO,OAAO,QAAQ,IAAI,EAAE,YAAY;EACxC,OAAO,OAAO,QAAQ,OAAO,EAAE,YAAY;EAC3C,OAAO,OAAO,QAAQ,MAAM,EAAE,YAAY;EAC1C,OAAO,OAAO,QAAQ,QAAQ,EAAE,YAAY;EAC5C,OAAO,OAAO,QAAQ,OAAO,EAAE,UAAU;CAC3C,CAAC;CAED,GAAG,mDAAmD;EACpD,OAAO,QAAQ,IAAI,EAAE,YAAY;EACjC,OAAO,QAAQ,MAAM,EAAE,YAAY;CACrC,CAAC;AACH,CAAC"}
package/dist/next.cjs CHANGED
@@ -7,9 +7,14 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
9
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
10
11
  const require_webpack = require('./webpack.cjs');
11
12
 
12
13
  //#region src/next.ts
14
+ var next_exports = /* @__PURE__ */ require_runtime.__exportAll({
15
+ default: () => withPlugin,
16
+ withPlugin: () => withPlugin
17
+ });
13
18
  /**
14
19
  * A Next.js configuration function that integrates Powerlines into the build process.
15
20
  *
@@ -42,4 +47,10 @@ function withPlugin(options) {
42
47
 
43
48
  //#endregion
44
49
  exports.default = withPlugin;
45
- exports.withPlugin = withPlugin;
50
+ exports.withPlugin = withPlugin;
51
+ Object.defineProperty(exports, 'next_exports', {
52
+ enumerable: true,
53
+ get: function () {
54
+ return next_exports;
55
+ }
56
+ });
package/dist/next.mjs CHANGED
@@ -6,9 +6,14 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
9
10
  import plugin from "./webpack.mjs";
10
11
 
11
12
  //#region src/next.ts
13
+ var next_exports = /* @__PURE__ */ __exportAll({
14
+ default: () => withPlugin,
15
+ withPlugin: () => withPlugin
16
+ });
12
17
  /**
13
18
  * A Next.js configuration function that integrates Powerlines into the build process.
14
19
  *
@@ -40,5 +45,5 @@ function withPlugin(options) {
40
45
  }
41
46
 
42
47
  //#endregion
43
- export { withPlugin as default, withPlugin };
48
+ export { withPlugin as default, withPlugin, next_exports };
44
49
  //# sourceMappingURL=next.mjs.map
package/dist/next.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"next.mjs","names":["webpack"],"sources":["../src/next.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 { NextConfig } from \"next\";\nimport type { WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { Configuration } from \"webpack\";\nimport webpack from \"./webpack\";\n\n/**\n * A Next.js configuration function that integrates Powerlines into the build process.\n *\n * @see https://nextjs.org/docs/api-reference/next.config.js/introduction\n *\n * @example\n * ```js\n * // next.config.js\n * import withPowerlines from '@powerlines/unplugin/next'\n *\n * export default withPowerlines({\n * reactStrictMode: true,\n * })\n * ```\n *\n * @param options - The Next.js configuration to merge with the Powerlines configuration.\n * @returns The merged Next.js configuration.\n */\nexport function withPlugin(options: NextConfig): NextConfig {\n return {\n ...options,\n webpack(config: Configuration, context: WebpackConfigContext) {\n const result = (options.webpack?.(config, context) ||\n config) as Configuration;\n\n result.plugins ??= [];\n result.plugins.push(webpack());\n\n return result;\n }\n };\n}\n\nexport default withPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,WAAW,SAAiC;CAC1D,OAAO;EACL,GAAG;EACH,QAAQ,QAAuB,SAA+B;GAC5D,MAAM,SAAU,QAAQ,UAAU,QAAQ,OAAO,KAC/C;GAEF,OAAO,YAAY,CAAC;GACpB,OAAO,QAAQ,KAAKA,OAAQ,CAAC;GAE7B,OAAO;EACT;CACF;AACF"}
1
+ {"version":3,"file":"next.mjs","names":["webpack"],"sources":["../src/next.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 { NextConfig } from \"next\";\nimport type { WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { Configuration } from \"webpack\";\nimport webpack from \"./webpack\";\n\n/**\n * A Next.js configuration function that integrates Powerlines into the build process.\n *\n * @see https://nextjs.org/docs/api-reference/next.config.js/introduction\n *\n * @example\n * ```js\n * // next.config.js\n * import withPowerlines from '@powerlines/unplugin/next'\n *\n * export default withPowerlines({\n * reactStrictMode: true,\n * })\n * ```\n *\n * @param options - The Next.js configuration to merge with the Powerlines configuration.\n * @returns The merged Next.js configuration.\n */\nexport function withPlugin(options: NextConfig): NextConfig {\n return {\n ...options,\n webpack(config: Configuration, context: WebpackConfigContext) {\n const result = (options.webpack?.(config, context) ||\n config) as Configuration;\n\n result.plugins ??= [];\n result.plugins.push(webpack());\n\n return result;\n }\n };\n}\n\nexport default withPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,WAAW,SAAiC;CAC1D,OAAO;EACL,GAAG;EACH,QAAQ,QAAuB,SAA+B;GAC5D,MAAM,SAAU,QAAQ,UAAU,QAAQ,OAAO,KAC/C;GAEF,OAAO,YAAY,CAAC;GACpB,OAAO,QAAQ,KAAKA,OAAQ,CAAC;GAE7B,OAAO;EACT;CACF;AACF"}
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_next = require('./next.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/next.test.ts
13
+ (0, vitest.describe)("devkit/unplugin/src/next.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_next.next_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_next.next_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_next.next_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,25 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { next_exports } from "./next.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/next.test.ts
13
+ describe("devkit/unplugin/src/next.ts", () => {
14
+ it("loads module exports", () => {
15
+ expect(next_exports).toBeDefined();
16
+ expect(typeof next_exports).toBe("object");
17
+ });
18
+ it("has at least one runtime export", () => {
19
+ expect(Object.keys(next_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
24
+ export { };
25
+ //# sourceMappingURL=next.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next.test.mjs","names":["moduleExports"],"sources":["../src/next.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./next\";\n\ndescribe(\"devkit/unplugin/src/next.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,qCAAqC;CAC5C,GAAG,8BAA8B;EAC/B,OAAOA,YAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,YAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,YAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}