@powerlines/core 0.2.21 → 0.2.23

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 (151) 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/context-helpers.cjs +18 -17
  81. package/dist/plugin-utils/context-helpers.d.cts +0 -1
  82. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  83. package/dist/plugin-utils/context-helpers.d.mts +0 -1
  84. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  85. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  86. package/dist/plugin-utils/extend.cjs +12 -11
  87. package/dist/plugin-utils/extend.d.cts +0 -1
  88. package/dist/plugin-utils/extend.d.cts.map +1 -1
  89. package/dist/plugin-utils/extend.d.mts +0 -1
  90. package/dist/plugin-utils/extend.d.mts.map +1 -1
  91. package/dist/plugin-utils/format-package-json.cjs +6 -5
  92. package/dist/plugin-utils/format-package-json.d.cts +0 -1
  93. package/dist/plugin-utils/format-package-json.d.cts.map +1 -1
  94. package/dist/plugin-utils/format-package-json.d.mts +0 -1
  95. package/dist/plugin-utils/format-package-json.d.mts.map +1 -1
  96. package/dist/plugin-utils/get-config-path.cjs +35 -34
  97. package/dist/plugin-utils/get-config-path.d.cts +0 -1
  98. package/dist/plugin-utils/get-config-path.d.cts.map +1 -1
  99. package/dist/plugin-utils/get-config-path.d.mts +0 -1
  100. package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
  101. package/dist/plugin-utils/helpers.cjs +15 -14
  102. package/dist/plugin-utils/helpers.d.cts +10 -11
  103. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  104. package/dist/plugin-utils/helpers.d.mts +10 -11
  105. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  106. package/dist/plugin-utils/helpers.mjs.map +1 -1
  107. package/dist/plugin-utils/index.cjs +1 -0
  108. package/dist/plugin-utils/merge.cjs +7 -6
  109. package/dist/plugin-utils/merge.d.cts.map +1 -1
  110. package/dist/plugin-utils/merge.d.mts +0 -2
  111. package/dist/plugin-utils/merge.d.mts.map +1 -1
  112. package/dist/plugin-utils/merge.mjs +2 -2
  113. package/dist/plugin-utils/merge.mjs.map +1 -1
  114. package/dist/plugin-utils/modules.cjs +1 -0
  115. package/dist/plugin-utils/modules.d.cts +0 -1
  116. package/dist/plugin-utils/modules.d.cts.map +1 -1
  117. package/dist/plugin-utils/modules.d.mts +0 -1
  118. package/dist/plugin-utils/modules.d.mts.map +1 -1
  119. package/dist/plugin-utils/modules.mjs.map +1 -1
  120. package/dist/plugin-utils/paths.cjs +5 -4
  121. package/dist/plugin-utils/paths.d.cts +0 -1
  122. package/dist/plugin-utils/paths.d.cts.map +1 -1
  123. package/dist/plugin-utils/paths.d.mts +0 -1
  124. package/dist/plugin-utils/paths.d.mts.map +1 -1
  125. package/dist/types/_internal.d.cts +0 -1
  126. package/dist/types/_internal.d.cts.map +1 -1
  127. package/dist/types/_internal.d.mts +0 -1
  128. package/dist/types/_internal.d.mts.map +1 -1
  129. package/dist/types/api.d.cts +0 -1
  130. package/dist/types/api.d.cts.map +1 -1
  131. package/dist/types/api.d.mts +0 -1
  132. package/dist/types/api.d.mts.map +1 -1
  133. package/dist/types/commands.d.cts.map +1 -1
  134. package/dist/types/commands.d.mts.map +1 -1
  135. package/dist/types/config.d.cts.map +1 -1
  136. package/dist/types/config.d.mts.map +1 -1
  137. package/dist/types/context.d.cts.map +1 -1
  138. package/dist/types/context.d.mts.map +1 -1
  139. package/dist/types/fs.d.cts.map +1 -1
  140. package/dist/types/fs.d.mts.map +1 -1
  141. package/dist/types/hooks.d.cts +10 -10
  142. package/dist/types/hooks.d.cts.map +1 -1
  143. package/dist/types/hooks.d.mts +10 -10
  144. package/dist/types/hooks.d.mts.map +1 -1
  145. package/dist/types/plugin.d.cts.map +1 -1
  146. package/dist/types/plugin.d.mts.map +1 -1
  147. package/dist/types/tsconfig.d.cts.map +1 -1
  148. package/dist/types/tsconfig.d.mts.map +1 -1
  149. package/dist/types/unplugin.d.cts.map +1 -1
  150. package/dist/types/unplugin.d.mts.map +1 -1
  151. package/package.json +5 -4
@@ -1,9 +1,9 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_plugin_utils_format_package_json = require('./plugin-utils/format-package-json.cjs');
4
- let __stryke_path_append = require("@stryke/path/append");
5
- let __stryke_path_replace = require("@stryke/path/replace");
6
- let __stryke_path_join = require("@stryke/path/join");
4
+ let _stryke_path_append = require("@stryke/path/append");
5
+ let _stryke_path_replace = require("@stryke/path/replace");
6
+ let _stryke_path_join = require("@stryke/path/join");
7
7
  let tsdown = require("tsdown");
8
8
 
9
9
  //#region src/plugin-base.ts
