@powerlines/core 0.2.22 → 0.3.0

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 (161) hide show
  1. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
  2. package/dist/constants/commands.d.cts.map +1 -1
  3. package/dist/constants/commands.d.mts.map +1 -1
  4. package/dist/constants/environments.d.cts.map +1 -1
  5. package/dist/constants/environments.d.mts.map +1 -1
  6. package/dist/constants/fs.d.cts.map +1 -1
  7. package/dist/constants/fs.d.mts.map +1 -1
  8. package/dist/constants/hooks.d.cts.map +1 -1
  9. package/dist/constants/hooks.d.mts.map +1 -1
  10. package/dist/constants/index.cjs +1 -0
  11. package/dist/constants/meta.d.cts.map +1 -1
  12. package/dist/constants/meta.d.mts.map +1 -1
  13. package/dist/constants/plugin.d.cts.map +1 -1
  14. package/dist/constants/plugin.d.mts.map +1 -1
  15. package/dist/index.cjs +1 -0
  16. package/dist/index.d.mts +0 -2
  17. package/dist/lib/config.cjs +18 -17
  18. package/dist/lib/config.d.cts.map +1 -1
  19. package/dist/lib/config.d.mts.map +1 -1
  20. package/dist/lib/config.mjs +3 -3
  21. package/dist/lib/config.mjs.map +1 -1
  22. package/dist/lib/entry.cjs +28 -27
  23. package/dist/lib/entry.d.cts.map +1 -1
  24. package/dist/lib/entry.d.mts +0 -1
  25. package/dist/lib/entry.d.mts.map +1 -1
  26. package/dist/lib/entry.mjs.map +1 -1
  27. package/dist/lib/index.cjs +1 -0
  28. package/dist/lib/index.d.mts +0 -2
  29. package/dist/lib/logger.cjs +14 -13
  30. package/dist/lib/logger.d.cts.map +1 -1
  31. package/dist/lib/logger.d.mts +0 -1
  32. package/dist/lib/logger.d.mts.map +1 -1
  33. package/dist/lib/unplugin/helpers.cjs +4 -3
  34. package/dist/lib/unplugin/helpers.d.cts +0 -1
  35. package/dist/lib/unplugin/helpers.d.cts.map +1 -1
  36. package/dist/lib/unplugin/helpers.d.mts +0 -1
  37. package/dist/lib/unplugin/helpers.d.mts.map +1 -1
  38. package/dist/lib/unplugin/helpers.mjs +2 -2
  39. package/dist/lib/unplugin/helpers.mjs.map +1 -1
  40. package/dist/lib/unplugin/index.cjs +1 -0
  41. package/dist/lib/unplugin/module-resolution.cjs +11 -10
  42. package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
  43. package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
  44. package/dist/lib/unplugin/plugin.cjs +14 -13
  45. package/dist/lib/unplugin/plugin.d.cts.map +1 -1
  46. package/dist/lib/unplugin/plugin.d.mts.map +1 -1
  47. package/dist/lib/unplugin/plugin.mjs.map +1 -1
  48. package/dist/lib/utilities/file-header.cjs +5 -4
  49. package/dist/lib/utilities/file-header.d.cts.map +1 -1
  50. package/dist/lib/utilities/file-header.d.mts.map +1 -1
  51. package/dist/lib/utilities/format.cjs +8 -7
  52. package/dist/lib/utilities/format.d.cts +0 -1
  53. package/dist/lib/utilities/format.d.cts.map +1 -1
  54. package/dist/lib/utilities/format.d.mts +0 -1
  55. package/dist/lib/utilities/format.d.mts.map +1 -1
  56. package/dist/lib/utilities/index.cjs +1 -0
  57. package/dist/lib/utilities/source-file.cjs +10 -9
  58. package/dist/lib/utilities/source-file.d.cts +0 -1
  59. package/dist/lib/utilities/source-file.d.cts.map +1 -1
  60. package/dist/lib/utilities/source-file.d.mts +0 -1
  61. package/dist/lib/utilities/source-file.d.mts.map +1 -1
  62. package/dist/lib/utilities/source-map.cjs +3 -2
  63. package/dist/lib/utilities/source-map.d.cts +0 -1
  64. package/dist/lib/utilities/source-map.d.cts.map +1 -1
  65. package/dist/lib/utilities/source-map.d.mts +0 -1
  66. package/dist/lib/utilities/source-map.d.mts.map +1 -1
  67. package/dist/lib/utilities/write-file.cjs +7 -6
  68. package/dist/lib/utilities/write-file.d.cts +0 -1
  69. package/dist/lib/utilities/write-file.d.cts.map +1 -1
  70. package/dist/lib/utilities/write-file.d.mts +0 -1
  71. package/dist/lib/utilities/write-file.d.mts.map +1 -1
  72. package/dist/plugin-base.cjs +8 -9
  73. package/dist/plugin-base.d.cts.map +1 -1
  74. package/dist/plugin-base.d.mts.map +1 -1
  75. package/dist/plugin-base.mjs +1 -2
  76. package/dist/plugin-base.mjs.map +1 -1
  77. package/dist/plugin-utils/build-helpers.cjs +12 -11
  78. package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
  79. package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
  80. package/dist/plugin-utils/combine-plugins.cjs +23 -0
  81. package/dist/plugin-utils/combine-plugins.d.cts +18 -0
  82. package/dist/plugin-utils/combine-plugins.d.cts.map +1 -0
  83. package/dist/plugin-utils/combine-plugins.d.mts +18 -0
  84. package/dist/plugin-utils/combine-plugins.d.mts.map +1 -0
  85. package/dist/plugin-utils/combine-plugins.mjs +22 -0
  86. package/dist/plugin-utils/combine-plugins.mjs.map +1 -0
  87. package/dist/plugin-utils/context-helpers.cjs +18 -17
  88. package/dist/plugin-utils/context-helpers.d.cts +0 -1
  89. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  90. package/dist/plugin-utils/context-helpers.d.mts +0 -1
  91. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  92. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  93. package/dist/plugin-utils/extend.cjs +12 -11
  94. package/dist/plugin-utils/extend.d.cts +0 -1
  95. package/dist/plugin-utils/extend.d.cts.map +1 -1
  96. package/dist/plugin-utils/extend.d.mts +0 -1
  97. package/dist/plugin-utils/extend.d.mts.map +1 -1
  98. package/dist/plugin-utils/format-package-json.cjs +6 -5
  99. package/dist/plugin-utils/format-package-json.d.cts +0 -1
  100. package/dist/plugin-utils/format-package-json.d.cts.map +1 -1
  101. package/dist/plugin-utils/format-package-json.d.mts +0 -1
  102. package/dist/plugin-utils/format-package-json.d.mts.map +1 -1
  103. package/dist/plugin-utils/get-config-path.cjs +35 -34
  104. package/dist/plugin-utils/get-config-path.d.cts +0 -1
  105. package/dist/plugin-utils/get-config-path.d.cts.map +1 -1
  106. package/dist/plugin-utils/get-config-path.d.mts +0 -1
  107. package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
  108. package/dist/plugin-utils/helpers.cjs +15 -14
  109. package/dist/plugin-utils/helpers.d.cts +10 -11
  110. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  111. package/dist/plugin-utils/helpers.d.mts +10 -11
  112. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  113. package/dist/plugin-utils/helpers.mjs.map +1 -1
  114. package/dist/plugin-utils/index.cjs +3 -0
  115. package/dist/plugin-utils/index.d.cts +2 -1
  116. package/dist/plugin-utils/index.d.mts +2 -1
  117. package/dist/plugin-utils/index.mjs +2 -1
  118. package/dist/plugin-utils/merge.cjs +7 -6
  119. package/dist/plugin-utils/merge.d.cts.map +1 -1
  120. package/dist/plugin-utils/merge.d.mts +0 -2
  121. package/dist/plugin-utils/merge.d.mts.map +1 -1
  122. package/dist/plugin-utils/merge.mjs +2 -2
  123. package/dist/plugin-utils/merge.mjs.map +1 -1
  124. package/dist/plugin-utils/modules.cjs +1 -0
  125. package/dist/plugin-utils/modules.d.cts +0 -1
  126. package/dist/plugin-utils/modules.d.cts.map +1 -1
  127. package/dist/plugin-utils/modules.d.mts +0 -1
  128. package/dist/plugin-utils/modules.d.mts.map +1 -1
  129. package/dist/plugin-utils/modules.mjs.map +1 -1
  130. package/dist/plugin-utils/paths.cjs +5 -4
  131. package/dist/plugin-utils/paths.d.cts +0 -1
  132. package/dist/plugin-utils/paths.d.cts.map +1 -1
  133. package/dist/plugin-utils/paths.d.mts +0 -1
  134. package/dist/plugin-utils/paths.d.mts.map +1 -1
  135. package/dist/types/_internal.d.cts +0 -1
  136. package/dist/types/_internal.d.cts.map +1 -1
  137. package/dist/types/_internal.d.mts +0 -1
  138. package/dist/types/_internal.d.mts.map +1 -1
  139. package/dist/types/api.d.cts +0 -1
  140. package/dist/types/api.d.cts.map +1 -1
  141. package/dist/types/api.d.mts +0 -1
  142. package/dist/types/api.d.mts.map +1 -1
  143. package/dist/types/commands.d.cts.map +1 -1
  144. package/dist/types/commands.d.mts.map +1 -1
  145. package/dist/types/config.d.cts.map +1 -1
  146. package/dist/types/config.d.mts.map +1 -1
  147. package/dist/types/context.d.cts.map +1 -1
  148. package/dist/types/context.d.mts.map +1 -1
  149. package/dist/types/fs.d.cts.map +1 -1
  150. package/dist/types/fs.d.mts.map +1 -1
  151. package/dist/types/hooks.d.cts +10 -10
  152. package/dist/types/hooks.d.cts.map +1 -1
  153. package/dist/types/hooks.d.mts +10 -10
  154. package/dist/types/hooks.d.mts.map +1 -1
  155. package/dist/types/plugin.d.cts.map +1 -1
  156. package/dist/types/plugin.d.mts.map +1 -1
  157. package/dist/types/tsconfig.d.cts.map +1 -1
  158. package/dist/types/tsconfig.d.mts.map +1 -1
  159. package/dist/types/unplugin.d.cts.map +1 -1
  160. package/dist/types/unplugin.d.mts.map +1 -1
  161. package/package.json +7 -5
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.cts","names":[],"sources":["../../src/lib/logger.ts"],"sourcesContent":[],"mappings":";;;;UA2BiB,gBAAA;;EAAA,QAAA,CAAA,EAEJ,aAFoB,GAAA,IAAA;EAEpB,YAAA,CAAA,EACI,KADJ;EACI,MAAA,CAAA,EACN,eADM,CAAA,QAAA,CAAA;;;AAWjB;AAsDA;;;;;cAtDa,2CAEF,qBACR;cAmDU,mBAAoB,wBAAsB"}
1
+ {"version":3,"file":"logger.d.cts","names":[],"sources":["../../src/lib/logger.ts"],"mappings":";;;;UA2BiB,gBAAA;EACf,IAAA;EACA,QAAA,GAAW,aAAA;EACX,YAAA,GAAe,KAAA;EACf,MAAA,GAAS,eAAA;AAAA;;;;;;;;cAUE,SAAA,GACX,IAAA,iBACA,OAAA,GAAS,gBAAA,KACR,KAAA;AAAA,cAmDU,SAAA,GAAa,KAAA,EAAO,KAAA,EAAO,IAAA,aAAe,KAAA;AAAA"}
@@ -1,5 +1,4 @@
1
1
  import { LogFn, WorkspaceConfig } from "../types/config.mjs";
