powerlines 0.42.41 → 0.43.1

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 (125) hide show
  1. package/dist/{chunk-AIJqnxB6.cjs → _virtual/_rolldown/runtime.cjs} +1 -32
  2. package/dist/{chunk-CtajNgzt.mjs → _virtual/_rolldown/runtime.mjs} +1 -1
  3. package/dist/api.cjs +10 -0
  4. package/dist/api.d.cts +2 -0
  5. package/dist/api.d.mts +2 -0
  6. package/dist/api.mjs +3 -0
  7. package/dist/config.cjs +0 -12
  8. package/dist/config.mjs +1 -10
  9. package/dist/constants.cjs +0 -12
  10. package/dist/constants.mjs +1 -10
  11. package/dist/context.cjs +9 -0
  12. package/dist/context.d.cts +1 -0
  13. package/dist/context.d.mts +1 -0
  14. package/dist/context.mjs +3 -0
  15. package/dist/engine.cjs +30 -0
  16. package/dist/engine.d.cts +24 -0
  17. package/dist/engine.d.cts.map +1 -0
  18. package/dist/engine.d.mts +24 -0
  19. package/dist/engine.d.mts.map +1 -0
  20. package/dist/engine.mjs +29 -0
  21. package/dist/engine.mjs.map +1 -0
  22. package/dist/esbuild.cjs +2 -2
  23. package/dist/esbuild.mjs.map +1 -1
  24. package/dist/farm.cjs +1 -1
  25. package/dist/index.cjs +24 -16
  26. package/dist/index.d.cts +13 -260
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.mts +13 -260
  29. package/dist/index.d.mts.map +1 -1
  30. package/dist/index.mjs +14 -8
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/nuxt.cjs +4 -4
  33. package/dist/nuxt.d.cts +1 -1
  34. package/dist/nuxt.d.mts +1 -1
  35. package/dist/nuxt.mjs +1 -1
  36. package/dist/package.cjs +18 -0
  37. package/dist/package.mjs +7 -0
  38. package/dist/package.mjs.map +1 -0
  39. package/dist/plugin-utils.cjs +0 -12
  40. package/dist/plugin-utils.mjs +1 -10
  41. package/dist/rolldown.cjs +2 -2
  42. package/dist/rollup.cjs +2 -2
  43. package/dist/rspack.cjs +2 -2
  44. package/dist/schemas.cjs +9 -0
  45. package/dist/schemas.d.cts +1 -0
  46. package/dist/schemas.d.mts +1 -0
  47. package/dist/schemas.mjs +3 -0
  48. package/dist/storage.cjs +9 -0
  49. package/dist/storage.d.cts +1 -0
  50. package/dist/storage.d.mts +1 -0
  51. package/dist/storage.mjs +3 -0
  52. package/dist/tsdown.cjs +3 -3
  53. package/dist/tsdown.mjs +1 -1
  54. package/dist/tsup.cjs +2 -2
  55. package/dist/types.cjs +0 -0
  56. package/dist/types.d.cts +8 -0
  57. package/dist/types.d.cts.map +1 -0
  58. package/dist/types.d.mts +8 -0
  59. package/dist/types.d.mts.map +1 -0
  60. package/dist/types.mjs +1 -0
  61. package/dist/typescript.cjs +9 -0
  62. package/dist/typescript.d.cts +1 -0
  63. package/dist/typescript.d.mts +1 -0
  64. package/dist/typescript.mjs +3 -0
  65. package/dist/unbuild.cjs +17 -0
  66. package/dist/unbuild.d.cts +2 -0
  67. package/dist/unbuild.d.mts +2 -0
  68. package/dist/unbuild.mjs +3 -0
  69. package/dist/unloader.cjs +1 -1
  70. package/dist/unplugin.cjs +13 -14
  71. package/dist/unplugin.d.cts +3 -2
  72. package/dist/unplugin.d.cts.map +1 -1
  73. package/dist/unplugin.d.mts +3 -2
  74. package/dist/unplugin.d.mts.map +1 -1
  75. package/dist/unplugin.mjs +11 -13
  76. package/dist/unplugin.mjs.map +1 -1
  77. package/dist/utils.cjs +0 -14
  78. package/dist/utils.d.mts +1 -1
  79. package/dist/utils.mjs +2 -15
  80. package/dist/vite.cjs +4 -4
  81. package/dist/vite.mjs +1 -1
  82. package/dist/vite.mjs.map +1 -1
  83. package/dist/webpack.cjs +2 -2
  84. package/package.json +64 -53
  85. package/dist/api-CyXUks49.mjs +0 -1078
  86. package/dist/api-CyXUks49.mjs.map +0 -1
  87. package/dist/api-DITWluqG.cjs +0 -1098
  88. package/dist/api-context-BDFU_IC7.cjs +0 -3066
  89. package/dist/api-context-Cb99qIjE.mjs +0 -2986
  90. package/dist/api-context-Cb99qIjE.mjs.map +0 -1
  91. package/dist/config.mjs.map +0 -1
  92. package/dist/constants.mjs.map +0 -1
  93. package/dist/context/index.cjs +0 -7
  94. package/dist/context/index.d.cts +0 -600
  95. package/dist/context/index.d.cts.map +0 -1
  96. package/dist/context/index.d.mts +0 -600
  97. package/dist/context/index.d.mts.map +0 -1
  98. package/dist/context/index.mjs +0 -3
  99. package/dist/plugin-utils.mjs.map +0 -1
  100. package/dist/storage/index.cjs +0 -9
  101. package/dist/storage/index.d.cts +0 -419
  102. package/dist/storage/index.d.cts.map +0 -1
  103. package/dist/storage/index.d.mts +0 -419
  104. package/dist/storage/index.d.mts.map +0 -1
  105. package/dist/storage/index.mjs +0 -3
  106. package/dist/ts-morph-B85ZbV1Q.mjs +0 -102
  107. package/dist/ts-morph-B85ZbV1Q.mjs.map +0 -1
  108. package/dist/ts-morph-BvE8TMhv.cjs +0 -114
  109. package/dist/tsconfig-BjkktvB9.cjs +0 -198
  110. package/dist/tsconfig-DoV1dUYg.mjs +0 -155
  111. package/dist/tsconfig-DoV1dUYg.mjs.map +0 -1
  112. package/dist/types-9O-s0Fpu.d.mts +0 -4
  113. package/dist/types-9O-s0Fpu.d.mts.map +0 -1
  114. package/dist/types-DerAvFjs.d.cts +0 -4
  115. package/dist/types-DerAvFjs.d.cts.map +0 -1
  116. package/dist/typescript/index.cjs +0 -13
  117. package/dist/typescript/index.d.cts +0 -106
  118. package/dist/typescript/index.d.cts.map +0 -1
  119. package/dist/typescript/index.d.mts +0 -106
  120. package/dist/typescript/index.d.mts.map +0 -1
  121. package/dist/typescript/index.mjs +0 -4
  122. package/dist/utils.mjs.map +0 -1
  123. package/dist/virtual-BNy8T32w.cjs +0 -548
  124. package/dist/virtual-PaZGNIrj.mjs +0 -513
  125. package/dist/virtual-PaZGNIrj.mjs.map +0 -1