@@ -54,8 +54,8 @@ const plugin = (options = {}) => {
54
54
  async build() {
55
55
  await (0, tsdown.build)({
56
56
  name: this.config.name,
57
- cwd: (0, __stryke_path_append.appendPath)(this.config.root, this.workspaceConfig.workspaceRoot),
58
- entry: this.entry.filter((entry) => entry?.file).length > 0 ? Object.fromEntries(this.entry.filter((entry) => entry?.file).map((entry) => [entry.output || (0, __stryke_path_replace.replaceExtension)((0, __stryke_path_replace.replacePath)((0, __stryke_path_replace.replacePath)(entry.file, (0, __stryke_path_join.joinPaths)(this.config.root, "src")), this.entryPath)), entry.file])) : [(0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "src", "**/*.ts"), (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "src", "**/*.tsx")],
57
+ cwd: (0, _stryke_path_append.appendPath)(this.config.root, this.workspaceConfig.workspaceRoot),
58
+ entry: this.entry.filter((entry) => entry?.file).length > 0 ? Object.fromEntries(this.entry.filter((entry) => entry?.file).map((entry) => [entry.output || (0, _stryke_path_replace.replaceExtension)((0, _stryke_path_replace.replacePath)((0, _stryke_path_replace.replacePath)(entry.file, (0, _stryke_path_join.joinPaths)(this.config.root, "src")), this.entryPath)), entry.file])) : [(0, _stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "src", "**/*.ts"), (0, _stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "src", "**/*.tsx")],
59
59
  platform: this.config.platform,
60
60
  tsconfig: this.tsconfig.tsconfigFilePath,
61
61
  outDir: this.config.output.buildPath,
@@ -65,8 +65,7 @@ const plugin = (options = {}) => {
65
65
  }
66
66
  };
67
67
  };
68
- var plugin_base_default = plugin;
69
68
 
70
69
  //#endregion
71
- exports.default = plugin_base_default;
70
+ exports.default = plugin;
72
71
  exports.plugin = plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-base.d.cts","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iBAAA;WACN,QAAQ;AADnB;AAIY,KAAA,oBAAA,GAAuB,YAAA,GAAA;EAIvB,MAAA,EAHF,iBAGE;CAA2B;AACpB,KADP,wBAAA,GAA2B,cACpB,GAAA;EAAT,MAAA,EAAA,QAAA,CAAS,iBAAT,CAAA;CAAQ;AAGN,KAAA,iBAAiB,CAAA,wBACH,wBADG,GACwB,wBADxB,CAAA,GAEzB,aAFyB,CAEX,eAFW,CAAA;;;;AAEzB,cAKS,MALT,EAAA,CAAA,iBAKoC,iBALpC,GAKwD,iBALxD,CAAA,CAAA,OAAA,CAAA,EAMO,iBANP,EAAA,GAOD,MAPC,CAOM,QAPN,CAAA;AAKS,oCAmFZ,GAAA,EAAA;AAnFuC,uCAAA,GAAA,EAAA;AAAoB,2CAAA,GAAA,EAAA;AACjD,oCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"plugin-base.d.cts","names":[],"sources":["../src/plugin-base.ts"],"mappings":";;;;;;UA2BiB,iBAAA;EACf,MAAA,GAAS,OAAA,CAAQ,UAAA;AAAA;AAAA,KAGP,oBAAA,GAAuB,YAAA;EACjC,MAAA,EAAQ,iBAAA;AAAA;AAAA,KAGE,wBAAA,GAA2B,cAAA;EACrC,MAAA,EAAQ,QAAA,CAAS,iBAAA;AAAA;AAAA,KAGP,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;;AAVlB;;cAea,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-base.d.mts","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iBAAA;WACN,QAAQ;AADnB;AAIY,KAAA,oBAAA,GAAuB,YAAA,GAAA;EAIvB,MAAA,EAHF,iBAGE;CAA2B;AACpB,KADP,wBAAA,GAA2B,cACpB,GAAA;EAAT,MAAA,EAAA,QAAA,CAAS,iBAAT,CAAA;CAAQ;AAGN,KAAA,iBAAiB,CAAA,wBACH,wBADG,GACwB,wBADxB,CAAA,GAEzB,aAFyB,CAEX,eAFW,CAAA;;;;AAEzB,cAKS,MALT,EAAA,CAAA,iBAKoC,iBALpC,GAKwD,iBALxD,CAAA,CAAA,OAAA,CAAA,EAMO,iBANP,EAAA,GAOD,MAPC,CAOM,QAPN,CAAA;AAKS,oCAmFZ,GAAA,EAAA;AAnFuC,uCAAA,GAAA,EAAA;AAAoB,2CAAA,GAAA,EAAA;AACjD,oCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"plugin-base.d.mts","names":[],"sources":["../src/plugin-base.ts"],"mappings":";;;;;;UA2BiB,iBAAA;EACf,MAAA,GAAS,OAAA,CAAQ,UAAA;AAAA;AAAA,KAGP,oBAAA,GAAuB,YAAA;EACjC,MAAA,EAAQ,iBAAA;AAAA;AAAA,KAGE,wBAAA,GAA2B,cAAA;EACrC,MAAA,EAAQ,QAAA,CAAS,iBAAA;AAAA;AAAA,KAGP,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,aAAA,CAAc,eAAA;;AAVlB;;cAea,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA;AAAA"}
@@ -63,8 +63,7 @@ const plugin = (options = {}) => {
63
63
  }
64
64
  };
65
65
  };
66
- var plugin_base_default = plugin;
67
66
 
68
67
  //#endregion