2
- import "../types/index.mjs";
3
2
  import { LogLevelLabel } from "@storm-software/config-tools/types";
4
3
 
5
4
  //#region src/lib/logger.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.mts","names":[],"sources":["../../src/lib/logger.ts"],"sourcesContent":[],"mappings":";;;;;UA2BiB,gBAAA;;aAEJ;EAFI,YAAA,CAAA,EAGA,KAHgB;EAEpB,MAAA,CAAA,EAEF,eAFE,CAAA,QAAA,CAAA;;;;AAYb;AAsDA;;;;cAtDa,2CAEF,qBACR;cAmDU,mBAAoB,wBAAsB"}
1
+ {"version":3,"file":"logger.d.mts","names":[],"sources":["../../src/lib/logger.ts"],"mappings":";;;;UA2BiB,gBAAA;EACf,IAAA;EACA,QAAA,GAAW,aAAA;EACX,YAAA,GAAe,KAAA;EACf,MAAA,GAAS,eAAA;AAAA;;;;;;;;cAUE,SAAA,GACX,IAAA,iBACA,OAAA,GAAS,gBAAA,KACR,KAAA;AAAA,cAmDU,SAAA,GAAa,KAAA,EAAO,KAAA,EAAO,IAAA,aAAe,KAAA;AAAA"}
@@ -1,7 +1,8 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
3
  const require_plugin = require('../../constants/plugin.cjs');
3
4
  let defu = require("defu");
4
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
5
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
5
6
 
6
7
  //#region src/lib/unplugin/helpers.ts
7
8
  /**
@@ -21,7 +22,7 @@ function combineContexts(contextA, contextB) {
21
22
  * @returns True if the value is a UnpluginBuilderVariant, false otherwise.
22
23
  */
23
24
  function isUnpluginBuilderVariant(str) {
24
- return (0, __stryke_type_checks_is_set_string.isSetString)(str) && require_plugin.UNPLUGIN_BUILDER_VARIANTS.includes(str);
25
+ return (0, _stryke_type_checks_is_set_string.isSetString)(str) && require_plugin.UNPLUGIN_BUILDER_VARIANTS.includes(str);
25
26
  }
26
27
 
27
28
  //#endregion
@@ -3,7 +3,6 @@ import { UnresolvedContext } from "../../types/context.cjs";
3
3
  import { UnpluginBuildContext } from "unplugin";
4
4
 
5
5
  //#region src/lib/unplugin/helpers.d.ts
6
-
7
6
  /**
8
7
  * Merges a base plugin context with an unplugin context, combining their properties.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.cts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAgCA;;;;;AAGY,iBAHI,eAGJ,CAAA,kBAFQ,iBAER,GAF4B,oBAE5B,EAAA,kBADQ,iBACR,GAD4B,oBAC5B,CAAA,CAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAqB,SAArB,CAAA,EAAiC,SAAjC,GAA6C,SAA7C;;;;;AAUZ;;iBAAgB,wBAAA,uBAEN"}
1
+ {"version":3,"file":"helpers.d.cts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"mappings":";;;;;;;AAgCA;;;;;iBAAgB,eAAA,mBACI,iBAAA,GAAoB,oBAAA,oBACpB,iBAAA,GAAoB,oBAAA,CAAA,CACtC,QAAA,EAAU,SAAA,EAAW,QAAA,EAAU,SAAA,GAAY,SAAA,GAAY,SAAA;;;;;;;iBAUzC,wBAAA,CACd,GAAA,YACC,GAAA,IAAO,sBAAA"}
@@ -3,7 +3,6 @@ import { UnresolvedContext } from "../../types/context.mjs";
3
3
  import { UnpluginBuildContext } from "unplugin";
4
4
 
5
5
  //#region src/lib/unplugin/helpers.d.ts
6
-
7
6
  /**
8
7
  * Merges a base plugin context with an unplugin context, combining their properties.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAgCA;;;;;AAGY,iBAHI,eAGJ,CAAA,kBAFQ,iBAER,GAF4B,oBAE5B,EAAA,kBADQ,iBACR,GAD4B,oBAC5B,CAAA,CAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAqB,SAArB,CAAA,EAAiC,SAAjC,GAA6C,SAA7C;;;;;AAUZ;;iBAAgB,wBAAA,uBAEN"}
1
+ {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../src/lib/unplugin/helpers.ts"],"mappings":";;;;;;;AAgCA;;;;;iBAAgB,eAAA,mBACI,iBAAA,GAAoB,oBAAA,oBACpB,iBAAA,GAAoB,oBAAA,CAAA,CACtC,QAAA,EAAU,SAAA,EAAW,QAAA,EAAU,SAAA,GAAY,SAAA,GAAY,SAAA;;;;;;;iBAUzC,wBAAA,CACd,GAAA,YACC,GAAA,IAAO,sBAAA"}
@@ -1,5 +1,5 @@
1
1
  import { UNPLUGIN_BUILDER_VARIANTS } from "../../constants/plugin.mjs";
2
- import { defu } from "defu";
2
+ import { defu as defu$1 } from "defu";
3
3
  import { isSetString } from "@stryke/type-checks/is-set-string";
4
4
 
5
5
  //#region src/lib/unplugin/helpers.ts
@@ -11,7 +11,7 @@ import { isSetString } from "@stryke/type-checks/is-set-string";
11
11
  * @returns The merged context.
12
12
  */