package/dist/nuxt.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as types_d_exports } from "./types-DerAvFjs.cjs";
1
+ import { types_d_exports } from "./types.cjs";
2
2
  import * as _$_nuxt_schema0 from "@nuxt/schema";
3
3
 
4
4
  //#region src/nuxt.d.ts
package/dist/nuxt.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as types_d_exports } from "./types-9O-s0Fpu.mjs";
1
+ import { types_d_exports } from "./types.mjs";
2
2
  import * as _$_nuxt_schema0 from "@nuxt/schema";
3
3
 
4
4
  //#region src/nuxt.d.ts
package/dist/nuxt.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as name, r as version } from "./api-CyXUks49.mjs";
2
1
  import { unplugin as unplugin$1 } from "./vite.mjs";
2
+ import { name, version } from "./package.mjs";
3
3
  import { unplugin as unplugin$2 } from "./webpack.mjs";
4
4
  import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
5
5
 
@@ -0,0 +1,18 @@
1
+
2
+ //#region package.json
3
+ var name = "powerlines";
4
+ var version = "0.43.1";
5
+
6
+ //#endregion
7
+ Object.defineProperty(exports, 'name', {
8
+ enumerable: true,
9
+ get: function () {
10
+ return name;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, 'version', {
14
+ enumerable: true,
15
+ get: function () {
16
+ return version;
17
+ }
18
+ });
@@ -0,0 +1,7 @@
1
+ //#region package.json
2
+ var name = "powerlines";
3
+ var version = "0.43.1";
4
+
5
+ //#endregion
6
+ export { name, version };
7
+ //# sourceMappingURL=package.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.mjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -1,17 +1,5 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
1
 
4
- //#region src/plugin-utils.ts
5
- var plugin_utils_exports = /* @__PURE__ */ require_chunk.__exportAll({});
6
- require_chunk.__reExport(plugin_utils_exports, require("@powerlines/core/plugin-utils"));
7
2
 
8
- //#endregion
9
- Object.defineProperty(exports, 'plugin_utils_exports', {
10
- enumerable: true,
11
- get: function () {
12
- return plugin_utils_exports;
13
- }
14
- });
15
3
  var _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
16
4
  Object.keys(_powerlines_core_plugin_utils).forEach(function (k) {
17
5
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
@@ -1,12 +1,3 @@
1
- import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
2
-
3
1
  export * from "@powerlines/core/plugin-utils"
4
2
 
5
- //#region src/plugin-utils.ts
6
- var plugin_utils_exports = /* @__PURE__ */ __exportAll({});
7
- import * as import__powerlines_core_plugin_utils from "@powerlines/core/plugin-utils";
8
- __reExport(plugin_utils_exports, import__powerlines_core_plugin_utils);
9
-
10
- //#endregion
11
- export { plugin_utils_exports as t };
12
- //# sourceMappingURL=plugin-utils.mjs.map
3
+ export { };
package/dist/rolldown.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_unplugin = require('./unplugin.cjs');
4
4
  let defu = require("defu");
5
5
  let unplugin = require("unplugin");
6
6
  let _powerlines_plugin_rolldown_helpers_resolve_options = require("@powerlines/plugin-rolldown/helpers/resolve-options");
7
7
  let _powerlines_plugin_rolldown = require("@powerlines/plugin-rolldown");
8
- _powerlines_plugin_rolldown = require_chunk.__toESM(_powerlines_plugin_rolldown, 1);
8
+ _powerlines_plugin_rolldown = require_runtime.__toESM(_powerlines_plugin_rolldown, 1);
9
9
 
10
10
  //#region src/rolldown.ts
11
11
  /**
package/dist/rollup.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.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");
6
- _powerlines_plugin_rollup = require_chunk.__toESM(_powerlines_plugin_rollup, 1);
6
+ _powerlines_plugin_rollup = require_runtime.__toESM(_powerlines_plugin_rollup, 1);
7
7
 
8
8
  //#region src/rollup.ts
9
9
  /**
package/dist/rspack.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.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");
6
- _powerlines_plugin_rspack = require_chunk.__toESM(_powerlines_plugin_rspack, 1);
6
+ _powerlines_plugin_rspack = require_runtime.__toESM(_powerlines_plugin_rspack, 1);
7
7
 
8
8
  //#region src/rspack.ts
9
9
  /**
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var _powerlines_engine_schemas = require("@powerlines/engine/schemas");
4
+ Object.keys(_powerlines_engine_schemas).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return _powerlines_engine_schemas[k]; }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "@powerlines/engine/schemas";
@@ -0,0 +1 @@
1
+ export * from "@powerlines/engine/schemas";
@@ -0,0 +1,3 @@
1
+ export * from "@powerlines/engine/schemas"
2
+
3
+ export { };
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var _powerlines_engine_storage = require("@powerlines/engine/storage");
4
+ Object.keys(_powerlines_engine_storage).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return _powerlines_engine_storage[k]; }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "@powerlines/engine/storage";
@@ -0,0 +1 @@
1
+ export * from "@powerlines/engine/storage";
@@ -0,0 +1,3 @@
1
+ export * from "@powerlines/engine/storage"
2
+
3
+ export { };
package/dist/tsdown.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_rolldown = require('./rolldown.cjs');
4
+ let _powerlines_plugin_tsdown_helpers_resolve_options = require("@powerlines/plugin-tsdown/helpers/resolve-options");
4
5
  let _stryke_convert_to_array = require("@stryke/convert/to-array");
5
6
  let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
6
7
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
7
- let _powerlines_plugin_tsdown_helpers_resolve_options = require("@powerlines/plugin-tsdown/helpers/resolve-options");
8
8
  let _powerlines_plugin_tsdown = require("@powerlines/plugin-tsdown");
9
- _powerlines_plugin_tsdown = require_chunk.__toESM(_powerlines_plugin_tsdown, 1);
9
+ _powerlines_plugin_tsdown = require_runtime.__toESM(_powerlines_plugin_tsdown, 1);
10
10
 
11
11
  //#region src/tsdown.ts
12
12
  /**
package/dist/tsdown.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { unplugin as unplugin$1 } from "./rolldown.mjs";
2
+ import { resolveFromFormat } from "@powerlines/plugin-tsdown/helpers/resolve-options";
2
3
  import { toArray } from "@stryke/convert/to-array";
3
4
  import { isFunction } from "@stryke/type-checks/is-function";
4
5
  import { isSetString } from "@stryke/type-checks/is-set-string";
5
- import { resolveFromFormat } from "@powerlines/plugin-tsdown/helpers/resolve-options";
6
6
  import plugin, { default as tsdown } from "@powerlines/plugin-tsdown";
7
7
 
8
8
  //#region src/tsdown.ts
package/dist/tsup.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_esbuild = require('./esbuild.cjs');
4
4
  let _stryke_helpers_omit = require("@stryke/helpers/omit");
5
5
  let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
6
6
  let _powerlines_plugin_tsup = require("@powerlines/plugin-tsup");
7
- _powerlines_plugin_tsup = require_chunk.__toESM(_powerlines_plugin_tsup, 1);
7
+ _powerlines_plugin_tsup = require_runtime.__toESM(_powerlines_plugin_tsup, 1);
8
8
 
9
9
  //#region src/tsup.ts
10
10
  /**
package/dist/types.cjs ADDED
File without changes
@@ -0,0 +1,8 @@
1
+ export * from "@powerlines/core";
2
+
3
+ //#region src/types.d.ts
4
+
5
+ import * as import__powerlines_core from "@powerlines/core";
6
+ //#endregion
7
+ export { import__powerlines_core as types_d_exports };
8
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from "@powerlines/core";
2
+
3
+ //#region src/types.d.ts
4
+
5
+ import * as import__powerlines_core from "@powerlines/core";
6
+ //#endregion
7
+ export { import__powerlines_core as types_d_exports };
8
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":""}
package/dist/types.mjs ADDED
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var _powerlines_engine_typescript = require("@powerlines/engine/typescript");
4
+ Object.keys(_powerlines_engine_typescript).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return _powerlines_engine_typescript[k]; }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "@powerlines/engine/typescript";
@@ -0,0 +1 @@
1
+ export * from "@powerlines/engine/typescript";
@@ -0,0 +1,3 @@
1
+ export * from "@powerlines/engine/typescript"
2
+
3
+ export { };
@@ -0,0 +1,17 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let _powerlines_plugin_unbuild = require("@powerlines/plugin-unbuild");
4
+ _powerlines_plugin_unbuild = require_runtime.__toESM(_powerlines_plugin_unbuild, 1);
5
+
6
+ Object.defineProperty(exports, 'plugin', {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _powerlines_plugin_unbuild.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, 'unbuild', {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _powerlines_plugin_unbuild.default;
16
+ }
17
+ });
@@ -0,0 +1,2 @@
1
+ import plugin, { default as unbuild } from "@powerlines/plugin-unbuild";
2
+ export { plugin, unbuild };
@@ -0,0 +1,2 @@
1
+ import plugin, { default as unbuild } from "@powerlines/plugin-unbuild";
2
+ export { plugin, unbuild };
@@ -0,0 +1,3 @@
1
+ import plugin, { default as unbuild } from "@powerlines/plugin-unbuild";
2
+
3
+ export { plugin, unbuild };
package/dist/unloader.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_unplugin = require('./unplugin.cjs');
4
4
  let unplugin = require("unplugin");
5
5
 
package/dist/unplugin.cjs CHANGED
@@ -1,11 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
- const require_api = require('./api-DITWluqG.cjs');
4
- let _stryke_fs_get_workspace_root = require("@stryke/fs/get-workspace-root");
5
- let _powerlines_core_lib_logger = require("@powerlines/core/lib/logger");
6
- let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ require('./api.cjs');
7
4
  let unplugin = require("unplugin");
5
+ let _powerlines_core_lib_logger = require("@powerlines/core/lib/logger");
8
6
  let _powerlines_core_lib_utilities_source_file = require("@powerlines/core/lib/utilities/source-file");
7
+ let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
8
+ let _stryke_fs_get_workspace_root = require("@stryke/fs/get-workspace-root");
9
+ let _powerlines_engine_api = require("@powerlines/engine/api");
9
10
 
10
11
  //#region src/unplugin.ts
11
12
  /**
@@ -28,7 +29,11 @@ function createUnpluginFactory(variant, decorate) {
28
29
  let api;
29
30
  async function buildStart() {
30
31
  log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
31
- api = await require_api.PowerlinesAPI.from((0, _stryke_fs_get_workspace_root.getWorkspaceRoot)(process.cwd()), userConfig);
32
+ api = await _powerlines_engine_api.PowerlinesAPI.fromOptions({
33
+ cwd: (0, _stryke_fs_get_workspace_root.getWorkspaceRoot)(process.cwd()),
34
+ ...userConfig
35
+ });
36
+ await api.context.setup(userConfig);
32
37
  (0, unplugin.setParseImpl)(api.context.parse);
33
38
  log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
34
39
  await api.prepare({ command: "build" });
@@ -69,14 +74,8 @@ function createUnpluginFactory(variant, decorate) {
69
74
  const options = {
70
75
  name: "powerlines",
71
76
  api,
72
- resolveId: {
73
- filter: { id: { include: [/.*/] } },
74
- handler: resolveId
75
- },
76
- load: {
77
- filter: { id: { include: [/.*/, /^storm:/] } },
78
- handler: load
79
- },
77
+ resolveId,
78
+ load,
80
79
  transform,