69
- export { plugin_base_default as default, plugin };
68
+ export { plugin as default, plugin };
70
69
  //# sourceMappingURL=plugin-base.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-base.mjs","names":[],"sources":["../src/plugin-base.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 { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n platform: \"node\",\n tsdown: {\n format: [\"cjs\", \"esm\"],\n logLevel: \"silent\",\n target: \"node22\",\n cjsDefault: true,\n treeshake: true,\n exports: {\n all: true\n },\n fixedExtension: true,\n nodeProtocol: true,\n minify: false,\n dts: true,\n shims: true,\n outDir: \"dist\",\n clean: true,\n external: [\"powerlines\", /^powerlines\\/.*$/, /^@powerlines\\//],\n skipNodeModulesBundle: true,\n unbundle: false,\n ...options.tsdown\n }\n };\n },\n async build() {\n await build({\n name: this.config.name,\n cwd: appendPath(this.config.root, this.workspaceConfig.workspaceRoot),\n entry:\n this.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n this.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(this.config.root, \"src\")\n ),\n this.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n platform: this.config.platform,\n tsconfig: this.tsconfig.tsconfigFilePath,\n outDir: this.config.output.buildPath,\n ...this.config.tsdown\n });\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AA8CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,aAAa;IACb,OAAO;KAAC;KAAgB;KAAkB;KAAmB;IAC7D,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,KAAK;KACN;IACD,UAAU;IACV,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,UAAU;KACV,QAAQ;KACR,YAAY;KACZ,WAAW;KACX,SAAS,EACP,KAAK,MACN;KACD,gBAAgB;KAChB,cAAc;KACd,QAAQ;KACR,KAAK;KACL,OAAO;KACP,QAAQ;KACR,OAAO;KACP,UAAU;MAAC;MAAc;MAAoB;MAAiB;KAC9D,uBAAuB;KACvB,UAAU;KACV,GAAG,QAAQ;KACZ;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MAAM;IACV,MAAM,KAAK,OAAO;IAClB,KAAK,WAAW,KAAK,OAAO,MAAM,KAAK,gBAAgB,cAAc;IACrE,OACE,KAAK,MAAM,QAAO,UAAS,OAAO,KAAK,CAAC,SAAS,IAC7C,OAAO,YACL,KAAK,MACF,QAAO,UAAS,OAAO,KAAK,CAC5B,KAAI,UAAS,CACZ,MAAM,UACJ,iBACE,YACE,YACE,MAAM,MACN,UAAU,KAAK,OAAO,MAAM,MAAM,CACnC,EACD,KAAK,UACN,CACF,EACH,MAAM,KACP,CAAC,CACL,GACD,CACE,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,UACD,EACD,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,WACD,CACF;IACP,UAAU,KAAK,OAAO;IACtB,UAAU,KAAK,SAAS;IACxB,QAAQ,KAAK,OAAO,OAAO;IAC3B,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,SAAM,kBAAkB,KAAK;;EAEhC;;AAGH,0BAAe"}