13
13
  function combineContexts(contextA, contextB) {
14
- return defu(contextA, contextB);
14
+ return defu$1(contextA, contextB);
15
15
  }
16
16
  /**
17
17
  * Checks if a value is a valid UnpluginBuilderVariant.
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.mjs","names":[],"sources":["../../../src/lib/unplugin/helpers.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 { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { defu } from \"defu\";\nimport type { UnpluginBuildContext } from \"unplugin\";\nimport { UNPLUGIN_BUILDER_VARIANTS } from \"../../constants/plugin\";\nimport type { UnresolvedContext } from \"../../types/context\";\nimport type { UnpluginBuilderVariant } from \"../../types/unplugin\";\n\n/**\n * Merges a base plugin context with an unplugin context, combining their properties.\n *\n * @param contextA - The base plugin context to merge into.\n * @param contextB - The unplugin context to merge from.\n * @returns The merged context.\n */\nexport function combineContexts<\n TContextA extends UnresolvedContext | UnpluginBuildContext,\n TContextB extends UnresolvedContext | UnpluginBuildContext\n>(contextA: TContextA, contextB: TContextB): TContextA & TContextB {\n return defu(contextA, contextB) as TContextA & TContextB;\n}\n\n/**\n * Checks if a value is a valid UnpluginBuilderVariant.\n *\n * @param str - The value to check.\n * @returns True if the value is a UnpluginBuilderVariant, false otherwise.\n */\nexport function isUnpluginBuilderVariant(\n str: unknown\n): str is UnpluginBuilderVariant {\n return (\n isSetString(str) &&\n UNPLUGIN_BUILDER_VARIANTS.includes(str as UnpluginBuilderVariant)\n );\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,SAAgB,gBAGd,UAAqB,UAA4C;AACjE,QAAO,KAAK,UAAU,SAAS;;;;;;;;AASjC,SAAgB,yBACd,KAC+B;AAC/B,QACE,YAAY,IAAI,IAChB,0BAA0B,SAAS,IAA8B"}
1
+ {"version":3,"file":"helpers.mjs","names":["defu"],"sources":["../../../src/lib/unplugin/helpers.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 { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { defu } from \"defu\";\nimport type { UnpluginBuildContext } from \"unplugin\";\nimport { UNPLUGIN_BUILDER_VARIANTS } from \"../../constants/plugin\";\nimport type { UnresolvedContext } from \"../../types/context\";\nimport type { UnpluginBuilderVariant } from \"../../types/unplugin\";\n\n/**\n * Merges a base plugin context with an unplugin context, combining their properties.\n *\n * @param contextA - The base plugin context to merge into.\n * @param contextB - The unplugin context to merge from.\n * @returns The merged context.\n */\nexport function combineContexts<\n TContextA extends UnresolvedContext | UnpluginBuildContext,\n TContextB extends UnresolvedContext | UnpluginBuildContext\n>(contextA: TContextA, contextB: TContextB): TContextA & TContextB {\n return defu(contextA, contextB) as TContextA & TContextB;\n}\n\n/**\n * Checks if a value is a valid UnpluginBuilderVariant.\n *\n * @param str - The value to check.\n * @returns True if the value is a UnpluginBuilderVariant, false otherwise.\n */\nexport function isUnpluginBuilderVariant(\n str: unknown\n): str is UnpluginBuilderVariant {\n return (\n isSetString(str) &&\n UNPLUGIN_BUILDER_VARIANTS.includes(str as UnpluginBuilderVariant)\n );\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,SAAgB,gBAGd,UAAqB,UAA4C;AACjE,QAAOA,OAAK,UAAU,SAAS;;;;;;;;AASjC,SAAgB,yBACd,KAC+B;AAC/B,QACE,YAAY,IAAI,IAChB,0BAA0B,SAAS,IAA8B"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_lib_unplugin_helpers = require('./helpers.cjs');
2
3
  const require_lib_unplugin_module_resolution = require('./module-resolution.cjs');
3
4
  const require_lib_unplugin_plugin = require('./plugin.cjs');
@@ -1,6 +1,7 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
3
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
4
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
4
5
 
5
6
  //#region src/lib/unplugin/module-resolution.ts
6
7
  const VIRTUAL_MODULE_PREFIX = "__powerlines-virtual:";
@@ -29,8 +30,8 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
29
30
  result: "first",
30
31
  order: "pre"
31
32
  }, normalizedId, normalizedImporter, opts);
32
- if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return result;
33
- else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
33
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(result)) return result;
34
+ else if ((0, _stryke_type_checks_is_set_object.isSetObject)(result)) return {
34
35
  ...result,
35
36
  id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
36
37
  };
@@ -39,8 +40,8 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
39
40
  result: "first",
40
41
  order: "normal"
41
42
  }, normalizedId, normalizedImporter, opts);
42
- if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return result;
43
- else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
43
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(result)) return result;
44
+ else if ((0, _stryke_type_checks_is_set_object.isSetObject)(result)) return {
44
45
  ...result,
45
46
  id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
46
47
  };
@@ -48,7 +49,7 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
48
49
  isFile: true,
49
50
  ...opts
50
51
  });
51
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
52
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(result)) return {
52
53
  ...result,
53
54
  id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
54
55
  };
@@ -57,8 +58,8 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
57
58
  result: "first",
58
59
  order: "post"
59
60
  }, normalizedId, normalizedImporter, opts);
60
- if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return result;
61
- else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
61
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(result)) return result;
62
+ else if ((0, _stryke_type_checks_is_set_object.isSetObject)(result)) return {
62
63
  ...result,
63
64
  id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
64
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"module-resolution.d.cts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":[],"mappings":";;;;UA6BiB,8CAAA;;AAAjB;AA6BA;;;;;;;EAKO,MAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;iBALS,yDACG,gBAAgB,wBAExB,oBACA,iDACR,KAAK"}
1
+ {"version":3,"file":"module-resolution.d.cts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"mappings":";;;;UA6BiB,8CAAA;;AAAjB;;;;;AA6BA;;;EAnBE,MAAA;AAAA;;;;;;;;;;;;;;iBAmBc,uCAAA,kBACG,aAAA,GAAgB,aAAA,CAAA,CAEjC,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,8CAAA,GACR,IAAA,CAAK,eAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"module-resolution.d.mts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"sourcesContent":[],"mappings":";;;;UA6BiB,8CAAA;;AAAjB;AA6BA;;;;;;;EAKO,MAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;iBALS,yDACG,gBAAgB,wBAExB,oBACA,iDACR,KAAK"}
1
+ {"version":3,"file":"module-resolution.d.mts","names":[],"sources":["../../../src/lib/unplugin/module-resolution.ts"],"mappings":";;;;UA6BiB,8CAAA;;AAAjB;;;;;AA6BA;;;EAnBE,MAAA;AAAA;;;;;;;;;;;;;;iBAmBc,uCAAA,kBACG,aAAA,GAAgB,aAAA,CAAA,CAEjC,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,8CAAA,GACR,IAAA,CAAK,eAAA;AAAA"}
@@ -1,11 +1,12 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
3
  const require_lib_logger = require('../logger.cjs');
3
4
  const require_lib_unplugin_helpers = require('./helpers.cjs');
4
5
  const require_lib_unplugin_module_resolution = require('./module-resolution.cjs');
5
6
  const require_lib_utilities_source_file = require('../utilities/source-file.cjs');
6
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
7
- let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
8
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
7
+ let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
8
+ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
9
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
10
  let unplugin = require("unplugin");
10
11
 
11
12
  //#region src/lib/unplugin/plugin.ts
@@ -21,17 +22,17 @@ function createUnpluginResolver(context, options = {}) {
21
22
  const name = options.name || "unplugin";
22
23
  return () => {
23
24
  const log = require_lib_logger.extendLog(ctx.log, name);
24
- log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${(0, __stryke_string_format_title_case.titleCase)(name)} - Unplugin`} plugin`);
25
+ log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${(0, _stryke_string_format_title_case.titleCase)(name)} - Unplugin`} plugin`);
25
26
  try {
26
27
  const { resolveId, load } = require_lib_unplugin_module_resolution.createUnpluginModuleResolutionFunctions(context, options);
27
28
  return {
28
- name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${(0, __stryke_string_format_kebab_case.kebabCase)(name)}`,
29
+ name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${(0, _stryke_string_format_kebab_case.kebabCase)(name)}`,
29
30
  api: ctx.$$internal.api,
30
31
  resolveId,
31
32
  load
32
33
  };
33
34
  } catch (error) {
34
- log(__storm_software_config_tools_types.LogLevelLabel.FATAL, error?.message);
35
+ log(_storm_software_config_tools_types.LogLevelLabel.FATAL, error?.message);
35
36
  throw error;
36
37
  }
37
38
  };