81
80
  buildStart,
82
81
  writeBundle
@@ -1,4 +1,5 @@
1
- import { API, Context, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions } from "@powerlines/core";
1
+ import { PowerlinesAPI } from "./api.cjs";
2
+ import { Context, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions } from "@powerlines/core";
2
3
  import { UnpluginOptions as UnpluginOptions$1 } from "unplugin";
3
4
  export * from "@powerlines/core/lib/unplugin";
4
5
 
@@ -10,7 +11,7 @@ export * from "@powerlines/core/lib/unplugin";
10
11
  * @param decorate - An optional function to decorate the unplugin options.
11
12
  * @returns The unplugin factory that generates a plugin instance.
12
13
  */
13
- declare function createUnpluginFactory<TContext extends Context, TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(variant: TUnpluginBuilderVariant, decorate?: (api: API<TContext["config"]>, plugin: UnpluginOptions<TContext>) => UnpluginOptions$1): UnpluginFactory<TContext>;
14
+ declare function createUnpluginFactory<TContext extends Context, TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(variant: TUnpluginBuilderVariant, decorate?: (api: PowerlinesAPI<TContext["config"]>, plugin: UnpluginOptions<TContext>) => UnpluginOptions$1): UnpluginFactory<TContext>;
14
15
  //#endregion