1
+ {"version":3,"file":"plugin-base.mjs","names":[],"sources":["../src/plugin-base.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 { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n platform: \"node\",\n tsdown: {\n format: [\"cjs\", \"esm\"],\n logLevel: \"silent\",\n target: \"node22\",\n cjsDefault: true,\n treeshake: true,\n exports: {\n all: true\n },\n fixedExtension: true,\n nodeProtocol: true,\n minify: false,\n dts: true,\n shims: true,\n outDir: \"dist\",\n clean: true,\n external: [\"powerlines\", /^powerlines\\/.*$/, /^@powerlines\\//],\n skipNodeModulesBundle: true,\n unbundle: false,\n ...options.tsdown\n }\n };\n },\n async build() {\n await build({\n name: this.config.name,\n cwd: appendPath(this.config.root, this.workspaceConfig.workspaceRoot),\n entry:\n this.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n this.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(this.config.root, \"src\")\n ),\n this.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n platform: this.config.platform,\n tsconfig: this.tsconfig.tsconfigFilePath,\n outDir: this.config.output.buildPath,\n ...this.config.tsdown\n });\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AA8CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,aAAa;IACb,OAAO;KAAC;KAAgB;KAAkB;KAAmB;IAC7D,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,KAAK;KACN;IACD,UAAU;IACV,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,UAAU;KACV,QAAQ;KACR,YAAY;KACZ,WAAW;KACX,SAAS,EACP,KAAK,MACN;KACD,gBAAgB;KAChB,cAAc;KACd,QAAQ;KACR,KAAK;KACL,OAAO;KACP,QAAQ;KACR,OAAO;KACP,UAAU;MAAC;MAAc;MAAoB;MAAiB;KAC9D,uBAAuB;KACvB,UAAU;KACV,GAAG,QAAQ;KACZ;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MAAM;IACV,MAAM,KAAK,OAAO;IAClB,KAAK,WAAW,KAAK,OAAO,MAAM,KAAK,gBAAgB,cAAc;IACrE,OACE,KAAK,MAAM,QAAO,UAAS,OAAO,KAAK,CAAC,SAAS,IAC7C,OAAO,YACL,KAAK,MACF,QAAO,UAAS,OAAO,KAAK,CAC5B,KAAI,UAAS,CACZ,MAAM,UACJ,iBACE,YACE,YACE,MAAM,MACN,UAAU,KAAK,OAAO,MAAM,MAAM,CACnC,EACD,KAAK,UACN,CACF,EACH,MAAM,KACP,CAAC,CACL,GACD,CACE,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,UACD,EACD,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,WACD,CACF;IACP,UAAU,KAAK,OAAO;IACtB,UAAU,KAAK,SAAS;IACxB,QAAQ,KAAK,OAAO,OAAO;IAC3B,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,SAAM,kBAAkB,KAAK;;EAEhC"}
@@ -1,8 +1,9 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __stryke_convert_to_array = require("@stryke/convert/to-array");
3
- let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
4
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
5
- let __stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
4
+ let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
5
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
6
+ let _stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
6
7
 
7
8
  //#region src/plugin-utils/build-helpers.ts
8
9
  /**
@@ -12,13 +13,13 @@ let __stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
12
13
  * @returns The dependency configuration.
13
14
  */
14
15
  function getDependencyConfig(context) {
15
- const noExternal = (0, __stryke_helpers_get_unique.getUnique)((0, __stryke_convert_to_array.toArray)(context.config.resolve.noExternal).concat(context.builtins));
16
- const external = (0, __stryke_helpers_get_unique.getUnique)((0, __stryke_convert_to_array.toArray)(context.config.resolve.external).reduce((ret, ext) => {
17
- if ((0, __stryke_type_checks_is_regexp.isRegExp)(ext)) {
18
- if (noExternal.some((noExt) => (0, __stryke_type_checks_is_regexp.isRegExp)(noExt) && noExt.source === ext.source)) return ret;
19
- const noExts = noExternal.filter((noExt) => (0, __stryke_type_checks_is_set_string.isSetString)(noExt) && ext.test(noExt));
16
+ const noExternal = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(context.config.resolve.noExternal).concat(context.builtins));
17
+ const external = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(context.config.resolve.external).reduce((ret, ext) => {
18
+ if ((0, _stryke_type_checks_is_regexp.isRegExp)(ext)) {
19
+ if (noExternal.some((noExt) => (0, _stryke_type_checks_is_regexp.isRegExp)(noExt) && noExt.source === ext.source)) return ret;
20
+ const noExts = noExternal.filter((noExt) => (0, _stryke_type_checks_is_set_string.isSetString)(noExt) && ext.test(noExt));
20
21
  if (noExts.length > 0) {
21
- ret.push(new RegExp(noExts.reduce((regex, noExt) => `(?!${(0, __stryke_type_checks_is_regexp.isRegExp)(noExt) ? noExt.source : `^${noExt}$`})${regex}`, `${ext.source.replace(/^\^@\?/, "^@").replace(/^@\?/, "@").replace(/\$$/, "").replace(/\.\*$/, "")}.*$`)));
22
+ ret.push(new RegExp(noExts.reduce((regex, noExt) => `(?!${(0, _stryke_type_checks_is_regexp.isRegExp)(noExt) ? noExt.source : `^${noExt}$`})${regex}`, `${ext.source.replace(/^\^@\?/, "^@").replace(/^@\?/, "@").replace(/\$$/, "").replace(/\.\*$/, "")}.*$`)));
22
23
  return ret;
23
24
  }
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"sourcesContent":[],"mappings":";;;;UAyBiB,yBAAA;YACL;EADK,UAAA,EAEH,aAFG,CAAA,YAAyB,CAC9B;AAUZ;;;;;;;iBAAgB,mBAAA,UACL,UACR"}
1
+ {"version":3,"file":"build-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"mappings":";;;;UAyBiB,yBAAA;EACf,QAAA,EAAU,aAAA;EACV,UAAA,EAAY,aAAA;AAAA;;;;;;;iBASE,mBAAA,CACd,OAAA,EAAS,OAAA,GACR,yBAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"sourcesContent":[],"mappings":";;;;UAyBiB,yBAAA;YACL;EADK,UAAA,EAEH,aAFG,CAAA,YAAyB,CAAA;AAW1C;;;;;;;iBAAgB,mBAAA,UACL,UACR"}
1
+ {"version":3,"file":"build-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"mappings":";;;;UAyBiB,yBAAA;EACf,QAAA,EAAU,aAAA;EACV,UAAA,EAAY,aAAA;AAAA;;;;;;;iBASE,mBAAA,CACd,OAAA,EAAS,OAAA,GACR,yBAAA;AAAA"}
@@ -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/plugin-utils/context-helpers.ts
6
7
  /**
@@ -11,22 +12,22 @@ let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-str
11
12
  */
12
13
  function getOrganizationName(context) {
13
14
  let result;
14
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
15
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
15
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
16
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
16
17
  if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
17
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
18
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
18
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
19
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
19
20
  }
20
21
  if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
21
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.author[0])) result = context.packageJson.author[0].name;
22
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.author[0])) result = context.packageJson.author[0];
22
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.packageJson.author[0])) result = context.packageJson.author[0].name;
23
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.author[0])) result = context.packageJson.author[0];
23
24
  }
24
25
  if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
25
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
26
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
26
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
27
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
27
28
  }
28
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
29
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
29
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
30
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
30
31
  return result;
31
32
  }
32
33
  /**
@@ -37,10 +38,10 @@ function getOrganizationName(context) {
37
38
  */