@@ -48,11 +49,11 @@ function createUnplugin(context, options = {}) {
48
49
  const name = options.name || "unplugin";
49
50
  return () => {
50
51
  const log = require_lib_logger.extendLog(ctx.log, name);
51
- log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${(0, __stryke_string_format_title_case.titleCase)(name)} - Unplugin`} plugin`);
52
+ log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${(0, _stryke_string_format_title_case.titleCase)(name)} - Unplugin`} plugin`);
52
53
  try {
53
54
  const { resolveId, load } = require_lib_unplugin_module_resolution.createUnpluginModuleResolutionFunctions(context, options);
54
55
  async function buildStart() {
55
- log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
56
+ log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
56
57
  await ctx.$$internal.callHook("buildStart", { sequential: true });
57
58
  }
58
59
  async function transform(code, id) {
@@ -64,15 +65,15 @@ function createUnplugin(context, options = {}) {
64
65
  return transformed;
65
66
  }
66
67
  async function buildEnd() {
67
- log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, "Powerlines build plugin finishing...");
68
+ log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, "Powerlines build plugin finishing...");
68
69
  return ctx.$$internal.callHook("buildEnd", { sequential: true });
69
70
  }
70
71
  async function writeBundle() {
71
- log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, "Finalizing Powerlines project output...");
72
+ log(_storm_software_config_tools_types.LogLevelLabel.DEBUG, "Finalizing Powerlines project output...");
72
73
  return ctx.$$internal.callHook("writeBundle", { sequential: true });
73
74
  }
74
75
  return {
75
- name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${(0, __stryke_string_format_kebab_case.kebabCase)(name)}`,
76
+ name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${(0, _stryke_string_format_kebab_case.kebabCase)(name)}`,
76
77
  api: ctx.$$internal.api,
77
78
  resolveId,
78
79
  load,
@@ -83,7 +84,7 @@ function createUnplugin(context, options = {}) {
83
84
  vite: { sharedDuringBuild: true }
84
85
  };
85
86
  } catch (error) {
86
- log(__storm_software_config_tools_types.LogLevelLabel.FATAL, error?.message);
87
+ log(_storm_software_config_tools_types.LogLevelLabel.FATAL, error?.message);
87
88
  throw error;
88
89
  }