15
16
  export { createUnpluginFactory };
16
17
  //# sourceMappingURL=unplugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../src/unplugin.ts"],"mappings":";;;;;;;;AAkEA;;;;iBAAgB,qBAAA,kBACG,OAAA,kCACe,sBAAA,GAC9B,sBAAA,CAAA,CAEF,OAAA,EAAS,uBAAA,EACT,QAAA,IACE,GAAA,EAAK,GAAA,CAAI,QAAA,aACT,MAAA,EAAQ,eAAA,CAAgB,QAAA,MACrB,iBAAA,GACJ,eAAA,CAAgB,QAAA"}
1
+ {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../src/unplugin.ts"],"mappings":";;;;;;;;;AA+CA;;;;iBAAgB,qBAAA,kBACG,OAAA,kCACe,sBAAA,GAC9B,sBAAA,CAAA,CAEF,OAAA,EAAS,uBAAA,EACT,QAAA,IACE,GAAA,EAAK,aAAA,CAAc,QAAA,aACnB,MAAA,EAAQ,eAAA,CAAgB,QAAA,MACrB,iBAAA,GACJ,eAAA,CAAgB,QAAA"}
@@ -1,5 +1,6 @@
1
+ import { PowerlinesAPI } from "./api.mjs";
1
2
  import { UnpluginOptions } from "unplugin";
2
- import { API, Context, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions as UnpluginOptions$1 } from "@powerlines/core";
3
+ import { Context, UnpluginBuilderVariant, UnpluginFactory, UnpluginOptions as UnpluginOptions$1 } from "@powerlines/core";
3
4
  export * from "@powerlines/core/lib/unplugin";
4
5
 
5
6
  //#region src/unplugin.d.ts
@@ -10,7 +11,7 @@ export * from "@powerlines/core/lib/unplugin";
10
11
  * @param decorate - An optional function to decorate the unplugin options.
11
12
  * @returns The unplugin factory that generates a plugin instance.
12
13
  */
13
- declare function createUnpluginFactory<TContext extends Context, TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(variant: TUnpluginBuilderVariant, decorate?: (api: API<TContext["config"]>, plugin: UnpluginOptions$1<TContext>) => UnpluginOptions): UnpluginFactory<TContext>;
14
+ declare function createUnpluginFactory<TContext extends Context, TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(variant: TUnpluginBuilderVariant, decorate?: (api: PowerlinesAPI<TContext["config"]>, plugin: UnpluginOptions$1<TContext>) => UnpluginOptions): UnpluginFactory<TContext>;
14
15
  //#endregion
15
16
  export { createUnpluginFactory };
16
17
  //# sourceMappingURL=unplugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.d.mts","names":[],"sources":["../src/unplugin.ts"],"mappings":";;;;;;;;AAkEA;;;;iBAAgB,qBAAA,kBACG,OAAA,kCACe,sBAAA,GAC9B,sBAAA,CAAA,CAEF,OAAA,EAAS,uBAAA,EACT,QAAA,IACE,GAAA,EAAK,GAAA,CAAI,QAAA,aACT,MAAA,EAAQ,iBAAA,CAAgB,QAAA,MACrB,eAAA,GACJ,eAAA,CAAgB,QAAA"}
1
+ {"version":3,"file":"unplugin.d.mts","names":[],"sources":["../src/unplugin.ts"],"mappings":";;;;;;;;;AA+CA;;;;iBAAgB,qBAAA,kBACG,OAAA,kCACe,sBAAA,GAC9B,sBAAA,CAAA,CAEF,OAAA,EAAS,uBAAA,EACT,QAAA,IACE,GAAA,EAAK,aAAA,CAAc,QAAA,aACnB,MAAA,EAAQ,iBAAA,CAAgB,QAAA,MACrB,eAAA,GACJ,eAAA,CAAgB,QAAA"}
package/dist/unplugin.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { t as PowerlinesAPI } from "./api-CyXUks49.mjs";
2
- import { getWorkspaceRoot } from "@stryke/fs/get-workspace-root";
3
- import { createLog } from "@powerlines/core/lib/logger";
4
- import { LogLevelLabel } from "@storm-software/config-tools/types";
1
+ import { PowerlinesAPI } from "./api.mjs";
5
2
  import { setParseImpl } from "unplugin";
3
+ import { createLog } from "@powerlines/core/lib/logger";
6
4
  import { getString } from "@powerlines/core/lib/utilities/source-file";
5
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
6
+ import { getWorkspaceRoot } from "@stryke/fs/get-workspace-root";
7
7
 
8
8
  export * from "@powerlines/core/lib/unplugin"
9
9
 
@@ -28,7 +28,11 @@ function createUnpluginFactory(variant, decorate) {
28
28
  let api;
29
29
  async function buildStart() {
30
30
  log(LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
31
- api = await PowerlinesAPI.from(getWorkspaceRoot(process.cwd()), userConfig);
31
+ api = await PowerlinesAPI.fromOptions({
32
+ cwd: getWorkspaceRoot(process.cwd()),
33
+ ...userConfig
34
+ });
35
+ await api.context.setup(userConfig);
32
36
  setParseImpl(api.context.parse);
33
37
  log(LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
34
38
  await api.prepare({ command: "build" });
@@ -69,14 +73,8 @@ function createUnpluginFactory(variant, decorate) {
69
73
  const options = {
70
74
  name: "powerlines",
71
75
  api,
72
- resolveId: {
73
- filter: { id: { include: [/.*/] } },
74
- handler: resolveId
75
- },
76
- load: {
77
- filter: { id: { include: [/.*/, /^storm:/] } },
78
- handler: load
79
- },
76
+ resolveId,
77
+ load,
80
78
  transform,
81
79
  buildStart,
82
80
  writeBundle
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.mjs","names":[],"sources":["../src/unplugin.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\n/* -------------------------------------------------------------------\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 {\n API,\n Context,\n UnpluginBuilderVariant,\n UnpluginFactory,\n UnpluginOptions\n} from \"@powerlines/core\";\nimport { createLog } from \"@powerlines/core/lib/logger\";\nimport { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { LoadResult } from \"rolldown\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { PowerlinesAPI } from \"./api\";\n\nexport * from \"@powerlines/core/lib/unplugin\";\n\n/**\n * Creates a Powerlines unplugin factory that generates a plugin instance.\n *\n * @param variant - The build variant for which to create the unplugin.\n * @param decorate - An optional function to decorate the unplugin options.\n * @returns The unplugin factory that generates a plugin instance.\n */\nexport function createUnpluginFactory<\n TContext extends Context,\n TUnpluginBuilderVariant extends UnpluginBuilderVariant =\n UnpluginBuilderVariant\n>(\n variant: TUnpluginBuilderVariant,\n decorate?: (\n api: API<TContext[\"config\"]>,\n plugin: UnpluginOptions<TContext>\n ) => BaseUnpluginOptions\n): UnpluginFactory<TContext> {\n return (config, meta): UnpluginOptions<TContext> => {\n const log = createLog(\"unplugin\", config);\n log(LogLevelLabel.DEBUG, \"Initializing Unplugin\");\n\n try {\n const userConfig = {\n ...config,\n variant,\n unplugin: meta\n } as TContext[\"config\"][\"userConfig\"];\n\n let api!: API<TContext[\"config\"]>;\n\n async function buildStart(this: UnpluginBuildContext): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Powerlines build plugin starting...\");\n\n api = await PowerlinesAPI.from(\n getWorkspaceRoot(process.cwd()),\n userConfig\n );\n setParseImpl(api.context.parse);\n\n log(\n LogLevelLabel.DEBUG,\n \"Preparing build artifacts for the Powerlines project...\"\n );\n\n await api.prepare({\n command: \"build\"\n });\n }\n\n async function resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n options: {\n isEntry: boolean;\n } = { isEntry: false }\n ) {\n return api.context.resolve(id, importer, options);\n }\n\n async function load(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult> {\n const environment = await api.context.getEnvironment();\n\n let result = await api.callHook(\n \"load\",\n { environment, order: \"pre\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await api.callHook(\n \"load\",\n { environment, order: \"normal\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await environment.load(id);\n if (result) {\n return result;\n }\n\n return api.callHook(\"load\", { environment, order: \"post\" }, id);\n }\n\n async function transform(\n code: string,\n id: string\n ): Promise<TransformResult> {\n return api.callHook(\n \"transform\",\n {\n environment: await api.context.getEnvironment(),\n result: \"merge\",\n asNextParam: previousResult => getString(previousResult)\n },\n getString(code),\n id\n );\n }\n\n async function writeBundle(): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Finalizing Powerlines project output...\");\n\n await api.callHook(\"writeBundle\", {\n environment: await api.context.getEnvironment()\n });\n }\n\n const options = {\n name: \"powerlines\",\n api,\n resolveId: {\n filter: {\n id: {\n include: [/.*/]\n }\n },\n handler: resolveId\n },\n load: {\n filter: {\n id: {\n include: [/.*/, /^storm:/]\n }\n },\n handler: load\n },\n transform,\n buildStart,\n writeBundle\n } as UnpluginOptions<TContext>;\n\n const result = decorate ? decorate(api, options) : options;\n\n log(LogLevelLabel.DEBUG, \"Unplugin initialized successfully.\");\n\n return { api, ...result };\n } catch (error) {\n log(LogLevelLabel.FATAL, (error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkEA,SAAgB,sBAKd,SACA,UAI2B;AAC3B,SAAQ,QAAQ,SAAoC;EAClD,MAAM,MAAM,UAAU,YAAY,OAAO;AACzC,MAAI,cAAc,OAAO,wBAAwB;AAEjD,MAAI;GACF,MAAM,aAAa;IACjB,GAAG;IACH;IACA,UAAU;IACX;GAED,IAAI;GAEJ,eAAe,aAAsD;AACnE,QAAI,cAAc,OAAO,sCAAsC;AAE/D,UAAM,MAAM,cAAc,KACxB,iBAAiB,QAAQ,KAAK,CAAC,EAC/B,WACD;AACD,iBAAa,IAAI,QAAQ,MAAM;AAE/B,QACE,cAAc,OACd,0DACD;AAED,UAAM,IAAI,QAAQ,EAChB,SAAS,SACV,CAAC;;GAGJ,eAAe,UAEb,IACA,UACA,UAEI,EAAE,SAAS,OAAO,EACtB;AACA,WAAO,IAAI,QAAQ,QAAQ,IAAI,UAAU,QAAQ;;GAGnD,eAAe,KAEb,IACqB;IACrB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IAEtD,IAAI,SAAS,MAAM,IAAI,SACrB,QACA;KAAE;KAAa,OAAO;KAAO,EAC7B,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,IAAI,SACjB,QACA;KAAE;KAAa,OAAO;KAAU,EAChC,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,YAAY,KAAK,GAAG;AACnC,QAAI,OACF,QAAO;AAGT,WAAO,IAAI,SAAS,QAAQ;KAAE;KAAa,OAAO;KAAQ,EAAE,GAAG;;GAGjE,eAAe,UACb,MACA,IAC0B;AAC1B,WAAO,IAAI,SACT,aACA;KACE,aAAa,MAAM,IAAI,QAAQ,gBAAgB;KAC/C,QAAQ;KACR,cAAa,mBAAkB,UAAU,eAAe;KACzD,EACD,UAAU,KAAK,EACf,GACD;;GAGH,eAAe,cAA6B;AAC1C,QAAI,cAAc,OAAO,0CAA0C;AAEnE,UAAM,IAAI,SAAS,eAAe,EAChC,aAAa,MAAM,IAAI,QAAQ,gBAAgB,EAChD,CAAC;;GAGJ,MAAM,UAAU;IACd,MAAM;IACN;IACA,WAAW;KACT,QAAQ,EACN,IAAI,EACF,SAAS,CAAC,KAAK,EAChB,EACF;KACD,SAAS;KACV;IACD,MAAM;KACJ,QAAQ,EACN,IAAI,EACF,SAAS,CAAC,MAAM,UAAU,EAC3B,EACF;KACD,SAAS;KACV;IACD;IACA;IACA;IACD;GAED,MAAM,SAAS,WAAW,SAAS,KAAK,QAAQ,GAAG;AAEnD,OAAI,cAAc,OAAO,qCAAqC;AAE9D,UAAO;IAAE;IAAK,GAAG;IAAQ;WAClB,OAAO;AACd,OAAI,cAAc,OAAQ,OAAiB,QAAQ;AAEnD,SAAM"}
1
+ {"version":3,"file":"unplugin.mjs","names":[],"sources":["../src/unplugin.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 {\n Context,\n UnpluginBuilderVariant,\n UnpluginFactory,\n UnpluginOptions\n} from \"@powerlines/core\";\nimport { createLog } from \"@powerlines/core/lib/logger\";\nimport { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { LoadResult } from \"rolldown\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { PowerlinesAPI } from \"./api\";\n\nexport * from \"@powerlines/core/lib/unplugin\";\n\n/**\n * Creates a Powerlines unplugin factory that generates a plugin instance.\n *\n * @param variant - The build variant for which to create the unplugin.\n * @param decorate - An optional function to decorate the unplugin options.\n * @returns The unplugin factory that generates a plugin instance.\n */\nexport function createUnpluginFactory<\n TContext extends Context,\n TUnpluginBuilderVariant extends UnpluginBuilderVariant =\n UnpluginBuilderVariant\n>(\n variant: TUnpluginBuilderVariant,\n decorate?: (\n api: PowerlinesAPI<TContext[\"config\"]>,\n plugin: UnpluginOptions<TContext>\n ) => BaseUnpluginOptions\n): UnpluginFactory<TContext> {\n return (config, meta): UnpluginOptions<TContext> => {\n const log = createLog(\"unplugin\", config);\n log(LogLevelLabel.DEBUG, \"Initializing Unplugin\");\n\n try {\n const userConfig = {\n ...config,\n variant,\n unplugin: meta\n } as TContext[\"config\"][\"userConfig\"];\n\n let api!: PowerlinesAPI<TContext[\"config\"]>;\n\n async function buildStart(this: UnpluginBuildContext): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Powerlines build plugin starting...\");\n\n api = await PowerlinesAPI.fromOptions({\n cwd: getWorkspaceRoot(process.cwd()),\n ...userConfig\n });\n await api.context.setup(userConfig);\n\n setParseImpl(api.context.parse);\n\n log(\n LogLevelLabel.DEBUG,\n \"Preparing build artifacts for the Powerlines project...\"\n );\n\n await api.prepare({\n command: \"build\"\n });\n }\n\n async function resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n options: {\n isEntry: boolean;\n } = { isEntry: false }\n ) {\n return api.context.resolve(id, importer, options);\n }\n\n async function load(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult> {\n const environment = await api.context.getEnvironment();\n\n let result = await api.callHook(\n \"load\",\n { environment, order: \"pre\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await api.callHook(\n \"load\",\n { environment, order: \"normal\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await environment.load(id);\n if (result) {\n return result;\n }\n\n return api.callHook(\"load\", { environment, order: \"post\" }, id);\n }\n\n async function transform(\n code: string,\n id: string\n ): Promise<TransformResult> {\n return api.callHook(\n \"transform\",\n {\n environment: await api.context.getEnvironment(),\n result: \"merge\",\n asNextParam: previousResult => getString(previousResult)\n },\n getString(code),\n id\n );\n }\n\n async function writeBundle(): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Finalizing Powerlines project output...\");\n\n await api.callHook(\"writeBundle\", {\n environment: await api.context.getEnvironment()\n });\n }\n\n const options = {\n name: \"powerlines\",\n api,\n resolveId,\n load,\n transform,\n buildStart,\n writeBundle\n } as UnpluginOptions<TContext>;\n\n const result = decorate ? decorate(api, options) : options;\n\n log(LogLevelLabel.DEBUG, \"Unplugin initialized successfully.\");\n\n return { api, ...result };\n } catch (error) {\n log(LogLevelLabel.FATAL, (error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,SAAgB,sBAKd,SACA,UAI2B;AAC3B,SAAQ,QAAQ,SAAoC;EAClD,MAAM,MAAM,UAAU,YAAY,OAAO;AACzC,MAAI,cAAc,OAAO,wBAAwB;AAEjD,MAAI;GACF,MAAM,aAAa;IACjB,GAAG;IACH;IACA,UAAU;IACX;GAED,IAAI;GAEJ,eAAe,aAAsD;AACnE,QAAI,cAAc,OAAO,sCAAsC;AAE/D,UAAM,MAAM,cAAc,YAAY;KACpC,KAAK,iBAAiB,QAAQ,KAAK,CAAC;KACpC,GAAG;KACJ,CAAC;AACF,UAAM,IAAI,QAAQ,MAAM,WAAW;AAEnC,iBAAa,IAAI,QAAQ,MAAM;AAE/B,QACE,cAAc,OACd,0DACD;AAED,UAAM,IAAI,QAAQ,EAChB,SAAS,SACV,CAAC;;GAGJ,eAAe,UAEb,IACA,UACA,UAEI,EAAE,SAAS,OAAO,EACtB;AACA,WAAO,IAAI,QAAQ,QAAQ,IAAI,UAAU,QAAQ;;GAGnD,eAAe,KAEb,IACqB;IACrB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IAEtD,IAAI,SAAS,MAAM,IAAI,SACrB,QACA;KAAE;KAAa,OAAO;KAAO,EAC7B,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,IAAI,SACjB,QACA;KAAE;KAAa,OAAO;KAAU,EAChC,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,YAAY,KAAK,GAAG;AACnC,QAAI,OACF,QAAO;AAGT,WAAO,IAAI,SAAS,QAAQ;KAAE;KAAa,OAAO;KAAQ,EAAE,GAAG;;GAGjE,eAAe,UACb,MACA,IAC0B;AAC1B,WAAO,IAAI,SACT,aACA;KACE,aAAa,MAAM,IAAI,QAAQ,gBAAgB;KAC/C,QAAQ;KACR,cAAa,mBAAkB,UAAU,eAAe;KACzD,EACD,UAAU,KAAK,EACf,GACD;;GAGH,eAAe,cAA6B;AAC1C,QAAI,cAAc,OAAO,0CAA0C;AAEnE,UAAM,IAAI,SAAS,eAAe,EAChC,aAAa,MAAM,IAAI,QAAQ,gBAAgB,EAChD,CAAC;;GAGJ,MAAM,UAAU;IACd,MAAM;IACN;IACA;IACA;IACA;IACA;IACA;IACD;GAED,MAAM,SAAS,WAAW,SAAS,KAAK,QAAQ,GAAG;AAEnD,OAAI,cAAc,OAAO,qCAAqC;AAE9D,UAAO;IAAE;IAAK,GAAG;IAAQ;WAClB,OAAO;AACd,OAAI,cAAc,OAAQ,OAAiB,QAAQ;AAEnD,SAAM"}
package/dist/utils.cjs CHANGED
@@ -1,19 +1,5 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
1
 
4
- //#region src/utils.ts
5
- var utils_exports = /* @__PURE__ */ require_chunk.__exportAll({});
6
- require_chunk.__reExport(utils_exports, require("@powerlines/core/lib/entry"));
7
- require_chunk.__reExport(utils_exports, require("@powerlines/core/lib/logger"));
8
- require_chunk.__reExport(utils_exports, require("@powerlines/core/lib/utilities"));
9
2
 
10
- //#endregion
11
- Object.defineProperty(exports, 'utils_exports', {
12
- enumerable: true,
13
- get: function () {
14
- return utils_exports;
15
- }
16
- });
17
3
  var _powerlines_core_lib_entry = require("@powerlines/core/lib/entry");
18
4
  Object.keys(_powerlines_core_lib_entry).forEach(function (k) {
19
5
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
package/dist/utils.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "@powerlines/core/lib/entry";
2
1
  export * from "@powerlines/core/lib/logger";
2
+ export * from "@powerlines/core/lib/entry";
3
3
  export * from "@powerlines/core/lib/utilities";
package/dist/utils.mjs CHANGED
@@ -1,20 +1,7 @@
1
- import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
1
+ export * from "@powerlines/core/lib/logger"
2
2
 
3
3
  export * from "@powerlines/core/lib/entry"
4
4
 
5
- export * from "@powerlines/core/lib/logger"
6
-
7
5
  export * from "@powerlines/core/lib/utilities"
8
6
 
9
- //#region src/utils.ts
10
- var utils_exports = /* @__PURE__ */ __exportAll({});
11
- import * as import__powerlines_core_lib_entry from "@powerlines/core/lib/entry";
12
- __reExport(utils_exports, import__powerlines_core_lib_entry);
13
- import * as import__powerlines_core_lib_logger from "@powerlines/core/lib/logger";
14
- __reExport(utils_exports, import__powerlines_core_lib_logger);
15
- import * as import__powerlines_core_lib_utilities from "@powerlines/core/lib/utilities";
16
- __reExport(utils_exports, import__powerlines_core_lib_utilities);
17
-
18
- //#endregion
19
- export { utils_exports as t };
20
- //# sourceMappingURL=utils.mjs.map
7
+ export { };
package/dist/vite.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_unplugin = require('./unplugin.cjs');
4
- let defu = require("defu");
5
- defu = require_chunk.__toESM(defu, 1);
6
4
  let _powerlines_plugin_vite_helpers_resolve_options = require("@powerlines/plugin-vite/helpers/resolve-options");
7
5
  let _stryke_env_environment_checks = require("@stryke/env/environment-checks");
6
+ let defu = require("defu");
7
+ defu = require_runtime.__toESM(defu, 1);
8
8
  let unplugin = require("unplugin");
9
9
  let _powerlines_plugin_vite = require("@powerlines/plugin-vite");
10
- _powerlines_plugin_vite = require_chunk.__toESM(_powerlines_plugin_vite, 1);
10
+ _powerlines_plugin_vite = require_runtime.__toESM(_powerlines_plugin_vite, 1);
11
11
 
12
12
  //#region src/vite.ts
13
13
  /**
package/dist/vite.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createUnpluginFactory } from "./unplugin.mjs";
2
- import defu$1 from "defu";
3
2
  import { resolveOptions } from "@powerlines/plugin-vite/helpers/resolve-options";
4
3
  import { isDevelopmentMode, isTestMode } from "@stryke/env/environment-checks";
4
+ import defu$1 from "defu";
5
5
  import { createVitePlugin } from "unplugin";
6
6
  import plugin, { default as vite } from "@powerlines/plugin-vite";
7
7
 
package/dist/vite.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vite.mjs","names":["defu"],"sources":["../src/vite.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-vite/helpers/resolve-options\";\nimport {\n ViteOptions,\n VitePluginUserConfig\n} from \"@powerlines/plugin-vite/types\";\nimport { isDevelopmentMode, isTestMode } from \"@stryke/env/environment-checks\";\nimport defu from \"defu\";\nimport { createVitePlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin, default as vite } from \"@powerlines/plugin-vite\";\n\n/**\n * A Vite plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-api\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import powerlines from \"powerlines/vite\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nexport const unplugin = createVitePlugin<Partial<VitePluginUserConfig>>(\n createUnpluginFactory(\"vite\", (api, plugin) => {\n return {\n ...plugin,\n vite: {\n sharedDuringBuild: true,\n\n async hotUpdate(options) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:hotUpdate\", { environment }, options);\n },\n async config(config, env) {\n api.context.config.mode = isDevelopmentMode(env.mode)\n ? \"development\"\n : isTestMode(env.mode)\n ? \"test\"\n : \"production\";\n\n const environment = await api.context.getEnvironment();\n const result = await api.callHook(\n \"vite:config\",\n { environment },\n config,\n env\n );\n\n return defu(\n resolveOptions(api.context),\n // Need to use `any` here to avoid excessive type complexity\n result?.build ?? {},\n config\n ) as Omit<ViteOptions, \"plugins\">;\n },\n async configResolved(_config) {\n const environment = await api.context.getEnvironment();\n\n await api.callHook(\"configResolved\", { environment });\n },\n async configureServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:configureServer\", { environment }, server);\n },\n async configurePreviewServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:configurePreviewServer\",\n { environment },\n server\n );\n },\n async transformIndexHtml(html, ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:transformIndexHtml\",\n { environment },\n html,\n ctx\n );\n },\n async handleHotUpdate(ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:handleHotUpdate\", { environment }, ctx);\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW,iBACtB,sBAAsB,SAAS,KAAK,WAAW;AAC7C,QAAO;EACL,GAAG;EACH,MAAM;GACJ,mBAAmB;GAEnB,MAAM,UAAU,SAAS;IACvB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,kBAAkB,EAAE,aAAa,EAAE,QAAQ;;GAEjE,MAAM,OAAO,QAAQ,KAAK;AACxB,QAAI,QAAQ,OAAO,OAAO,kBAAkB,IAAI,KAAK,GACjD,gBACA,WAAW,IAAI,KAAK,GAClB,SACA;IAEN,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IACtD,MAAM,SAAS,MAAM,IAAI,SACvB,eACA,EAAE,aAAa,EACf,QACA,IACD;AAED,WAAOA,OACL,eAAe,IAAI,QAAQ,EAE3B,QAAQ,SAAS,EAAE,EACnB,OACD;;GAEH,MAAM,eAAe,SAAS;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,UAAM,IAAI,SAAS,kBAAkB,EAAE,aAAa,CAAC;;GAEvD,MAAM,gBAAgB,QAAQ;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,OAAO;;GAEtE,MAAM,uBAAuB,QAAQ;IACnC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,+BACA,EAAE,aAAa,EACf,OACD;;GAEH,MAAM,mBAAmB,MAAM,KAAK;IAClC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,2BACA,EAAE,aAAa,EACf,MACA,IACD;;GAEH,MAAM,gBAAgB,KAAK;IACzB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,IAAI;;GAEpE;EACF;EACD,CACH"}
1
+ {"version":3,"file":"vite.mjs","names":["defu"],"sources":["../src/vite.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-vite/helpers/resolve-options\";\nimport {\n ViteOptions,\n VitePluginUserConfig\n} from \"@powerlines/plugin-vite/types\";\nimport { isDevelopmentMode, isTestMode } from \"@stryke/env/environment-checks\";\nimport defu from \"defu\";\nimport { createVitePlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport { default as plugin, default as vite } from \"@powerlines/plugin-vite\";\n\n/**\n * A Vite plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-api\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import powerlines from \"powerlines/vite\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * });\n *\n * ```\n */\nexport const unplugin = createVitePlugin<Partial<VitePluginUserConfig>>(\n createUnpluginFactory(\"vite\", (api, plugin) => {\n return {\n ...plugin,\n vite: {\n sharedDuringBuild: true,\n\n async hotUpdate(options) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:hotUpdate\", { environment }, options);\n },\n async config(config, env) {\n api.context.config.mode = isDevelopmentMode(env.mode)\n ? \"development\"\n : isTestMode(env.mode)\n ? \"test\"\n : \"production\";\n\n const environment = await api.context.getEnvironment();\n const result = await api.callHook(\n \"vite:config\",\n { environment },\n config,\n env\n );\n\n return defu(\n resolveOptions(api.context),\n result?.build ?? {},\n config\n ) as Omit<ViteOptions, \"plugins\">;\n },\n async configResolved(_config) {\n const environment = await api.context.getEnvironment();\n\n await api.callHook(\"configResolved\", { environment });\n },\n async configureServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:configureServer\", { environment }, server);\n },\n async configurePreviewServer(server) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:configurePreviewServer\",\n { environment },\n server\n );\n },\n async transformIndexHtml(html, ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\n \"vite:transformIndexHtml\",\n { environment },\n html,\n ctx\n );\n },\n async handleHotUpdate(ctx) {\n const environment = await api.context.getEnvironment();\n\n return api.callHook(\"vite:handleHotUpdate\", { environment }, ctx);\n }\n }\n };\n })\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW,iBACtB,sBAAsB,SAAS,KAAK,WAAW;AAC7C,QAAO;EACL,GAAG;EACH,MAAM;GACJ,mBAAmB;GAEnB,MAAM,UAAU,SAAS;IACvB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,kBAAkB,EAAE,aAAa,EAAE,QAAQ;;GAEjE,MAAM,OAAO,QAAQ,KAAK;AACxB,QAAI,QAAQ,OAAO,OAAO,kBAAkB,IAAI,KAAK,GACjD,gBACA,WAAW,IAAI,KAAK,GAClB,SACA;IAEN,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IACtD,MAAM,SAAS,MAAM,IAAI,SACvB,eACA,EAAE,aAAa,EACf,QACA,IACD;AAED,WAAOA,OACL,eAAe,IAAI,QAAQ,EAC3B,QAAQ,SAAS,EAAE,EACnB,OACD;;GAEH,MAAM,eAAe,SAAS;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,UAAM,IAAI,SAAS,kBAAkB,EAAE,aAAa,CAAC;;GAEvD,MAAM,gBAAgB,QAAQ;IAC5B,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,OAAO;;GAEtE,MAAM,uBAAuB,QAAQ;IACnC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,+BACA,EAAE,aAAa,EACf,OACD;;GAEH,MAAM,mBAAmB,MAAM,KAAK;IAClC,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SACT,2BACA,EAAE,aAAa,EACf,MACA,IACD;;GAEH,MAAM,gBAAgB,KAAK;IACzB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;AAEtD,WAAO,IAAI,SAAS,wBAAwB,EAAE,aAAa,EAAE,IAAI;;GAEpE;EACF;EACD,CACH"}
package/dist/webpack.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('./chunk-AIJqnxB6.cjs');
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_unplugin = require('./unplugin.cjs');
4
4
  let unplugin = require("unplugin");
5
5
  let _powerlines_plugin_webpack = require("@powerlines/plugin-webpack");
6
- _powerlines_plugin_webpack = require_chunk.__toESM(_powerlines_plugin_webpack, 1);
6
+ _powerlines_plugin_webpack = require_runtime.__toESM(_powerlines_plugin_webpack, 1);
7
7
 
8
8
  //#region src/webpack.ts
9
9
  /**