38
39
  function getWorkspaceName(context) {
39
40
  let result;
40
- if ((0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.name)) result = context.workspaceConfig.name;
41
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
42
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
43
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
41
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.name)) result = context.workspaceConfig.name;
42
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
43
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
44
+ if (!result && (0, _stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
44
45
  return result;
45
46
  }
46
47
 
@@ -1,7 +1,6 @@
1
1
  import { UnresolvedContext } from "../types/context.cjs";
2
2
 
3
3
  //#region src/plugin-utils/context-helpers.d.ts
4
-
5
4
  /**
6
5
  * Get the organization name from the context
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"sourcesContent":[],"mappings":";;;;;;AA4BA;AAuEA;;;iBAvEgB,mBAAA,UACL;;;;;;;iBAsEK,gBAAA,UACL"}
1
+ {"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;AA4BA;;;;iBAAgB,mBAAA,CACd,OAAA,EAAS,iBAAA;AAsEX;;;;;;AAAA,iBAAgB,gBAAA,CACd,OAAA,EAAS,iBAAA"}
@@ -1,7 +1,6 @@
1
1
  import { UnresolvedContext } from "../types/context.mjs";
2
2
 
3
3
  //#region src/plugin-utils/context-helpers.d.ts
4
-
5
4
  /**
6
5
  * Get the organization name from the context
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"sourcesContent":[],"mappings":";;;;;;AA4BA;AAuEA;;;iBAvEgB,mBAAA,UACL;;;;;;;iBAsEK,gBAAA,UACL"}
1
+ {"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;AA4BA;;;;iBAAgB,mBAAA,CACd,OAAA,EAAS,iBAAA;AAsEX;;;;;;AAAA,iBAAgB,gBAAA,CACd,OAAA,EAAS,iBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"context-helpers.mjs","names":["result: string | undefined"],"sources":["../../src/plugin-utils/context-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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getOrganizationName(\n context: UnresolvedContext\n): string | undefined {\n let result: string | undefined;\n if (isSetObject(context.workspaceConfig.organization)) {\n result = context.workspaceConfig.organization.name;\n }\n\n if (!result && isSetString(context.workspaceConfig.organization)) {\n result = context.workspaceConfig.organization;\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.maintainers) &&\n context.packageJson.maintainers.length > 0\n ) {\n if (isSetObject(context.packageJson.maintainers[0])) {\n result = (context.packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.maintainers[0])) {\n result = context.packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.author) &&\n context.packageJson.author.length > 0\n ) {\n if (isSetObject(context.packageJson.author[0])) {\n result = (context.packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.author[0])) {\n result = context.packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.contributors) &&\n context.packageJson.contributors.length > 0\n ) {\n if (isSetObject(context.packageJson.contributors[0])) {\n result = (context.packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.contributors[0])) {\n result = context.packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getWorkspaceName(\n context: UnresolvedContext\n): string | undefined {\n let result: string | undefined;\n if (isSetString(context.workspaceConfig.name)) {\n result = context.workspaceConfig.name;\n }\n\n if (!result && isSetString(context.workspaceConfig.namespace)) {\n result = context.workspaceConfig.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,oBACd,SACoB;CACpB,IAAIA;AACJ,KAAI,YAAY,QAAQ,gBAAgB,aAAa,CACnD,UAAS,QAAQ,gBAAgB,aAAa;AAGhD,KAAI,CAAC,UAAU,YAAY,QAAQ,gBAAgB,aAAa,CAC9D,UAAS,QAAQ,gBAAgB;AAGnC,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,YAAY,IAC9C,QAAQ,YAAY,YAAY,SAAS,GACzC;AACA,MAAI,YAAY,QAAQ,YAAY,YAAY,GAAG,CACjD,UAAU,QAAQ,YAAY,YAAY,GAAwB;AAGpE,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,YAAY,GAAG,CAC5D,UAAS,QAAQ,YAAY,YAAY;;AAI7C,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,OAAO,IACzC,QAAQ,YAAY,OAAO,SAAS,GACpC;AACA,MAAI,YAAY,QAAQ,YAAY,OAAO,GAAG,CAC5C,UAAU,QAAQ,YAAY,OAAO,GAAwB;AAG/D,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,OAAO,GAAG,CACvD,UAAS,QAAQ,YAAY,OAAO;;AAIxC,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,aAAa,IAC/C,QAAQ,YAAY,aAAa,SAAS,GAC1C;AACA,MAAI,YAAY,QAAQ,YAAY,aAAa,GAAG,CAClD,UAAU,QAAQ,YAAY,aAAa,GAAwB;AAGrE,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,aAAa,GAAG,CAC7D,UAAS,QAAQ,YAAY,aAAa;;AAI9C,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,UAAU,CACvD,UAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,GAAG;AAG1D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,KAAK,CAClD,UAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,GAAG,CAAC,QAAQ,SAAS,GAAG;AAG1E,QAAO;;;;;;;;AAST,SAAgB,iBACd,SACoB;CACpB,IAAIA;AACJ,KAAI,YAAY,QAAQ,gBAAgB,KAAK,CAC3C,UAAS,QAAQ,gBAAgB;AAGnC,KAAI,CAAC,UAAU,YAAY,QAAQ,gBAAgB,UAAU,CAC3D,UAAS,QAAQ,gBAAgB,UAAU,QAAQ,MAAM,GAAG;AAG9D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,UAAU,CACvD,UAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,GAAG;AAG1D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,KAAK,CAClD,UAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,GAAG,CAAC,QAAQ,SAAS,GAAG;AAG1E,QAAO"}
1
+ {"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getOrganizationName(\n context: UnresolvedContext\n): string | undefined {\n let result: string | undefined;\n if (isSetObject(context.workspaceConfig.organization)) {\n result = context.workspaceConfig.organization.name;\n }\n\n if (!result && isSetString(context.workspaceConfig.organization)) {\n result = context.workspaceConfig.organization;\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.maintainers) &&\n context.packageJson.maintainers.length > 0\n ) {\n if (isSetObject(context.packageJson.maintainers[0])) {\n result = (context.packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.maintainers[0])) {\n result = context.packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.author) &&\n context.packageJson.author.length > 0\n ) {\n if (isSetObject(context.packageJson.author[0])) {\n result = (context.packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.author[0])) {\n result = context.packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(context.packageJson.contributors) &&\n context.packageJson.contributors.length > 0\n ) {\n if (isSetObject(context.packageJson.contributors[0])) {\n result = (context.packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(context.packageJson.contributors[0])) {\n result = context.packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getWorkspaceName(\n context: UnresolvedContext\n): string | undefined {\n let result: string | undefined;\n if (isSetString(context.workspaceConfig.name)) {\n result = context.workspaceConfig.name;\n }\n\n if (!result && isSetString(context.workspaceConfig.namespace)) {\n result = context.workspaceConfig.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,oBACd,SACoB;CACpB,IAAI;AACJ,KAAI,YAAY,QAAQ,gBAAgB,aAAa,CACnD,UAAS,QAAQ,gBAAgB,aAAa;AAGhD,KAAI,CAAC,UAAU,YAAY,QAAQ,gBAAgB,aAAa,CAC9D,UAAS,QAAQ,gBAAgB;AAGnC,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,YAAY,IAC9C,QAAQ,YAAY,YAAY,SAAS,GACzC;AACA,MAAI,YAAY,QAAQ,YAAY,YAAY,GAAG,CACjD,UAAU,QAAQ,YAAY,YAAY,GAAwB;AAGpE,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,YAAY,GAAG,CAC5D,UAAS,QAAQ,YAAY,YAAY;;AAI7C,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,OAAO,IACzC,QAAQ,YAAY,OAAO,SAAS,GACpC;AACA,MAAI,YAAY,QAAQ,YAAY,OAAO,GAAG,CAC5C,UAAU,QAAQ,YAAY,OAAO,GAAwB;AAG/D,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,OAAO,GAAG,CACvD,UAAS,QAAQ,YAAY,OAAO;;AAIxC,KACE,CAAC,UACD,MAAM,QAAQ,QAAQ,YAAY,aAAa,IAC/C,QAAQ,YAAY,aAAa,SAAS,GAC1C;AACA,MAAI,YAAY,QAAQ,YAAY,aAAa,GAAG,CAClD,UAAU,QAAQ,YAAY,aAAa,GAAwB;AAGrE,MAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,aAAa,GAAG,CAC7D,UAAS,QAAQ,YAAY,aAAa;;AAI9C,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,UAAU,CACvD,UAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,GAAG;AAG1D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,KAAK,CAClD,UAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,GAAG,CAAC,QAAQ,SAAS,GAAG;AAG1E,QAAO;;;;;;;;AAST,SAAgB,iBACd,SACoB;CACpB,IAAI;AACJ,KAAI,YAAY,QAAQ,gBAAgB,KAAK,CAC3C,UAAS,QAAQ,gBAAgB;AAGnC,KAAI,CAAC,UAAU,YAAY,QAAQ,gBAAgB,UAAU,CAC3D,UAAS,QAAQ,gBAAgB,UAAU,QAAQ,MAAM,GAAG;AAG9D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,UAAU,CACvD,UAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,GAAG;AAG1D,KAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,KAAK,CAClD,UAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,GAAG,CAAC,QAAQ,SAAS,GAAG;AAG1E,QAAO"}
@@ -1,23 +1,24 @@
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_utils_merge = require('./merge.cjs');
3
- let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
4
- let __stryke_convert_to_array = require("@stryke/convert/to-array");
4
+ let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
5
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
5
6
 
6
7
  //#region src/plugin-utils/extend.ts
7
8
  function extend(plugin, extension) {
8
- if ((0, __stryke_type_checks_is_function.isFunction)(plugin)) {
9
- if ((0, __stryke_type_checks_is_function.isFunction)(extension)) return async (options) => {
10
- const pluginResult = (0, __stryke_convert_to_array.toArray)(await Promise.resolve(plugin(options)));
11
- const extensionResult = (0, __stryke_convert_to_array.toArray)(await Promise.resolve(extension(options)));
9
+ if ((0, _stryke_type_checks_is_function.isFunction)(plugin)) {
10
+ if ((0, _stryke_type_checks_is_function.isFunction)(extension)) return async (options) => {
11
+ const pluginResult = (0, _stryke_convert_to_array.toArray)(await Promise.resolve(plugin(options)));
12
+ const extensionResult = (0, _stryke_convert_to_array.toArray)(await Promise.resolve(extension(options)));
12
13
  return pluginResult.map((p) => extensionResult.map((e) => require_plugin_utils_merge.merge(p, e))).flat();
13
14
  };
14
15
  return async (options) => {
15
- return (0, __stryke_convert_to_array.toArray)(await Promise.resolve(plugin(options))).map((p) => require_plugin_utils_merge.merge(p, extension));
16
+ return (0, _stryke_convert_to_array.toArray)(await Promise.resolve(plugin(options))).map((p) => require_plugin_utils_merge.merge(p, extension));
16
17
  };
17
- } else if ((0, __stryke_type_checks_is_function.isFunction)(extension)) return async (options) => {
18
- return (0, __stryke_convert_to_array.toArray)(await Promise.resolve(extension(options))).map((e) => (0, __stryke_convert_to_array.toArray)(plugin).map((p) => require_plugin_utils_merge.merge(p, e))).flat();
18
+ } else if ((0, _stryke_type_checks_is_function.isFunction)(extension)) return async (options) => {
19
+ return (0, _stryke_convert_to_array.toArray)(await Promise.resolve(extension(options))).map((e) => (0, _stryke_convert_to_array.toArray)(plugin).map((p) => require_plugin_utils_merge.merge(p, e))).flat();
19
20
  };
20
- return (0, __stryke_convert_to_array.toArray)(plugin).map((p) => require_plugin_utils_merge.merge(p, extension));
21
+ return (0, _stryke_convert_to_array.toArray)(plugin).map((p) => require_plugin_utils_merge.merge(p, extension));
21
22
  }
22
23
 
23
24
  //#endregion
@@ -3,7 +3,6 @@ import { PluginContext } from "../types/context.cjs";
3
3
  import { PartialPlugin, PartialPluginFactory, PluginFactory } from "../types/config.cjs";
4
4
 
5
5
  //#region src/plugin-utils/extend.d.ts
6
-
7
6
  /**
8
7
  * Adds additional helper functionality to a plugin via a plugin builder function.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"extend.d.cts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoCA;;;;;AAKU,iBALM,MAKN,CAAA,iBAJS,aAIT,GAJyB,aAIzB,EAAA,iBAAA,OAAA,EAAA,oBAAA,OAAA,CAAA,CAAA,MAAA,EAAA,aAAA,CAAc,QAAd,EAAwB,cAAxB,CAAA,EAAA,SAAA,EACG,oBADH,CACwB,QADxB,EACkC,iBADlC,CAAA,CAAA,EAEP,aAFO,CAEO,QAFP,EAEiB,cAFjB,GAEkC,iBAFlC,CAAA;AACwB,iBAElB,MAFkB,CAAA,iBAGf,aAHe,GAGC,aAHD,EAAA,iBAAA,OAAA,CAAA,CAAA,MAAA,EAMxB,aANwB,CAMV,QANU,EAMA,cANA,CAAA,EAAA,SAAA,EAOrB,aAPqB,CAOP,QAPO,CAAA,CAAA,EAQ/B,aAR+B,CAQjB,QARiB,EAQP,cARO,CAAA;AAAU,iBAS5B,MAT4B,CAAA,iBAUzB,aAVyB,GAUT,aAVS,EAAA,oBAAA,OAAA,CAAA,CAAA,MAAA,EAalC,MAbkC,CAa3B,QAb2B,CAAA,GAaf,MAbe,CAaR,QAbQ,CAAA,EAAA,EAAA,SAAA,EAc/B,oBAd+B,CAcV,QAdU,EAcA,iBAdA,CAAA,CAAA,EAezC,aAfyC,CAe3B,QAf2B,EAejB,iBAfiB,CAAA;AAA/B,iBAgBG,MAhBH,CAAA,iBAgB2B,aAhB3B,GAgB2C,aAhB3C,CAAA,CAAA,MAAA,EAiBH,MAjBG,CAiBI,QAjBJ,CAAA,GAiBgB,MAjBhB,CAiBuB,QAjBvB,CAAA,EAAA,EAAA,SAAA,EAkBA,aAlBA,CAkBc,QAlBd,CAAA,CAAA,EAmBV,MAnBU,CAmBH,QAnBG,CAAA,EAAA"}
1
+ {"version":3,"file":"extend.d.cts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"mappings":";;;;;;;AAoCA;;;;;iBAAgB,MAAA,kBACG,aAAA,GAAgB,aAAA,wDAAA,CAIjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,cAAA,GAAiB,iBAAA;AAAA,iBAC5B,MAAA,kBACG,aAAA,GAAgB,aAAA,2BAAA,CAGjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,aAAA,CAAc,QAAA,EAAU,cAAA;AAAA,iBACX,MAAA,kBACG,aAAA,GAAgB,aAAA,8BAAA,CAGjC,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,iBAAA;AAAA,iBACX,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,MAAA,CAAO,QAAA"}
@@ -3,7 +3,6 @@ import { PluginContext } from "../types/context.mjs";
3
3
  import { PartialPlugin, PartialPluginFactory, PluginFactory } from "../types/config.mjs";
4
4
 
5
5
  //#region src/plugin-utils/extend.d.ts
6
-
7
6
  /**
8
7
  * Adds additional helper functionality to a plugin via a plugin builder function.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"extend.d.mts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoCA;;;;;AAKU,iBALM,MAKN,CAAA,iBAJS,aAIT,GAJyB,aAIzB,EAAA,iBAAA,OAAA,EAAA,oBAAA,OAAA,CAAA,CAAA,MAAA,EAAA,aAAA,CAAc,QAAd,EAAwB,cAAxB,CAAA,EAAA,SAAA,EACG,oBADH,CACwB,QADxB,EACkC,iBADlC,CAAA,CAAA,EAEP,aAFO,CAEO,QAFP,EAEiB,cAFjB,GAEkC,iBAFlC,CAAA;AACwB,iBAElB,MAFkB,CAAA,iBAGf,aAHe,GAGC,aAHD,EAAA,iBAAA,OAAA,CAAA,CAAA,MAAA,EAMxB,aANwB,CAMV,QANU,EAMA,cANA,CAAA,EAAA,SAAA,EAOrB,aAPqB,CAOP,QAPO,CAAA,CAAA,EAQ/B,aAR+B,CAQjB,QARiB,EAQP,cARO,CAAA;AAAU,iBAS5B,MAT4B,CAAA,iBAUzB,aAVyB,GAUT,aAVS,EAAA,oBAAA,OAAA,CAAA,CAAA,MAAA,EAalC,MAbkC,CAa3B,QAb2B,CAAA,GAaf,MAbe,CAaR,QAbQ,CAAA,EAAA,EAAA,SAAA,EAc/B,oBAd+B,CAcV,QAdU,EAcA,iBAdA,CAAA,CAAA,EAezC,aAfyC,CAe3B,QAf2B,EAejB,iBAfiB,CAAA;AAA/B,iBAgBG,MAhBH,CAAA,iBAgB2B,aAhB3B,GAgB2C,aAhB3C,CAAA,CAAA,MAAA,EAiBH,MAjBG,CAiBI,QAjBJ,CAAA,GAiBgB,MAjBhB,CAiBuB,QAjBvB,CAAA,EAAA,EAAA,SAAA,EAkBA,aAlBA,CAkBc,QAlBd,CAAA,CAAA,EAmBV,MAnBU,CAmBH,QAnBG,CAAA,EAAA"}
1
+ {"version":3,"file":"extend.d.mts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"mappings":";;;;;;;AAoCA;;;;;iBAAgB,MAAA,kBACG,aAAA,GAAgB,aAAA,wDAAA,CAIjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,cAAA,GAAiB,iBAAA;AAAA,iBAC5B,MAAA,kBACG,aAAA,GAAgB,aAAA,2BAAA,CAGjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,aAAA,CAAc,QAAA,EAAU,cAAA;AAAA,iBACX,MAAA,kBACG,aAAA,GAAgB,aAAA,8BAAA,CAGjC,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,iBAAA;AAAA,iBACX,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,MAAA,CAAO,QAAA"}
@@ -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_lib_utilities_format = require('../lib/utilities/format.cjs');
3
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
4
- let __stryke_path_join = require("@stryke/path/join");
4
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
5
+ let _stryke_path_join = require("@stryke/path/join");
5
6
 
6
7
  //#region src/plugin-utils/format-package-json.ts
7
8
  /**
@@ -10,9 +11,9 @@ let __stryke_path_join = require("@stryke/path/join");
10
11
  * @param context - The powerlines context.
11
12
  */
12
13
  async function formatPackageJson(context) {
13
- const packageJsonPath = (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, "package.json");
14
+ const packageJsonPath = (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, "package.json");
14
15
  const packageJsonFile = await context.fs.read(packageJsonPath);
15
- if ((0, __stryke_type_checks_is_set_string.isSetString)(packageJsonFile)) await context.fs.write(packageJsonPath, await require_lib_utilities_format.format(context, packageJsonPath, packageJsonFile));
16
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(packageJsonFile)) await context.fs.write(packageJsonPath, await require_lib_utilities_format.format(context, packageJsonPath, packageJsonFile));
16
17
  }