89
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../../src/lib/unplugin/plugin.ts"],"sourcesContent":[],"mappings":";;;;;UAsCiB,6BAAA,SAAsC;;AAAvD;AAkBA;;;;;;EAKG,IAAA,CAAA,EAAA,MAAA;;AAsCH;AAQA;;;;;AAGmB,iBAtDH,sBAsDG,CAAA,iBArDA,aAqDA,GArDgB,aAqDhB,CAAA,CAAA,OAAA,EAnDR,QAmDQ,EAAA,OAAA,CAAA,EAlDR,6BAkDQ,CAAA,EAjDhB,eAiDgB,CAjDA,QAiDA,CAAA;AAAhB,UAXc,qBAAA,SAA8B,6BAW5C,CAAA;;;;;;;iBAHa,gCAAgC,gBAAgB,wBACrD,oBACA,wBACR,gBAAgB"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../../src/lib/unplugin/plugin.ts"],"mappings":";;;;;UAsCiB,6BAAA,SAAsC,8CAAA;;AAAvD;;;;;AAkBA;;EATE,IAAA;AAAA;;;;;;;iBASc,sBAAA,kBACG,aAAA,GAAgB,aAAA,CAAA,CAEjC,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,6BAAA,GACR,eAAA,CAAgB,QAAA;AAAA,UAsCF,qBAAA,SAA8B,6BAAA;;;;;;;iBAQ/B,cAAA,kBAAgC,aAAA,GAAgB,aAAA,CAAA,CAC9D,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,qBAAA,GACR,eAAA,CAAgB,QAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../../src/lib/unplugin/plugin.ts"],"sourcesContent":[],"mappings":";;;;;UAsCiB,6BAAA,SAAsC;;AAAvD;AAkBA;;;;;;EAKG,IAAA,CAAA,EAAA,MAAA;;AAsCH;AAQA;;;;;AAGmB,iBAtDH,sBAsDG,CAAA,iBArDA,aAqDA,GArDgB,aAqDhB,CAAA,CAAA,OAAA,EAnDR,QAmDQ,EAAA,OAAA,CAAA,EAlDR,6BAkDQ,CAAA,EAjDhB,eAiDgB,CAjDA,QAiDA,CAAA;AAAhB,UAXc,qBAAA,SAA8B,6BAW5C,CAAA;;;;;;;iBAHa,gCAAgC,gBAAgB,wBACrD,oBACA,wBACR,gBAAgB"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../../src/lib/unplugin/plugin.ts"],"mappings":";;;;;UAsCiB,6BAAA,SAAsC,8CAAA;;AAAvD;;;;;AAkBA;;EATE,IAAA;AAAA;;;;;;;iBASc,sBAAA,kBACG,aAAA,GAAgB,aAAA,CAAA,CAEjC,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,6BAAA,GACR,eAAA,CAAgB,QAAA;AAAA,UAsCF,qBAAA,SAA8B,6BAAA;;;;;;;iBAQ/B,cAAA,kBAAgC,aAAA,GAAgB,aAAA,CAAA,CAC9D,OAAA,EAAS,QAAA,EACT,OAAA,GAAS,qBAAA,GACR,eAAA,CAAgB,QAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","names":["transformed: TransformResult | string","result: TransformResult | string | undefined"],"sources":["../../../src/lib/unplugin/plugin.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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport type {\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { UNSAFE_PluginContext } from \"../../types/_internal\";\nimport { PluginContext } from \"../../types/context\";\nimport { UnpluginFactory } from \"../../types/unplugin\";\nimport { extendLog } from \"../logger\";\nimport { getString } from \"../utilities/source-file\";\nimport { combineContexts } from \"./helpers\";\nimport {\n createUnpluginModuleResolutionFunctions,\n CreateUnpluginModuleResolutionFunctionsOptions\n} from \"./module-resolution\";\n\nexport interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.\n *\n * @remarks\n * If not provided, the plugin will be named \"unplugin\". If provided, the plugin will be named `${name} - Unplugin` (e.g., \"MyPlugin - Unplugin\").\n *\n * @defaultValue \"unplugin\"\n */\n name?: string;\n}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnpluginResolver<\n TContext extends PluginContext = PluginContext\n>(\n context: TContext,\n options: CreateUnpluginResolverOptions = {}\n): UnpluginFactory<TContext> {\n const ctx = context as unknown as UNSAFE_PluginContext;\n setParseImpl(ctx.parse);\n\n const name = options.name || \"unplugin\";\n\n return () => {\n const log = extendLog(ctx.log, name);\n log(\n LogLevelLabel.DEBUG,\n `Initializing ${\n name.toLowerCase() === \"unplugin\"\n ? \"Unplugin\"\n : `${titleCase(name)} - Unplugin`\n } plugin`\n );\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n return {\n name:\n name.toLowerCase() === \"unplugin\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n api: ctx.$$internal.api,\n resolveId,\n load\n };\n } catch (error) {\n log(LogLevelLabel.FATAL, (error as Error)?.message);\n\n throw error;\n }\n };\n}\n\nexport interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnplugin<TContext extends PluginContext = PluginContext>(\n context: TContext,\n options: CreateUnpluginOptions = {}\n): UnpluginFactory<TContext> {\n const ctx = context as unknown as UNSAFE_PluginContext;\n setParseImpl(ctx.parse);\n\n const name = options.name || \"unplugin\";\n\n return () => {\n const log = extendLog(ctx.log, name);\n log(\n LogLevelLabel.DEBUG,\n `Initializing ${\n name.toLowerCase() === \"unplugin\"\n ? \"Unplugin\"\n : `${titleCase(name)} - Unplugin`\n } plugin`\n );\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n async function buildStart(this: UnpluginBuildContext) {\n log(LogLevelLabel.DEBUG, \"Powerlines build plugin starting...\");\n\n await ctx.$$internal.callHook(\"buildStart\", {\n sequential: true\n });\n }\n\n async function transform(\n this: UnpluginBuildContext & UnpluginContext,\n code: string,\n id: string\n ): Promise<TransformResult | null | undefined> {\n let transformed: TransformResult | string = code;\n\n for (const hook of ctx.$$internal.environment.selectHooks(\n \"transform\"\n )) {\n const result: TransformResult | string | undefined =\n await hook.handler.apply(combineContexts(ctx, this), [\n getString(transformed),\n id\n ]);\n if (result) {\n transformed = result;\n }\n }\n\n return transformed;\n }\n\n async function buildEnd(this: UnpluginBuildContext): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Powerlines build plugin finishing...\");\n\n return ctx.$$internal.callHook(\"buildEnd\", {\n sequential: true\n });\n }\n\n async function writeBundle(): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Finalizing Powerlines project output...\");\n\n return ctx.$$internal.callHook(\"writeBundle\", {\n sequential: true\n });\n }\n\n return {\n name:\n name.toLowerCase() === \"unplugin\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n api: ctx.$$internal.api,\n resolveId,\n load,\n transform,\n buildStart,\n buildEnd,\n writeBundle,\n vite: {\n sharedDuringBuild: true\n }\n };\n } catch (error) {\n log(LogLevelLabel.FATAL, (error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwDA,SAAgB,uBAGd,SACA,UAAyC,EAAE,EAChB;CAC3B,MAAM,MAAM;AACZ,cAAa,IAAI,MAAM;CAEvB,MAAM,OAAO,QAAQ,QAAQ;AAE7B,cAAa;EACX,MAAM,MAAM,UAAU,IAAI,KAAK,KAAK;AACpC,MACE,cAAc,OACd,gBACE,KAAK,aAAa,KAAK,aACnB,aACA,GAAG,UAAU,KAAK,CAAC,aACxB,SACF;AAED,MAAI;GACF,MAAM,EAAE,WAAW,SACjB,wCAAkD,SAAS,QAAQ;AAErE,UAAO;IACL,MACE,KAAK,aAAa,KAAK,aACnB,eACA,cAAc,UAAU,KAAK;IACnC,KAAK,IAAI,WAAW;IACpB;IACA;IACD;WACM,OAAO;AACd,OAAI,cAAc,OAAQ,OAAiB,QAAQ;AAEnD,SAAM;;;;;;;;;;AAaZ,SAAgB,eACd,SACA,UAAiC,EAAE,EACR;CAC3B,MAAM,MAAM;AACZ,cAAa,IAAI,MAAM;CAEvB,MAAM,OAAO,QAAQ,QAAQ;AAE7B,cAAa;EACX,MAAM,MAAM,UAAU,IAAI,KAAK,KAAK;AACpC,MACE,cAAc,OACd,gBACE,KAAK,aAAa,KAAK,aACnB,aACA,GAAG,UAAU,KAAK,CAAC,aACxB,SACF;AAED,MAAI;GACF,MAAM,EAAE,WAAW,SACjB,wCAAkD,SAAS,QAAQ;GAErE,eAAe,aAAuC;AACpD,QAAI,cAAc,OAAO,sCAAsC;AAE/D,UAAM,IAAI,WAAW,SAAS,cAAc,EAC1C,YAAY,MACb,CAAC;;GAGJ,eAAe,UAEb,MACA,IAC6C;IAC7C,IAAIA,cAAwC;AAE5C,SAAK,MAAM,QAAQ,IAAI,WAAW,YAAY,YAC5C,YACD,EAAE;KACD,MAAMC,SACJ,MAAM,KAAK,QAAQ,MAAM,gBAAgB,KAAK,KAAK,EAAE,CACnD,UAAU,YAAY,EACtB,GACD,CAAC;AACJ,SAAI,OACF,eAAc;;AAIlB,WAAO;;GAGT,eAAe,WAAoD;AACjE,QAAI,cAAc,OAAO,uCAAuC;AAEhE,WAAO,IAAI,WAAW,SAAS,YAAY,EACzC,YAAY,MACb,CAAC;;GAGJ,eAAe,cAA6B;AAC1C,QAAI,cAAc,OAAO,0CAA0C;AAEnE,WAAO,IAAI,WAAW,SAAS,eAAe,EAC5C,YAAY,MACb,CAAC;;AAGJ,UAAO;IACL,MACE,KAAK,aAAa,KAAK,aACnB,eACA,cAAc,UAAU,KAAK;IACnC,KAAK,IAAI,WAAW;IACpB;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,EACJ,mBAAmB,MACpB;IACF;WACM,OAAO;AACd,OAAI,cAAc,OAAQ,OAAiB,QAAQ;AAEnD,SAAM"}
1
+ {"version":3,"file":"plugin.mjs","names":[],"sources":["../../../src/lib/unplugin/plugin.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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport type {\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { UNSAFE_PluginContext } from \"../../types/_internal\";\nimport { PluginContext } from \"../../types/context\";\nimport { UnpluginFactory } from \"../../types/unplugin\";\nimport { extendLog } from \"../logger\";\nimport { getString } from \"../utilities/source-file\";\nimport { combineContexts } from \"./helpers\";\nimport {\n createUnpluginModuleResolutionFunctions,\n CreateUnpluginModuleResolutionFunctionsOptions\n} from \"./module-resolution\";\n\nexport interface CreateUnpluginResolverOptions extends CreateUnpluginModuleResolutionFunctionsOptions {\n /**\n * A name to use for the unplugin instance. This is used for logging and to generate the plugin name. It does not affect the functionality of the plugin.\n *\n * @remarks\n * If not provided, the plugin will be named \"unplugin\". If provided, the plugin will be named `${name} - Unplugin` (e.g., \"MyPlugin - Unplugin\").\n *\n * @defaultValue \"unplugin\"\n */\n name?: string;\n}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnpluginResolver<\n TContext extends PluginContext = PluginContext\n>(\n context: TContext,\n options: CreateUnpluginResolverOptions = {}\n): UnpluginFactory<TContext> {\n const ctx = context as unknown as UNSAFE_PluginContext;\n setParseImpl(ctx.parse);\n\n const name = options.name || \"unplugin\";\n\n return () => {\n const log = extendLog(ctx.log, name);\n log(\n LogLevelLabel.DEBUG,\n `Initializing ${\n name.toLowerCase() === \"unplugin\"\n ? \"Unplugin\"\n : `${titleCase(name)} - Unplugin`\n } plugin`\n );\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n return {\n name:\n name.toLowerCase() === \"unplugin\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n api: ctx.$$internal.api,\n resolveId,\n load\n };\n } catch (error) {\n log(LogLevelLabel.FATAL, (error as Error)?.message);\n\n throw error;\n }\n };\n}\n\nexport interface CreateUnpluginOptions extends CreateUnpluginResolverOptions {}\n\n/**\n * Creates a Powerlines unplugin instance.\n *\n * @param context - The plugin context.\n * @returns The unplugin instance.\n */\nexport function createUnplugin<TContext extends PluginContext = PluginContext>(\n context: TContext,\n options: CreateUnpluginOptions = {}\n): UnpluginFactory<TContext> {\n const ctx = context as unknown as UNSAFE_PluginContext;\n setParseImpl(ctx.parse);\n\n const name = options.name || \"unplugin\";\n\n return () => {\n const log = extendLog(ctx.log, name);\n log(\n LogLevelLabel.DEBUG,\n `Initializing ${\n name.toLowerCase() === \"unplugin\"\n ? \"Unplugin\"\n : `${titleCase(name)} - Unplugin`\n } plugin`\n );\n\n try {\n const { resolveId, load } =\n createUnpluginModuleResolutionFunctions<TContext>(context, options);\n\n async function buildStart(this: UnpluginBuildContext) {\n log(LogLevelLabel.DEBUG, \"Powerlines build plugin starting...\");\n\n await ctx.$$internal.callHook(\"buildStart\", {\n sequential: true\n });\n }\n\n async function transform(\n this: UnpluginBuildContext & UnpluginContext,\n code: string,\n id: string\n ): Promise<TransformResult | null | undefined> {\n let transformed: TransformResult | string = code;\n\n for (const hook of ctx.$$internal.environment.selectHooks(\n \"transform\"\n )) {\n const result: TransformResult | string | undefined =\n await hook.handler.apply(combineContexts(ctx, this), [\n getString(transformed),\n id\n ]);\n if (result) {\n transformed = result;\n }\n }\n\n return transformed;\n }\n\n async function buildEnd(this: UnpluginBuildContext): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Powerlines build plugin finishing...\");\n\n return ctx.$$internal.callHook(\"buildEnd\", {\n sequential: true\n });\n }\n\n async function writeBundle(): Promise<void> {\n log(LogLevelLabel.DEBUG, \"Finalizing Powerlines project output...\");\n\n return ctx.$$internal.callHook(\"writeBundle\", {\n sequential: true\n });\n }\n\n return {\n name:\n name.toLowerCase() === \"unplugin\"\n ? \"powerlines\"\n : `powerlines:${kebabCase(name)}`,\n api: ctx.$$internal.api,\n resolveId,\n load,\n transform,\n buildStart,\n buildEnd,\n writeBundle,\n vite: {\n sharedDuringBuild: true\n }\n };\n } catch (error) {\n log(LogLevelLabel.FATAL, (error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwDA,SAAgB,uBAGd,SACA,UAAyC,EAAE,EAChB;CAC3B,MAAM,MAAM;AACZ,cAAa,IAAI,MAAM;CAEvB,MAAM,OAAO,QAAQ,QAAQ;AAE7B,cAAa;EACX,MAAM,MAAM,UAAU,IAAI,KAAK,KAAK;AACpC,MACE,cAAc,OACd,gBACE,KAAK,aAAa,KAAK,aACnB,aACA,GAAG,UAAU,KAAK,CAAC,aACxB,SACF;AAED,MAAI;GACF,MAAM,EAAE,WAAW,SACjB,wCAAkD,SAAS,QAAQ;AAErE,UAAO;IACL,MACE,KAAK,aAAa,KAAK,aACnB,eACA,cAAc,UAAU,KAAK;IACnC,KAAK,IAAI,WAAW;IACpB;IACA;IACD;WACM,OAAO;AACd,OAAI,cAAc,OAAQ,OAAiB,QAAQ;AAEnD,SAAM;;;;;;;;;;AAaZ,SAAgB,eACd,SACA,UAAiC,EAAE,EACR;CAC3B,MAAM,MAAM;AACZ,cAAa,IAAI,MAAM;CAEvB,MAAM,OAAO,QAAQ,QAAQ;AAE7B,cAAa;EACX,MAAM,MAAM,UAAU,IAAI,KAAK,KAAK;AACpC,MACE,cAAc,OACd,gBACE,KAAK,aAAa,KAAK,aACnB,aACA,GAAG,UAAU,KAAK,CAAC,aACxB,SACF;AAED,MAAI;GACF,MAAM,EAAE,WAAW,SACjB,wCAAkD,SAAS,QAAQ;GAErE,eAAe,aAAuC;AACpD,QAAI,cAAc,OAAO,sCAAsC;AAE/D,UAAM,IAAI,WAAW,SAAS,cAAc,EAC1C,YAAY,MACb,CAAC;;GAGJ,eAAe,UAEb,MACA,IAC6C;IAC7C,IAAI,cAAwC;AAE5C,SAAK,MAAM,QAAQ,IAAI,WAAW,YAAY,YAC5C,YACD,EAAE;KACD,MAAM,SACJ,MAAM,KAAK,QAAQ,MAAM,gBAAgB,KAAK,KAAK,EAAE,CACnD,UAAU,YAAY,EACtB,GACD,CAAC;AACJ,SAAI,OACF,eAAc;;AAIlB,WAAO;;GAGT,eAAe,WAAoD;AACjE,QAAI,cAAc,OAAO,uCAAuC;AAEhE,WAAO,IAAI,WAAW,SAAS,YAAY,EACzC,YAAY,MACb,CAAC;;GAGJ,eAAe,cAA6B;AAC1C,QAAI,cAAc,OAAO,0CAA0C;AAEnE,WAAO,IAAI,WAAW,SAAS,eAAe,EAC5C,YAAY,MACb,CAAC;;AAGJ,UAAO;IACL,MACE,KAAK,aAAa,KAAK,aACnB,eACA,cAAc,UAAU,KAAK;IACnC,KAAK,IAAI,WAAW;IACpB;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,EACJ,mBAAmB,MACpB;IACF;WACM,OAAO;AACd,OAAI,cAAc,OAAQ,OAAiB,QAAQ;AAEnD,SAAM"}
@@ -1,5 +1,6 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
3
4
 
4
5
  //#region src/lib/utilities/file-header.ts
5
6
  /**
@@ -10,7 +11,7 @@ let __stryke_string_format_title_case = require("@stryke/string-format/title-cas
10
11
  * @returns A string containing the file header warning message.
11
12
  */
12
13
  function getFileHeaderWarningText(overwrite = true, framework = "powerlines") {
13
- return overwrite !== false ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \`output.overwrite\` option.` : `This file was generated on ${(/* @__PURE__ */ new Date()).toLocaleString()} - it will not be overwritten by ${(0, __stryke_string_format_title_case.titleCase)(framework)} while the \`output.overwrite\` option is set to \`true\`.`;
14
+ return overwrite !== false ? `Do not edit this file manually - it will be overwritten automatically. Automatic overwrites can be disabled by using the \`output.overwrite\` option.` : `This file was generated on ${(/* @__PURE__ */ new Date()).toLocaleString()} - it will not be overwritten by ${(0, _stryke_string_format_title_case.titleCase)(framework)} while the \`output.overwrite\` option is set to \`true\`.`;
14
15
  }
15
16
  /**
16
17
  * Generates a file header warning message based on the provided context.
@@ -30,7 +31,7 @@ function getFileHeaderWarning(context) {
30
31
  */
31
32
  function getFileHeader(context, comment = "//") {
32
33
  return `
33
- ${comment} Generated by ${(0, __stryke_string_format_title_case.titleCase)(context.config.framework) || "Powerlines"}
34
+ ${comment} Generated by ${(0, _stryke_string_format_title_case.titleCase)(context.config.framework) || "Powerlines"}
34
35
  ${comment} ${getFileHeaderWarning(context)}
35
36
  `;
36
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"file-header.d.cts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,iBAAA;;EAAA,cAAA,CAAA,EAAA,OAAiB;AAYlC;AAeA;AAcA;AAcA;;;;;iBA3CgB,wBAAA;;;;;;;iBAeA,oBAAA,UAA8B;;;;;;;;iBAc9B,aAAA,UAAuB;;;;;;;;iBAcvB,uBAAA,UACL,mBACA"}
1
+ {"version":3,"file":"file-header.d.cts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"mappings":";;;UAqBiB,iBAAA;EACf,SAAA;EACA,cAAA;AAAA;;;;AAUF;;;;iBAAgB,wBAAA,CACd,SAAA,YACA,SAAA;AAaF;;;;;AAcA;AAdA,iBAAgB,oBAAA,CAAqB,OAAA,EAAS,OAAA;;;;;;;;iBAc9B,aAAA,CAAc,OAAA,EAAS,OAAA,EAAS,OAAA;;;;;;;;iBAchC,uBAAA,CACd,OAAA,EAAS,OAAA,EACT,OAAA,GAAS,iBAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-header.d.mts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,iBAAA;;EAAA,cAAA,CAAA,EAAA,OAAiB;AAYlC;AAeA;AAcA;AAcA;;;;;iBA3CgB,wBAAA;;;;;;;iBAeA,oBAAA,UAA8B;;;;;;;;iBAc9B,aAAA,UAAuB;;;;;;;;iBAcvB,uBAAA,UACL,mBACA"}
1
+ {"version":3,"file":"file-header.d.mts","names":[],"sources":["../../../src/lib/utilities/file-header.ts"],"mappings":";;;UAqBiB,iBAAA;EACf,SAAA;EACA,cAAA;AAAA;;;;AAUF;;;;iBAAgB,wBAAA,CACd,SAAA,YACA,SAAA;AAaF;;;;;AAcA;AAdA,iBAAgB,oBAAA,CAAqB,OAAA,EAAS,OAAA;;;;;;;;iBAc9B,aAAA,CAAc,OAAA,EAAS,OAAA,EAAS,OAAA;;;;;;;;iBAchC,uBAAA,CACd,OAAA,EAAS,OAAA,EACT,OAAA,GAAS,iBAAA;AAAA"}
@@ -1,7 +1,8 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_path_append = require("@stryke/path/append");
3
- let __stryke_fs_list_files = require("@stryke/fs/list-files");
4
- let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_path_append = require("@stryke/path/append");
4
+ let _stryke_fs_list_files = require("@stryke/fs/list-files");
5
+ let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
5
6
  let prettier = require("prettier");
6
7
 
7
8
  //#region src/lib/utilities/format.ts
@@ -15,7 +16,7 @@ let prettier = require("prettier");
15
16
  * @returns A promise that resolves to the formatted code string.
16
17
  */
17
18
  async function format(context, path, data, force = false) {
18
- if (!force && ((0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || (0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) return data;
19
+ if (!force && ((0, _stryke_path_is_parent_path.isParentPath)(path, (0, _stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || (0, _stryke_path_is_parent_path.isParentPath)(path, (0, _stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) return data;
19
20
  let code = data;
20
21
  const resolvedConfig = await (0, prettier.resolveConfig)(path);
21
22
  if (resolvedConfig) code = await (0, prettier.format)(data, {
@@ -32,8 +33,8 @@ async function format(context, path, data, force = false) {
32
33
  * @returns A promise that resolves when all files have been formatted.
33
34
  */
34
35
  async function formatFolder(context, path) {
35
- if (!(0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !(0, __stryke_path_is_parent_path.isParentPath)(path, (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) await Promise.allSettled((await (0, __stryke_fs_list_files.listFiles)(path)).map(async (file) => {
36
- if (!(0, __stryke_path_is_parent_path.isParentPath)(file, (0, __stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !(0, __stryke_path_is_parent_path.isParentPath)(file, (0, __stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
36
+ if (!(0, _stryke_path_is_parent_path.isParentPath)(path, (0, _stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !(0, _stryke_path_is_parent_path.isParentPath)(path, (0, _stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) await Promise.allSettled((await (0, _stryke_fs_list_files.listFiles)(path)).map(async (file) => {
37
+ if (!(0, _stryke_path_is_parent_path.isParentPath)(file, (0, _stryke_path_append.appendPath)(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !(0, _stryke_path_is_parent_path.isParentPath)(file, (0, _stryke_path_append.appendPath)(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
37
38
  const data = await context.fs.read(file);
38
39
  if (data) {
39
40
  const formatted = await format(context, file, data);
@@ -1,7 +1,6 @@
1
1
  import { Context } from "../../types/context.cjs";
2
2
 
3
3
  //#region src/lib/utilities/format.d.ts
4
-
5
4
  /**
6
5
  * Formats code using Prettier based on the file path.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.cts","names":[],"sources":["../../../src/lib/utilities/format.ts"],"sourcesContent":[],"mappings":";;;;;;AAiCA;AA6CA;;;;;;iBA7CsB,MAAA,UACX,uDAIR;;;;;;;;iBAwCmB,YAAA,UAAsB,wBAAqB"}
1
+ {"version":3,"file":"format.d.cts","names":[],"sources":["../../../src/lib/utilities/format.ts"],"mappings":";;;;;AAiCA;;;;;;;iBAAsB,MAAA,CACpB,OAAA,EAAS,OAAA,EACT,IAAA,UACA,IAAA,UACA,KAAA,aACC,OAAA;;;;;AAwCH;;;iBAAsB,YAAA,CAAa,OAAA,EAAS,OAAA,EAAS,IAAA,WAAY,OAAA"}
@@ -1,7 +1,6 @@
1
1
  import { Context } from "../../types/context.mjs";
2
2
 
3
3
  //#region src/lib/utilities/format.d.ts
4
-
5
4
  /**
6
5
  * Formats code using Prettier based on the file path.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.mts","names":[],"sources":["../../../src/lib/utilities/format.ts"],"sourcesContent":[],"mappings":";;;;;;AAiCA;AA6CA;;;;;;iBA7CsB,MAAA,UACX,uDAIR;;;;;;;;iBAwCmB,YAAA,UAAsB,wBAAqB"}
1
+ {"version":3,"file":"format.d.mts","names":[],"sources":["../../../src/lib/utilities/format.ts"],"mappings":";;;;;AAiCA;;;;;;;iBAAsB,MAAA,CACpB,OAAA,EAAS,OAAA,EACT,IAAA,UACA,IAAA,UACA,KAAA,aACC,OAAA;;;;;AAwCH;;;iBAAsB,YAAA,CAAa,OAAA,EAAS,OAAA,EAAS,IAAA,WAAY,OAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_lib_utilities_source_file = require('./source-file.cjs');
2
3
  const require_lib_utilities_file_header = require('./file-header.cjs');
3
4
  const require_lib_utilities_format = require('./format.cjs');
@@ -1,9 +1,10 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
3
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
4
- let __stryke_fs_read_file = require("@stryke/fs/read-file");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
4
+ let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
5
+ let _stryke_fs_read_file = require("@stryke/fs/read-file");
5
6
  let magic_string = require("magic-string");
6
- magic_string = require_rolldown_runtime.__toESM(magic_string);
7
+ magic_string = require_runtime.__toESM(magic_string);
7
8
 
8
9
  //#region src/lib/utilities/source-file.ts
9
10
  /**
@@ -14,8 +15,8 @@ magic_string = require_rolldown_runtime.__toESM(magic_string);
14
15
  */
15
16
  function getString(code) {
16
17
  if (!code) return "";
17
- if ((0, __stryke_type_checks_is_string.isString)(code)) return code;
18
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(code) && "code" in code) return code.code;
18
+ if ((0, _stryke_type_checks_is_string.isString)(code)) return code;
19
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(code) && "code" in code) return code.code;
19
20
  return code.toString();
20
21
  }
21
22
  /**
@@ -25,7 +26,7 @@ function getString(code) {
25
26
  * @returns The magic string.
26
27
  */
27
28
  function getMagicString(code) {
28
- if ((0, __stryke_type_checks_is_string.isString)(code)) return new magic_string.default(code);
29
+ if ((0, _stryke_type_checks_is_string.isString)(code)) return new magic_string.default(code);
29
30
  return code;
30
31
  }
31
32
  /**
@@ -38,7 +39,7 @@ function getMagicString(code) {
38
39
  function getSourceFile(code, id) {
39
40
  return {
40
41
  id,
41
- code: getMagicString(code ?? (0, __stryke_fs_read_file.readFileIfExistingSync)(id)),
42
+ code: getMagicString(code ?? (0, _stryke_fs_read_file.readFileIfExistingSync)(id)),
42
43
  env: []
43
44
  };
44
45
  }
@@ -3,7 +3,6 @@ import MagicString from "magic-string";
3
3
  import { TransformResult } from "unplugin";
4
4
 
5
5
  //#region src/lib/utilities/source-file.d.ts
6
-
7
6
  /**
8
7
  * Get the string from the source.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"source-file.d.cts","names":[],"sources":["../../../src/lib/utilities/source-file.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA+BA;AAwBA;AAeA;;iBAvCgB,SAAA,gBACC,cAAc;;;;;;;iBAuBf,cAAA,gBAA8B,cAAc;;;;;;;;iBAe5C,aAAA,gBACC,0BAEd"}
1
+ {"version":3,"file":"source-file.d.cts","names":[],"sources":["../../../src/lib/utilities/source-file.ts"],"mappings":";;;;;;;AA+BA;;;;iBAAgB,SAAA,CACd,IAAA,WAAe,WAAA,GAAc,eAAA;;;;;AAuB/B;;iBAAgB,cAAA,CAAe,IAAA,WAAe,WAAA,GAAc,WAAA;;;;;;;AAe5D;iBAAgB,aAAA,CACd,IAAA,WAAe,WAAA,EACf,EAAA,WACC,UAAA"}
@@ -3,7 +3,6 @@ import { TransformResult } from "unplugin";
3
3
  import MagicString from "magic-string";
4
4
 
5
5
  //#region src/lib/utilities/source-file.d.ts
6
-
7
6
  /**
8
7
  * Get the string from the source.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"source-file.d.mts","names":[],"sources":["../../../src/lib/utilities/source-file.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA+BA;AAwBA;AAeA;;iBAvCgB,SAAA,gBACC,cAAc;;;;;;;iBAuBf,cAAA,gBAA8B,cAAc;;;;;;;;iBAe5C,aAAA,gBACC,0BAEd"}
1
+ {"version":3,"file":"source-file.d.mts","names":[],"sources":["../../../src/lib/utilities/source-file.ts"],"mappings":";;;;;;;AA+BA;;;;iBAAgB,SAAA,CACd,IAAA,WAAe,WAAA,GAAc,eAAA;;;;;AAuB/B;;iBAAgB,cAAA,CAAe,IAAA,WAAe,WAAA,GAAc,WAAA;;;;;;;AAe5D;iBAAgB,aAAA,CACd,IAAA,WAAe,WAAA,EACf,EAAA,WACC,UAAA"}
@@ -1,6 +1,7 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
3
  let diff_match_patch = require("diff-match-patch");
3
- diff_match_patch = require_rolldown_runtime.__toESM(diff_match_patch);
4
+ diff_match_patch = require_runtime.__toESM(diff_match_patch);
4
5
 
5
6
  //#region src/lib/utilities/source-map.ts
6
7
  const dmp = new diff_match_patch.default();
@@ -2,7 +2,6 @@ import { TransformResult } from "../../types/context.cjs";
2
2
  import MagicString from "magic-string";
3
3
 
4
4
  //#region src/lib/utilities/source-map.d.ts
5
-
6
5
  /**
7
6
  * Generate code with source map.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"source-map.d.cts","names":[],"sources":["../../../src/lib/utilities/source-map.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgCA;;;;;;iBAAgB,iBAAA,OACR,+CAGL"}
1
+ {"version":3,"file":"source-map.d.cts","names":[],"sources":["../../../src/lib/utilities/source-map.ts"],"mappings":";;;;;;AAgCA;;;;;;iBAAgB,iBAAA,CACd,IAAA,EAAM,WAAA,EACN,EAAA,UACA,UAAA,YACC,eAAA"}
@@ -2,7 +2,6 @@ import { TransformResult } from "../../types/context.mjs";
2
2
  import MagicString from "magic-string";
3
3
 
4
4
  //#region src/lib/utilities/source-map.d.ts
5
-
6
5
  /**
7
6
  * Generate code with source map.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"source-map.d.mts","names":[],"sources":["../../../src/lib/utilities/source-map.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgCA;;;;;;iBAAgB,iBAAA,OACR,+CAGL"}
1
+ {"version":3,"file":"source-map.d.mts","names":[],"sources":["../../../src/lib/utilities/source-map.ts"],"mappings":";;;;;;AAgCA;;;;;;iBAAgB,iBAAA,CACd,IAAA,EAAM,WAAA,EACN,EAAA,UACA,UAAA,YACC,eAAA"}
@@ -1,7 +1,8 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
+ let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
3
4
  let prettier = require("prettier");
4
- let __stryke_fs_write_file = require("@stryke/fs/write-file");
5
+ let _stryke_fs_write_file = require("@stryke/fs/write-file");
5
6
 
6
7
  //#region src/lib/utilities/write-file.ts
7
8
  /**
@@ -14,13 +15,13 @@ let __stryke_fs_write_file = require("@stryke/fs/write-file");
14
15
  */
15
16
  async function writeFile(log, filepath, content, skipFormat = false) {
16
17
  try {
17
- if (skipFormat) await (0, __stryke_fs_write_file.writeFile)(filepath, content);
18
- else await (0, __stryke_fs_write_file.writeFile)(filepath, await (0, prettier.format)(content, {
18
+ if (skipFormat) await (0, _stryke_fs_write_file.writeFile)(filepath, content);
19
+ else await (0, _stryke_fs_write_file.writeFile)(filepath, await (0, prettier.format)(content, {
19
20
  ...await (0, prettier.resolveConfig)(filepath) ?? {},
20
21
  filepath
21
22
  }) || "");
22
23
  } catch (error) {
23
- log(__storm_software_config_tools_types.LogLevelLabel.ERROR, `Failed to write file ${filepath} to disk \n${error?.message ? error.message : ""}`);
24
+ log(_storm_software_config_tools_types.LogLevelLabel.ERROR, `Failed to write file ${filepath} to disk \n${error?.message ? error.message : ""}`);
24
25
  }
25
26
  }
26
27
 
@@ -1,7 +1,6 @@
1
1
  import { LogFn } from "../../types/config.cjs";
2
2
 
3
3
  //#region src/lib/utilities/write-file.d.ts
4
-
5
4
  /**
6
5
  * Writes and formats a file to the file system
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"write-file.d.cts","names":[],"sources":["../../../src/lib/utilities/write-file.ts"],"sourcesContent":[],"mappings":";;;;;;AA+BA;;;;;;iBAAsB,SAAA,MACf,iEAGa"}
1
+ {"version":3,"file":"write-file.d.cts","names":[],"sources":["../../../src/lib/utilities/write-file.ts"],"mappings":";;;;;AA+BA;;;;;;iBAAsB,SAAA,CACpB,GAAA,EAAK,KAAA,EACL,QAAA,UACA,OAAA,UACA,UAAA,aAAkB,OAAA"}
@@ -1,7 +1,6 @@
1
1
  import { LogFn } from "../../types/config.mjs";
2
2
 
3
3
  //#region src/lib/utilities/write-file.d.ts
4
-
5
4
  /**
6
5
  * Writes and formats a file to the file system
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"write-file.d.mts","names":[],"sources":["../../../src/lib/utilities/write-file.ts"],"sourcesContent":[],"mappings":";;;;;;AA+BA;;;;;;iBAAsB,SAAA,MACf,iEAGa"}
1
+ {"version":3,"file":"write-file.d.mts","names":[],"sources":["../../../src/lib/utilities/write-file.ts"],"mappings":";;;;;AA+BA;;;;;;iBAAsB,SAAA,CACpB,GAAA,EAAK,KAAA,EACL,QAAA,UACA,OAAA,UACA,UAAA,aAAkB,OAAA"}