17
18
 
18
19
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import { Context } from "../types/context.cjs";
2
2
 
3
3
  //#region src/plugin-utils/format-package-json.d.ts
4
-
5
4
  /**
6
5
  * Formats the `package.json` file in the project root.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format-package-json.d.cts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"sourcesContent":[],"mappings":";;;;;;AA4BA;;;iBAAsB,iBAAA,UAA2B,UAAO"}
1
+ {"version":3,"file":"format-package-json.d.cts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"mappings":";;;;;AA4BA;;;iBAAsB,iBAAA,CAAkB,OAAA,EAAS,OAAA,GAAO,OAAA"}
@@ -1,7 +1,6 @@
1
1
  import { Context } from "../types/context.mjs";
2
2
 
3
3
  //#region src/plugin-utils/format-package-json.d.ts
4
-
5
4
  /**
6
5
  * Formats the `package.json` file in the project root.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format-package-json.d.mts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"sourcesContent":[],"mappings":";;;;;;AA4BA;;;iBAAsB,iBAAA,UAA2B,UAAO"}
1
+ {"version":3,"file":"format-package-json.d.mts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"mappings":";;;;;AA4BA;;;iBAAsB,iBAAA,CAAkB,OAAA,EAAS,OAAA,GAAO,OAAA"}
@@ -1,5 +1,6 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __stryke_path_join = require("@stryke/path/join");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_path_join = require("@stryke/path/join");
3
4
  let node_fs = require("node:fs");
4
5
 
5
6
  //#region src/plugin-utils/get-config-path.ts
@@ -11,38 +12,38 @@ let node_fs = require("node:fs");
11
12
  * @returns The absolute path to the configuration file, or undefined if not found.
12
13
  */
13
14
  function getConfigPath(context, name) {
14
- if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`);
15
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`);
16
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`);
17
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`);
18
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`);
19
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`);
20
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`);
21
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`);
22
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`);
23
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`);
24
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`);
25
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`);
26
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`);
27
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`);
28
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`);
29
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`);
30
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`);
31
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`);
32
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`);
33
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);
34
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`);
35
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`);
36
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`);
37
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`);
38
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`);
39
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`);
40
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`);
41
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`);
42
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`);
43
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`);
44
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`);
45
- else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`);
15
+ if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`);
16
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`);
17
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`);
18
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`);
19
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`);
20
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`);
21
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`);
22
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`);
23
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`);
24
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`);
25
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`);
26
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`);
27
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`);
28
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`);
29
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`);
30
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`);
31
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`);
32
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`);
33
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`);
34
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);
35
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`);
36
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`);
37
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`);
38
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`);
39
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`);
40
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`);
41
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`);
42
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`);
43
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`);
44
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`);
45
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`);
46
+ else if ((0, node_fs.existsSync)((0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`))) return (0, _stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`);
46
47
  }
47
48
 
48
49
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import { UnresolvedContext } from "../types/context.cjs";
2
2
 
3
3
  //#region src/plugin-utils/get-config-path.d.ts
4
-
5
4
  /**
6
5
  * Get the configuration file path for a given name.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-config-path.d.cts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"sourcesContent":[],"mappings":";;;;;;AA6BA;;;;;iBAAgB,aAAA,UACL"}
1
+ {"version":3,"file":"get-config-path.d.cts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"mappings":";;;;;AA6BA;;;;;iBAAgB,aAAA,CACd,OAAA,EAAS,iBAAA,EACT,IAAA"}
@@ -1,7 +1,6 @@
1
1
  import { UnresolvedContext } from "../types/context.mjs";
2
2
 
3
3
  //#region src/plugin-utils/get-config-path.d.ts
4
-
5
4
  /**
6
5
  * Get the configuration file path for a given name.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-config-path.d.mts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"sourcesContent":[],"mappings":";;;;;;AA6BA;;;;;iBAAgB,aAAA,UACL"}
1
+ {"version":3,"file":"get-config-path.d.mts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"mappings":";;;;;AA6BA;;;;;iBAAgB,aAAA,CACd,OAAA,EAAS,iBAAA,EACT,IAAA"}