powerlines 0.37.31 → 0.37.32

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 (155) hide show
  1. package/dist/api.cjs +2 -2
  2. package/dist/api.js +1 -1
  3. package/dist/astro.cjs +4 -4
  4. package/dist/astro.js +3 -3
  5. package/dist/{chunk-ST65VKTR.cjs → chunk-3ZV6MOMH.cjs} +167 -210
  6. package/dist/{chunk-Z5JSF22L.js → chunk-D5W4OJQI.js} +3 -3
  7. package/dist/{chunk-4VHA6QFN.js → chunk-DFHVFK5Q.js} +154 -199
  8. package/dist/{chunk-K2PLWWNA.js → chunk-DJ4FRBNH.js} +3 -3
  9. package/dist/{chunk-5WZHLXMC.js → chunk-MJ7BK6OR.js} +3 -3
  10. package/dist/{chunk-DQFKSPI5.cjs → chunk-OLOGZ27T.cjs} +5 -5
  11. package/dist/{chunk-6WYVGWDN.cjs → chunk-UO3UVXLR.cjs} +4 -4
  12. package/dist/{chunk-W6O3CPYC.js → chunk-VURVUUYR.js} +3 -3
  13. package/dist/chunk-WD2SDIXV.cjs +12 -0
  14. package/dist/{chunk-MS7QGIJM.cjs → chunk-XR4OJDFT.cjs} +4 -4
  15. package/dist/chunk-XZI5Z56Q.cjs +12 -0
  16. package/dist/{chunk-3XBU4DDR.js → chunk-Z4HHHZMP.js} +3 -3
  17. package/dist/esbuild.cjs +6 -6
  18. package/dist/esbuild.js +3 -3
  19. package/dist/farm.cjs +3 -3
  20. package/dist/farm.js +2 -2
  21. package/dist/index.cjs +10 -10
  22. package/dist/index.js +2 -2
  23. package/dist/lib/build/esbuild.cjs +5 -5
  24. package/dist/lib/build/esbuild.js +2 -2
  25. package/dist/lib/build/index.cjs +12 -12
  26. package/dist/lib/build/index.d.cts +1 -1
  27. package/dist/lib/build/index.d.ts +1 -1
  28. package/dist/lib/build/index.js +4 -4
  29. package/dist/lib/build/tsup.cjs +6 -6
  30. package/dist/lib/build/tsup.js +3 -3
  31. package/dist/lib/build/unbuild.d.cts +1 -1
  32. package/dist/lib/build/unbuild.d.ts +1 -1
  33. package/dist/lib/build/vite.cjs +5 -5
  34. package/dist/lib/build/vite.js +3 -3
  35. package/dist/lib/{chunk-NPRQVHXP.cjs → chunk-2J3BIEL5.cjs} +7 -83
  36. package/dist/lib/chunk-2J3BIEL5.cjs.map +1 -0
  37. package/dist/lib/{chunk-NMZHPWB6.js → chunk-2JWZTFXS.js} +4 -4
  38. package/dist/lib/{chunk-NMZHPWB6.js.map → chunk-2JWZTFXS.js.map} +1 -1
  39. package/dist/lib/{chunk-FSQATFTG.js → chunk-2NYU6PWO.js} +3 -3
  40. package/dist/lib/{chunk-FSQATFTG.js.map → chunk-2NYU6PWO.js.map} +1 -1
  41. package/dist/lib/{chunk-TFOAWLRF.js → chunk-2Q4HYRK6.js} +3 -3
  42. package/dist/lib/{chunk-TFOAWLRF.js.map → chunk-2Q4HYRK6.js.map} +1 -1
  43. package/dist/lib/{chunk-3DYPJHNF.js → chunk-5X6JDPCN.js} +3 -3
  44. package/dist/lib/{chunk-3DYPJHNF.js.map → chunk-5X6JDPCN.js.map} +1 -1
  45. package/dist/lib/{chunk-37QKQRHL.js → chunk-ABGPMB5O.js} +3 -3
  46. package/dist/lib/{chunk-37QKQRHL.js.map → chunk-ABGPMB5O.js.map} +1 -1
  47. package/dist/lib/{chunk-O7HKPUBS.cjs → chunk-BCRIAJHV.cjs} +4 -4
  48. package/dist/lib/{chunk-O7HKPUBS.cjs.map → chunk-BCRIAJHV.cjs.map} +1 -1
  49. package/dist/lib/{chunk-7ZLMFCZF.js → chunk-CQMZHDZP.js} +3 -3
  50. package/dist/lib/{chunk-7ZLMFCZF.js.map → chunk-CQMZHDZP.js.map} +1 -1
  51. package/dist/lib/{chunk-NMCDCHEL.cjs → chunk-HFM5IVGD.cjs} +39 -33
  52. package/dist/lib/chunk-HFM5IVGD.cjs.map +1 -0
  53. package/dist/lib/{chunk-GF5FQKAI.js → chunk-HX5UF7YV.js} +36 -30
  54. package/dist/lib/chunk-HX5UF7YV.js.map +1 -0
  55. package/dist/lib/{chunk-6MX6ZNGS.cjs → chunk-JF4ZEC67.cjs} +19 -19
  56. package/dist/lib/{chunk-6MX6ZNGS.cjs.map → chunk-JF4ZEC67.cjs.map} +1 -1
  57. package/dist/lib/{chunk-PD6TYAFZ.cjs → chunk-KCMW3IVY.cjs} +4 -4
  58. package/dist/lib/{chunk-PD6TYAFZ.cjs.map → chunk-KCMW3IVY.cjs.map} +1 -1
  59. package/dist/lib/{chunk-S6HKYEP4.js → chunk-L3BXKH76.js} +51 -48
  60. package/dist/lib/chunk-L3BXKH76.js.map +1 -0
  61. package/dist/lib/{chunk-TAXCKJWL.cjs → chunk-LV5UDNR3.cjs} +75 -72
  62. package/dist/lib/chunk-LV5UDNR3.cjs.map +1 -0
  63. package/dist/lib/{chunk-KLU5DWCZ.js → chunk-N37JIOZ4.js} +28 -8
  64. package/dist/lib/chunk-N37JIOZ4.js.map +1 -0
  65. package/dist/lib/{chunk-HUWGH27W.cjs → chunk-N3CUVN4G.cjs} +4 -4
  66. package/dist/lib/{chunk-HUWGH27W.cjs.map → chunk-N3CUVN4G.cjs.map} +1 -1
  67. package/dist/lib/{chunk-TAHP4BEC.cjs → chunk-NAMUQY7P.cjs} +4 -4
  68. package/dist/lib/{chunk-TAHP4BEC.cjs.map → chunk-NAMUQY7P.cjs.map} +1 -1
  69. package/dist/lib/{chunk-TBRFVVYJ.cjs → chunk-O3ZBMF6Z.cjs} +6 -6
  70. package/dist/lib/{chunk-TBRFVVYJ.cjs.map → chunk-O3ZBMF6Z.cjs.map} +1 -1
  71. package/dist/lib/{chunk-QNGZB26V.cjs → chunk-V5I52KN4.cjs} +4 -4
  72. package/dist/lib/{chunk-QNGZB26V.cjs.map → chunk-V5I52KN4.cjs.map} +1 -1
  73. package/dist/lib/{chunk-NMHBDJX7.js → chunk-WQRK3BBU.js} +7 -83
  74. package/dist/lib/chunk-WQRK3BBU.js.map +1 -0
  75. package/dist/lib/{chunk-EEF6LJVD.js → chunk-X6CZ2G2G.js} +3 -3
  76. package/dist/lib/{chunk-EEF6LJVD.js.map → chunk-X6CZ2G2G.js.map} +1 -1
  77. package/dist/lib/{chunk-FQZQA4EJ.cjs → chunk-Y36HVRRL.cjs} +29 -7
  78. package/dist/lib/chunk-Y36HVRRL.cjs.map +1 -0
  79. package/dist/lib/contexts/api-context.cjs +6 -6
  80. package/dist/lib/contexts/api-context.d.cts +1 -1
  81. package/dist/lib/contexts/api-context.d.ts +1 -1
  82. package/dist/lib/contexts/api-context.js +5 -5
  83. package/dist/lib/contexts/context.cjs +4 -4
  84. package/dist/lib/contexts/context.d.cts +5 -5
  85. package/dist/lib/contexts/context.d.ts +5 -5
  86. package/dist/lib/contexts/context.js +3 -3
  87. package/dist/lib/contexts/environment-context.cjs +5 -5
  88. package/dist/lib/contexts/environment-context.d.cts +1 -1
  89. package/dist/lib/contexts/environment-context.d.ts +1 -1
  90. package/dist/lib/contexts/environment-context.js +4 -4
  91. package/dist/lib/contexts/index.cjs +8 -8
  92. package/dist/lib/contexts/index.d.cts +1 -1
  93. package/dist/lib/contexts/index.d.ts +1 -1
  94. package/dist/lib/contexts/index.js +5 -5
  95. package/dist/lib/contexts/plugin-context.d.cts +1 -1
  96. package/dist/lib/contexts/plugin-context.d.ts +1 -1
  97. package/dist/lib/entry.cjs +17 -9
  98. package/dist/lib/entry.d.cts +16 -2
  99. package/dist/lib/entry.d.ts +16 -2
  100. package/dist/lib/entry.js +1 -1
  101. package/dist/lib/fs/index.cjs +2 -2
  102. package/dist/lib/fs/index.js +1 -1
  103. package/dist/lib/fs/vfs.cjs +2 -2
  104. package/dist/lib/fs/vfs.js +1 -1
  105. package/dist/lib/index.cjs +32 -24
  106. package/dist/lib/index.d.cts +2 -2
  107. package/dist/lib/index.d.ts +2 -2
  108. package/dist/lib/index.js +9 -9
  109. package/dist/lib/{internal-DyXNBori.d.ts → internal-CFBs3Fok.d.cts} +1 -5
  110. package/dist/lib/{internal-Dt8PM9M2.d.cts → internal-Dlj-vo3a.d.ts} +1 -5
  111. package/dist/lib/unplugin/factory.cjs +7 -7
  112. package/dist/lib/unplugin/factory.js +6 -6
  113. package/dist/lib/unplugin/index.cjs +7 -7
  114. package/dist/lib/unplugin/index.js +6 -6
  115. package/dist/lib/utilities/bundle.cjs +4 -4
  116. package/dist/lib/utilities/bundle.js +3 -3
  117. package/dist/lib/utilities/index.cjs +6 -6
  118. package/dist/lib/utilities/index.js +4 -4
  119. package/dist/lib/utilities/resolve.cjs +5 -5
  120. package/dist/lib/utilities/resolve.js +4 -4
  121. package/dist/next.cjs +4 -4
  122. package/dist/next.js +3 -3
  123. package/dist/nuxt.cjs +8 -13
  124. package/dist/nuxt.js +4 -9
  125. package/dist/rolldown.cjs +6 -6
  126. package/dist/rolldown.js +3 -3
  127. package/dist/rollup.cjs +3 -3
  128. package/dist/rollup.js +2 -2
  129. package/dist/rspack.cjs +3 -3
  130. package/dist/rspack.js +2 -2
  131. package/dist/tsdown.cjs +4 -4
  132. package/dist/tsdown.js +3 -3
  133. package/dist/tsup.cjs +4 -4
  134. package/dist/tsup.js +3 -3
  135. package/dist/types/internal.d.cts +1 -5
  136. package/dist/types/internal.d.ts +1 -5
  137. package/dist/unloader.cjs +3 -3
  138. package/dist/unloader.js +2 -2
  139. package/dist/unplugin.cjs +8 -8
  140. package/dist/unplugin.js +4 -4
  141. package/dist/vite.cjs +6 -6
  142. package/dist/vite.js +3 -3
  143. package/dist/webpack.cjs +6 -6
  144. package/dist/webpack.js +3 -3
  145. package/package.json +2 -2
  146. package/dist/chunk-KQNFLNDO.cjs +0 -12
  147. package/dist/chunk-ZPGYJJAN.cjs +0 -12
  148. package/dist/lib/chunk-FQZQA4EJ.cjs.map +0 -1
  149. package/dist/lib/chunk-GF5FQKAI.js.map +0 -1
  150. package/dist/lib/chunk-KLU5DWCZ.js.map +0 -1
  151. package/dist/lib/chunk-NMCDCHEL.cjs.map +0 -1
  152. package/dist/lib/chunk-NMHBDJX7.js.map +0 -1
  153. package/dist/lib/chunk-NPRQVHXP.cjs.map +0 -1
  154. package/dist/lib/chunk-S6HKYEP4.js.map +0 -1
  155. package/dist/lib/chunk-TAXCKJWL.cjs.map +0 -1
@@ -5,7 +5,6 @@ var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
6
  var core = require('@babel/core');
7
7
  var console = require('@storm-software/config-tools/logger/console');
8
- var types = require('@storm-software/config-tools/types');
9
8
  var toArray = require('@stryke/convert/to-array');
10
9
  var helpers = require('@stryke/fs/helpers');
11
10
  var install = require('@stryke/fs/install');
@@ -28,6 +27,7 @@ var chalk5 = require('chalk');
28
27
  var Handlebars = require('handlebars');
29
28
  var helperPluginUtils = require('@babel/helper-plugin-utils');
30
29
  var t = require('@babel/types');
30
+ var types = require('@storm-software/config-tools/types');
31
31
  var ts = require('typescript');
32
32
  var defu7 = require('defu');
33
33
  var tsMorph = require('ts-morph');
@@ -107,6 +107,11 @@ var ts__default = /*#__PURE__*/_interopDefault(ts);
107
107
  var defu7__default = /*#__PURE__*/_interopDefault(defu7);
108
108
  var $__namespace = /*#__PURE__*/_interopNamespace($);
109
109
 
110
+ // package.json
111
+ var name = "powerlines";
112
+ var version = "0.37.31";
113
+ var package_default = {
114
+ version};
110
115
  function resolveModulePath(nodePath, state) {
111
116
  if (!t__namespace.isStringLiteral(nodePath.node)) {
112
117
  return;
@@ -146,8 +151,8 @@ function matchesPattern(state, calleePath, pattern) {
146
151
  if (!t__namespace.isIdentifier(node) || pattern.includes(".")) {
147
152
  return false;
148
153
  }
149
- const name = pattern.split(".")[0];
150
- return node.name === name;
154
+ const name2 = pattern.split(".")[0];
155
+ return node.name === name2;
151
156
  }
152
157
  chunkPK6SKIKE_cjs.__name(matchesPattern, "matchesPattern");
153
158
  var importVisitors = {
@@ -481,13 +486,13 @@ async function installDependencies(context) {
481
486
  }
482
487
  context.log(types.LogLevelLabel.DEBUG, `The following packages are required:
483
488
  Dependencies:
484
- ${Object.entries(context.dependencies).map(([name, version]) => `- ${name}@${String(version)}`).join(" \n")}
489
+ ${Object.entries(context.dependencies).map(([name2, version2]) => `- ${name2}@${String(version2)}`).join(" \n")}
485
490
 
486
491
  DevDependencies:
487
- ${Object.entries(context.devDependencies).map(([name, version]) => `- ${name}@${String(version)}`).join(" \n")}`);
492
+ ${Object.entries(context.devDependencies).map(([name2, version2]) => `- ${name2}@${String(version2)}`).join(" \n")}`);
488
493
  await Promise.all([
489
- Promise.all(Object.entries(context.dependencies).map(async ([name, version]) => installPackage(context, `${_package.getPackageName(name)}@${String(version)}`, false))),
490
- Promise.all(Object.entries(context.devDependencies).map(async ([name, version]) => installPackage(context, `${_package.getPackageName(name)}@${String(version)}`, true)))
494
+ Promise.all(Object.entries(context.dependencies).map(async ([name2, version2]) => installPackage(context, `${_package.getPackageName(name2)}@${String(version2)}`, false))),
495
+ Promise.all(Object.entries(context.devDependencies).map(async ([name2, version2]) => installPackage(context, `${_package.getPackageName(name2)}@${String(version2)}`, true)))
491
496
  ]);
492
497
  }
493
498
  chunkPK6SKIKE_cjs.__name(installDependencies, "installDependencies");
@@ -706,9 +711,9 @@ var DEFAULT_ENVIRONMENT = "default";
706
711
  var GLOBAL_ENVIRONMENT = "__global__";
707
712
 
708
713
  // src/internal/helpers/environment.ts
709
- function createEnvironment(name, userConfig) {
710
- return defu7__default.default(userConfig.environments?.[name] ?? {}, {
711
- name,
714
+ function createEnvironment(name2, userConfig) {
715
+ return defu7__default.default(userConfig.environments?.[name2] ?? {}, {
716
+ name: name2,
712
717
  title: userConfig.title || titleCase.titleCase(userConfig.name),
713
718
  ssr: false,
714
719
  mainFields: userConfig.build?.platform === "browser" ? [
@@ -936,19 +941,39 @@ function resolveEntry(context, typeDefinition) {
936
941
  };
937
942
  }
938
943
  chunkPK6SKIKE_cjs.__name(resolveEntry, "resolveEntry");
944
+ function isTypeDefinition(entry) {
945
+ return !isString.isString(entry) && entry.file !== void 0;
946
+ }
947
+ chunkPK6SKIKE_cjs.__name(isTypeDefinition, "isTypeDefinition");
948
+ function isResolvedEntryTypeDefinition(entry) {
949
+ return isTypeDefinition(entry) && entry.input !== void 0 && entry.output !== void 0;
950
+ }
951
+ chunkPK6SKIKE_cjs.__name(isResolvedEntryTypeDefinition, "isResolvedEntryTypeDefinition");
939
952
  function resolveEntriesSync(context, typeDefinitions) {
940
- return typeDefinitions.map((entry) => isString.isString(entry) ? replacePathTokens(context, entry) : replacePathTokens(context, entry.file)).map((typeDefinition) => {
941
- const parsed = parseTypeDefinition.parseTypeDefinition(typeDefinition);
942
- const filePath = append.appendPath(parsed.file, context.config.projectRoot);
953
+ return typeDefinitions.map((entry) => {
954
+ if (isResolvedEntryTypeDefinition(entry)) {
955
+ return {
956
+ ...entry,
957
+ file: replacePathTokens(context, entry.file)
958
+ };
959
+ }
960
+ let typeDefinition;
961
+ if (isString.isString(entry)) {
962
+ typeDefinition = parseTypeDefinition.parseTypeDefinition(replacePathTokens(context, entry));
963
+ } else {
964
+ typeDefinition = entry;
965
+ typeDefinition.file = replacePathTokens(context, typeDefinition.file);
966
+ }
967
+ const filePath = append.appendPath(typeDefinition.file, context.config.projectRoot);
943
968
  if (isFile.isFile(filePath)) {
944
969
  return resolveEntry(context, {
945
970
  file: replace.replacePath(filePath, context.config.projectRoot),
946
- name: parsed.name
971
+ name: typeDefinition.name
947
972
  });
948
973
  }
949
974
  return listFiles.listFilesSync(filePath).map((file) => resolveEntry(context, {
950
975
  file,
951
- name: parsed.name
976
+ name: typeDefinition.name
952
977
  }));
953
978
  }).flat().filter(Boolean);
954
979
  }
@@ -1181,7 +1206,7 @@ FileMetadata._Properties = $__namespace.CompositeList(FileMetadata_KeyValuePair)
1181
1206
  FileSystem._Ids = $__namespace.CompositeList(FileId);
1182
1207
  FileSystem._Storage = $__namespace.CompositeList(FileStorage);
1183
1208
  FileSystem._Metadata = $__namespace.CompositeList(FileMetadata);
1184
- var createLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((name, options = {}) => {
1209
+ var createLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((name2, options = {}) => {
1185
1210
  const logLevel = options.logLevel === null ? types.LogLevelLabel.SILENT : options.logLevel || types.LogLevelLabel.INFO;
1186
1211
  if (logLevel === types.LogLevelLabel.SILENT) {
1187
1212
  return noop.noop;
@@ -1192,7 +1217,7 @@ var createLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((name, options = {}) =>
1192
1217
  return (type, ...args) => logger.getLogFn(logger.getLogLevel(type), {
1193
1218
  ...options,
1194
1219
  logLevel
1195
- })(`${chalk5__default.default.bold.hex(colors.getColor("brand", options))(`${name ? kebabCase.kebabCase(name) : ""}${options.name ? `${name ? chalk5__default.default.gray(" > ") : ""}${kebabCase.kebabCase(options.name)}` : ""}${chalk5__default.default.gray(" > ")}`)}${args.join(" ")} `.trim());
1220
+ })(`${chalk5__default.default.bold.hex(colors.getColor("brand", options))(`${name2 ? kebabCase.kebabCase(name2) : ""}${options.name ? `${name2 ? chalk5__default.default.gray(" > ") : ""}${kebabCase.kebabCase(options.name)}` : ""}${chalk5__default.default.gray(" > ")}`)}${args.join(" ")} `.trim());
1196
1221
  }, "createLog");
1197
1222
  var BADGE_COLORS = [
1198
1223
  "#00A0DD",
@@ -1218,8 +1243,8 @@ var BADGE_COLORS = [
1218
1243
  "#34D399",
1219
1244
  "#8B5CF6"
1220
1245
  ];
1221
- var extendLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((logFn, name) => {
1222
- return (type, ...args) => logFn(type, ` ${chalk5__default.default.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase.titleCase(name)} `)} ${args.join(" ")} `);
1246
+ var extendLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((logFn, name2) => {
1247
+ return (type, ...args) => logFn(type, ` ${chalk5__default.default.inverse.hex(BADGE_COLORS[name2.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase.titleCase(name2)} `)} ${args.join(" ")} `);
1223
1248
  }, "extendLog");
1224
1249
  async function format(path, data) {
1225
1250
  let code = data;
@@ -1878,12 +1903,12 @@ var VirtualFileSystem = class _VirtualFileSystem {
1878
1903
  }
1879
1904
  let metadata;
1880
1905
  if (fs._hasMetadata()) {
1881
- metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1906
+ metadata = fs.metadata.find((meta) => meta.id === result.#normalizeId(id?.id ?? file.path));
1882
1907
  }
1883
1908
  await result.write(file.path, file.code, {
1884
1909
  meta: {
1885
- id: id?.id || metadata?.id,
1886
- type: metadata?.type,
1910
+ id: result.#normalizeId(id?.id ?? metadata?.id ?? file.path),
1911
+ type: metadata?.type || "normal",
1887
1912
  properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1888
1913
  ret[kvp.key] = kvp.value;
1889
1914
  return ret;
@@ -1894,37 +1919,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
1894
1919
  }
1895
1920
  }));
1896
1921
  }
1897
- if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1898
- result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1899
- const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1900
- if (meta.properties) {
1901
- const typeDefinition = {
1902
- file: path
1903
- };
1904
- if (isSetString.isSetString(meta.properties.name)) {
1905
- typeDefinition.name = meta.properties.name;
1906
- }
1907
- if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
1908
- typeDefinition.input ??= {};
1909
- if (isSetString.isSetString(meta.properties["input.file"])) {
1910
- typeDefinition.input.file = meta.properties["input.file"];
1911
- }
1912
- if (isSetString.isSetString(meta.properties["input.name"])) {
1913
- typeDefinition.input.name = meta.properties["input.name"];
1914
- }
1915
- }
1916
- if (isSetString.isSetString(meta.properties.output)) {
1917
- typeDefinition.output = meta.properties.output;
1918
- }
1919
- return typeDefinition;
1920
- }
1921
- return null;
1922
- }).filter(Boolean);
1923
- result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1924
- context.entry = entry;
1925
- } else {
1926
- result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1927
- }
1928
1922
  } else {
1929
1923
  const message = new $__namespace.Message();
1930
1924
  result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
@@ -1955,11 +1949,11 @@ var VirtualFileSystem = class _VirtualFileSystem {
1955
1949
  }
1956
1950
  let metadata;
1957
1951
  if (fs._hasMetadata()) {
1958
- metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1952
+ metadata = fs.metadata.find((meta) => meta.id === result.#normalizeId(id?.id ?? file.path));
1959
1953
  }
1960
1954
  result.writeSync(file.path, file.code, {
1961
1955
  meta: {
1962
- id: id?.id || metadata?.id,
1956
+ id: result.#normalizeId(id?.id ?? metadata?.id ?? file.path),
1963
1957
  type: metadata?.type,
1964
1958
  properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1965
1959
  ret[kvp.key] = kvp.value;
@@ -1971,37 +1965,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
1971
1965
  }
1972
1966
  });
1973
1967
  }
1974
- if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1975
- result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1976
- const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1977
- if (meta.properties) {
1978
- const typeDefinition = {
1979
- file: path
1980
- };
1981
- if (isSetString.isSetString(meta.properties.name)) {
1982
- typeDefinition.name = meta.properties.name;
1983
- }
1984
- if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
1985
- typeDefinition.input ??= {};
1986
- if (isSetString.isSetString(meta.properties["input.file"])) {
1987
- typeDefinition.input.file = meta.properties["input.file"];
1988
- }
1989
- if (isSetString.isSetString(meta.properties["input.name"])) {
1990
- typeDefinition.input.name = meta.properties["input.name"];
1991
- }
1992
- }
1993
- if (isSetString.isSetString(meta.properties.output)) {
1994
- typeDefinition.output = meta.properties.output;
1995
- }
1996
- return typeDefinition;
1997
- }
1998
- return null;
1999
- }).filter(Boolean);
2000
- result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
2001
- context.entry = entry;
2002
- } else {
2003
- result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
2004
- }
2005
1968
  } else {
2006
1969
  const message = new $__namespace.Message();
2007
1970
  result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
@@ -2138,20 +2101,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
2138
2101
  };
2139
2102
  return ret;
2140
2103
  }, {});
2141
- if (context.config.skipCache !== true) {
2142
- Object.entries(this.#metadata).filter(([, value]) => value.type === "entry").forEach(([id, value]) => {
2143
- this.#context.entry ??= [];
2144
- this.#context.entry.push({
2145
- file: id,
2146
- name: value.properties.name,
2147
- output: value.properties.output,
2148
- input: value.properties["input.file"] ? {
2149
- file: value.properties["input.file"],
2150
- name: value.properties["input.name"]
2151
- } : void 0
2152
- });
2153
- });
2154
- }
2155
2104
  }
2156
2105
  this.#ids = {};
2157
2106
  this.#paths = {};
@@ -2845,8 +2794,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
2845
2794
  };
2846
2795
  var PROJECT_ROOT_HASH_LENGTH = 45;
2847
2796
  var CACHE_HASH_LENGTH = 62;
2848
- function getPrefixedProjectRootHash(name, projectRootHash) {
2849
- const combined = `${kebabCase.kebabCase(name)}_${projectRootHash}`;
2797
+ function getPrefixedProjectRootHash(name2, projectRootHash) {
2798
+ const combined = `${kebabCase.kebabCase(name2)}_${projectRootHash}`;
2850
2799
  return combined.length > PROJECT_ROOT_HASH_LENGTH ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH) : combined;
2851
2800
  }
2852
2801
  chunkPK6SKIKE_cjs.__name(getPrefixedProjectRootHash, "getPrefixedProjectRootHash");
@@ -2882,9 +2831,7 @@ var PowerlinesContext = class _PowerlinesContext {
2882
2831
  *
2883
2832
  * @internal
2884
2833
  */
2885
- #internal = {
2886
- entry: []
2887
- };
2834
+ #internal = {};
2888
2835
  #workspaceConfig;
2889
2836
  #checksum = null;
2890
2837
  #buildId = uuid.uuid();
@@ -3005,13 +2952,8 @@ var PowerlinesContext = class _PowerlinesContext {
3005
2952
  * The resolved entry type definitions for the project
3006
2953
  */
3007
2954
  get entry() {
3008
- return resolveEntriesSync(this, !this.$$internal.entry || this.$$internal.entry.length === 0 ? toArray.toArray(this.config.entry) : this.$$internal.entry);
3009
- }
3010
- /**
3011
- * Sets the resolved entry type definitions for the project
3012
- */
3013
- set entry(value) {
3014
- this.$$internal.entry = value;
2955
+ const entry = this._entry;
2956
+ return resolveEntriesSync(this, !entry || entry.length === 0 ? toArray.toArray(this.config.entry) : entry);
3015
2957
  }
3016
2958
  /**
3017
2959
  * The TypeScript configuration parsed from the tsconfig file
@@ -3211,6 +3153,35 @@ var PowerlinesContext = class _PowerlinesContext {
3211
3153
  return this.#requestCache;
3212
3154
  }
3213
3155
  /**
3156
+ * The entry points that exist in the Powerlines virtual file system
3157
+ */
3158
+ get _entry() {
3159
+ return Object.entries(this.fs.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
3160
+ if (meta.properties) {
3161
+ const typeDefinition = {
3162
+ file: path
3163
+ };
3164
+ if (isSetString.isSetString(meta.properties.name)) {
3165
+ typeDefinition.name = meta.properties.name;
3166
+ }
3167
+ if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
3168
+ typeDefinition.input ??= {};
3169
+ if (isSetString.isSetString(meta.properties["input.file"])) {
3170
+ typeDefinition.input.file = meta.properties["input.file"];
3171
+ }
3172
+ if (isSetString.isSetString(meta.properties["input.name"])) {
3173
+ typeDefinition.input.name = meta.properties["input.name"];
3174
+ }
3175
+ }
3176
+ if (isSetString.isSetString(meta.properties.output)) {
3177
+ typeDefinition.output = meta.properties.output;
3178
+ }
3179
+ return typeDefinition;
3180
+ }
3181
+ return void 0;
3182
+ }).filter(Boolean);
3183
+ }
3184
+ /**
3214
3185
  * A function to perform HTTP fetch requests
3215
3186
  *
3216
3187
  * @remarks
@@ -3468,14 +3439,6 @@ var PowerlinesContext = class _PowerlinesContext {
3468
3439
  */
3469
3440
  async emitEntry(code, path, options = {}) {
3470
3441
  const entryPath = append.appendPath(replace.replacePath(replace.replacePath(replace.replacePath(path, this.entryPath), this.config.projectRoot), this.workspaceConfig.workspaceRoot), this.entryPath);
3471
- if (this.$$internal.entry) {
3472
- this.$$internal.entry.push({
3473
- name: options.name,
3474
- file: entryPath,
3475
- input: options.input,
3476
- output: options.output
3477
- });
3478
- }
3479
3442
  return this.emit(code, entryPath, defu7__default.default({
3480
3443
  meta: {
3481
3444
  type: "entry",
@@ -3500,14 +3463,6 @@ var PowerlinesContext = class _PowerlinesContext {
3500
3463
  */
3501
3464
  emitEntrySync(code, path, options = {}) {
3502
3465
  const entryPath = append.appendPath(replace.replacePath(replace.replacePath(replace.replacePath(path, this.entryPath), this.config.projectRoot), this.workspaceConfig.workspaceRoot), this.entryPath);
3503
- if (this.$$internal.entry) {
3504
- this.$$internal.entry.push({
3505
- name: options?.name,
3506
- file: entryPath,
3507
- input: options?.input,
3508
- output: options?.output
3509
- });
3510
- }
3511
3466
  return this.emitSync(code, entryPath, defu7__default.default({
3512
3467
  meta: {
3513
3468
  type: "entry",
@@ -3649,8 +3604,8 @@ var PowerlinesContext = class _PowerlinesContext {
3649
3604
  * @param name - The name to use for the logger instance
3650
3605
  * @returns A logger function
3651
3606
  */
3652
- createLog(name = null) {
3653
- return createLog(name, {
3607
+ createLog(name2 = null) {
3608
+ return createLog(name2, {
3654
3609
  ...this.config,
3655
3610
  logLevel: isNull.isNull(this.config.logLevel) ? "silent" : this.config.logLevel
3656
3611
  });
@@ -3661,8 +3616,8 @@ var PowerlinesContext = class _PowerlinesContext {
3661
3616
  * @param name - The name to use for the extended logger instance
3662
3617
  * @returns A logger function
3663
3618
  */
3664
- extendLog(name) {
3665
- return extendLog(this.log, name);
3619
+ extendLog(name2) {
3620
+ return extendLog(this.log, name2);
3666
3621
  }
3667
3622
  /**
3668
3623
  * Generates a checksum representing the current context state
@@ -4286,7 +4241,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
4286
4241
  */
4287
4242
  async init(config = {}) {
4288
4243
  await super.init(config);
4289
- await Promise.all(toArray.toArray(this.config.userConfig.environments && Object.keys(this.config.userConfig.environments).length > 0 ? Object.keys(this.config.userConfig.environments).map((name) => createEnvironment(name, this.config.userConfig)) : createDefaultEnvironment(this.config.userConfig)).map(async (env) => {
4244
+ await Promise.all(toArray.toArray(this.config.userConfig.environments && Object.keys(this.config.userConfig.environments).length > 0 ? Object.keys(this.config.userConfig.environments).map((name2) => createEnvironment(name2, this.config.userConfig)) : createDefaultEnvironment(this.config.userConfig)).map(async (env) => {
4290
4245
  this.#environments[env.name] = await this.in(env);
4291
4246
  }));
4292
4247
  }
@@ -4322,8 +4277,8 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
4322
4277
  isHighPriority: true
4323
4278
  }) {
4324
4279
  await super.withUserConfig(userConfig, options);
4325
- await Promise.all(Object.keys(this.#environments).map(async (name) => {
4326
- await this.#environments[name].withUserConfig(userConfig, options);
4280
+ await Promise.all(Object.keys(this.#environments).map(async (name2) => {
4281
+ await this.#environments[name2].withUserConfig(userConfig, options);
4327
4282
  }));
4328
4283
  }
4329
4284
  /**
@@ -4335,8 +4290,8 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
4335
4290
  isHighPriority: true
4336
4291
  }) {
4337
4292
  await super.withInlineConfig(inlineConfig, options);
4338
- await Promise.all(Object.keys(this.#environments).map(async (name) => {
4339
- await this.#environments[name].withInlineConfig(inlineConfig, options);
4293
+ await Promise.all(Object.keys(this.#environments).map(async (name2) => {
4294
+ await this.#environments[name2].withInlineConfig(inlineConfig, options);
4340
4295
  }));
4341
4296
  }
4342
4297
  /**
@@ -4346,8 +4301,8 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
4346
4301
  */
4347
4302
  async addPlugin(plugin) {
4348
4303
  this.plugins.push(plugin);
4349
- await Promise.all(Object.keys(this.environments).map(async (name) => {
4350
- await this.environments[name].addPlugin(plugin);
4304
+ await Promise.all(Object.keys(this.environments).map(async (name2) => {
4305
+ await this.environments[name2].addPlugin(plugin);
4351
4306
  }));
4352
4307
  }
4353
4308
  /**
@@ -4356,18 +4311,18 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
4356
4311
  * @param name - The name of the environment to retrieve.
4357
4312
  * @returns The requested environment context.
4358
4313
  */
4359
- async getEnvironment(name) {
4314
+ async getEnvironment(name2) {
4360
4315
  let environment;
4361
- if (name) {
4362
- environment = this.environments[name];
4316
+ if (name2) {
4317
+ environment = this.environments[name2];
4363
4318
  }
4364
4319
  if (Object.keys(this.environments).length === 1) {
4365
4320
  environment = this.environments[Object.keys(this.environments)[0]];
4366
4321
  this.log(types.LogLevelLabel.DEBUG, `Applying the only configured environment: ${chalk5__default.default.bold.cyanBright(environment?.environment.name)}`);
4367
4322
  }
4368
4323
  if (!environment) {
4369
- if (name) {
4370
- throw new Error(`Environment "${name}" not found.`);
4324
+ if (name2) {
4325
+ throw new Error(`Environment "${name2}" not found.`);
4371
4326
  }
4372
4327
  environment = await this.in(createDefaultEnvironment(this.config.userConfig));
4373
4328
  this.log(types.LogLevelLabel.WARN, `No environment specified, and no default environment found. Using a temporary default environment: ${chalk5__default.default.bold.cyanBright(environment?.environment.name)}`);
@@ -4380,9 +4335,9 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
4380
4335
  * @param name - The name of the environment to retrieve.
4381
4336
  * @returns The requested environment context or `undefined` if not found.
4382
4337
  */
4383
- async getEnvironmentSafe(name) {
4338
+ async getEnvironmentSafe(name2) {
4384
4339
  try {
4385
- return await this.getEnvironment(name);
4340
+ return await this.getEnvironment(name2);
4386
4341
  } catch {
4387
4342
  return void 0;
4388
4343
  }
@@ -4461,14 +4416,14 @@ var PowerlinesAPI = class _PowerlinesAPI {
4461
4416
  const api = new _PowerlinesAPI(await PowerlinesAPIContext.from(workspaceRoot, config));
4462
4417
  api.#context.$$internal = {
4463
4418
  api,
4464
- addPlugin: api.#addPlugin.bind(api),
4465
- entry: []
4419
+ addPlugin: api.#addPlugin.bind(api)
4466
4420
  };
4421
+ api.context.info(`\u{1F50C} The Powerlines v${package_default.version} engine has started`);
4467
4422
  for (const plugin of api.context.config.plugins ?? []) {
4468
4423
  await api.#addPlugin(plugin);
4469
4424
  }
4470
4425
  if (api.context.plugins.length === 0) {
4471
- api.context.log(types.LogLevelLabel.WARN, "No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
4426
+ api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
4472
4427
  }
4473
4428
  const pluginConfig = await api.callHook("config", {
4474
4429
  environment: await api.context.getEnvironment(),
@@ -4491,11 +4446,11 @@ var PowerlinesAPI = class _PowerlinesAPI {
4491
4446
  async prepare(inlineConfig = {
4492
4447
  command: "prepare"
4493
4448
  }) {
4494
- this.context.log(types.LogLevelLabel.TRACE, " \u{1F3D7}\uFE0F Preparing the Powerlines project");
4495
- this.context.log(types.LogLevelLabel.TRACE, " \u2699\uFE0F Aggregating configuration options for the Powerlines project");
4449
+ this.context.info(" \u{1F3D7}\uFE0F Preparing the Powerlines project");
4450
+ this.context.debug(" \u2699\uFE0F Aggregating configuration options for the Powerlines project");
4496
4451
  await this.context.withInlineConfig(inlineConfig);
4497
4452
  await this.#executeEnvironments(async (context) => {
4498
- context.log(types.LogLevelLabel.TRACE, `Initializing the processing options for the Powerlines project.`);
4453
+ context.debug(`Initializing the processing options for the Powerlines project.`);
4499
4454
  await this.callHook("configResolved", {
4500
4455
  environment: context,
4501
4456
  order: "pre"
@@ -4505,7 +4460,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
4505
4460
  environment: context,
4506
4461
  order: "normal"
4507
4462
  });
4508
- context.log(types.LogLevelLabel.DEBUG, `The configuration provided ${toArray.toArray(context.config.entry).length} entry point(s), Powerlines has found ${context.entry.length} entry files(s) for the ${context.config.title} project${context.entry.length > 0 && context.entry.length < 10 ? `:
4463
+ context.debug(`The configuration provided ${toArray.toArray(context.config.entry).length} entry point(s), Powerlines has found ${context.entry.length} entry files(s) for the ${context.config.title} project${context.entry.length > 0 && context.entry.length < 10 ? `:
4509
4464
  ${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}.`);
4510
4465
  await resolveTsconfig(context);
4511
4466
  await installDependencies(context);
@@ -4513,7 +4468,7 @@ ${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.out
4513
4468
  environment: context,
4514
4469
  order: "post"
4515
4470
  });
4516
- context.log(types.LogLevelLabel.TRACE, `Powerlines configuration has been resolved:
4471
+ context.trace(`Powerlines configuration has been resolved:
4517
4472
 
4518
4473
  ${console.formatLogMessage(context.config)}`);
4519
4474
  if (!context.fs.existsSync(context.cachePath)) {
@@ -4531,11 +4486,11 @@ ${console.formatLogMessage(context.config)}`);
4531
4486
  order: "normal"
4532
4487
  });
4533
4488
  if (context.config.output.dts !== false) {
4534
- context.log(types.LogLevelLabel.TRACE, `Preparing the TypeScript definitions for the Powerlines project.`);
4489
+ context.debug(`Preparing the TypeScript definitions for the Powerlines project.`);
4535
4490
  if (context.fs.existsSync(context.dtsPath)) {
4536
4491
  await context.fs.remove(context.dtsPath);
4537
4492
  }
4538
- context.log(types.LogLevelLabel.TRACE, "Transforming built-ins runtime modules files.");
4493
+ context.debug("Transforming built-ins runtime modules files.");
4539
4494
  const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
4540
4495
  const result2 = await core.transformAsync(file.code.toString(), {
4541
4496
  highlightCode: true,
@@ -4568,7 +4523,7 @@ ${console.formatLogMessage(context.config)}`);
4568
4523
  context.warn(`File ID is missing for a built-in runtime file at ${file.path}.`);
4569
4524
  file.id = replace.replacePath(replace.replacePath(file.path, context.workspaceConfig.workspaceRoot), context.builtinsPath);
4570
4525
  }
4571
- context.log(types.LogLevelLabel.TRACE, `Writing transformed built-in runtime file ${file.id}.`);
4526
+ context.trace(`Writing transformed built-in runtime file ${file.id}.`);
4572
4527
  await context.emitBuiltin(result2.code, file.id);
4573
4528
  return file.path;
4574
4529
  }));
@@ -4587,9 +4542,9 @@ ${console.formatLogMessage(context.config)}`);
4587
4542
  []
4588
4543
  // [joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")]
4589
4544
  );
4590
- context.log(types.LogLevelLabel.TRACE, "Parsing TypeScript configuration for the Powerlines project.");
4591
- let types$1 = await emitTypes(context, files);
4592
- context.log(types.LogLevelLabel.TRACE, `Generating TypeScript declaration file ${context.dtsPath}.`);
4545
+ context.debug("Parsing TypeScript configuration for the Powerlines project.");
4546
+ let types = await emitTypes(context, files);
4547
+ context.debug(`Generating TypeScript declaration file ${context.dtsPath}.`);
4593
4548
  const directives = [];
4594
4549
  const asNextParam = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((previousResult) => isObject.isObject(previousResult) ? previousResult.code : previousResult, "asNextParam");
4595
4550
  let result = await this.callHook("types", {
@@ -4598,15 +4553,15 @@ ${console.formatLogMessage(context.config)}`);
4598
4553
  order: "pre",
4599
4554
  result: "merge",
4600
4555
  asNextParam
4601
- }, types$1);
4556
+ }, types);
4602
4557
  if (result) {
4603
4558
  if (isSetObject.isSetObject(result)) {
4604
- types$1 = result.code;
4559
+ types = result.code;
4605
4560
  if (Array.isArray(result.directives) && result.directives.length > 0) {
4606
4561
  directives.push(...result.directives);
4607
4562
  }
4608
4563
  } else if (isSetString.isSetString(result)) {
4609
- types$1 = result;
4564
+ types = result;
4610
4565
  }
4611
4566
  }
4612
4567
  result = await this.callHook("types", {
@@ -4615,15 +4570,15 @@ ${console.formatLogMessage(context.config)}`);
4615
4570
  order: "normal",
4616
4571
  result: "merge",
4617
4572
  asNextParam
4618
- }, types$1);
4573
+ }, types);
4619
4574
  if (result) {
4620
4575
  if (isSetObject.isSetObject(result)) {
4621
- types$1 = result.code;
4576
+ types = result.code;
4622
4577
  if (Array.isArray(result.directives) && result.directives.length > 0) {
4623
4578
  directives.push(...result.directives);
4624
4579
  }
4625
4580
  } else if (isSetString.isSetString(result)) {
4626
- types$1 = result;
4581
+ types = result;
4627
4582
  }
4628
4583
  }
4629
4584
  result = await this.callHook("types", {
@@ -4632,18 +4587,18 @@ ${console.formatLogMessage(context.config)}`);
4632
4587
  order: "post",
4633
4588
  result: "merge",
4634
4589
  asNextParam
4635
- }, types$1);
4590
+ }, types);
4636
4591
  if (result) {
4637
4592
  if (isSetObject.isSetObject(result)) {
4638
- types$1 = result.code;
4593
+ types = result.code;
4639
4594
  if (Array.isArray(result.directives) && result.directives.length > 0) {
4640
4595
  directives.push(...result.directives);
4641
4596
  }
4642
4597
  } else if (isSetString.isSetString(result)) {
4643
- types$1 = result;
4598
+ types = result;
4644
4599
  }
4645
4600
  }
4646
- if (types$1?.trim() || directives.length > 0) {
4601
+ if (types?.trim() || directives.length > 0) {
4647
4602
  await context.fs.write(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
4648
4603
 
4649
4604
  ` : ""}${getFileHeader(context, {
@@ -4651,7 +4606,7 @@ ${console.formatLogMessage(context.config)}`);
4651
4606
  prettierIgnore: false
4652
4607
  })}
4653
4608
 
4654
- ${formatTypes(types$1)}
4609
+ ${formatTypes(types)}
4655
4610
  `);
4656
4611
  } else {
4657
4612
  const dtsRelativePath = getTsconfigDtsPath(context);
@@ -4666,7 +4621,7 @@ ${formatTypes(types$1)}
4666
4621
  if (!context.tsconfig) {
4667
4622
  throw new Error("Failed to parse the TypeScript configuration file.");
4668
4623
  }
4669
- this.context.log(types.LogLevelLabel.DEBUG, "Formatting files generated during the prepare step.");
4624
+ this.context.debug("Formatting files generated during the prepare step.");
4670
4625
  await Promise.all([
4671
4626
  formatFolder(context, context.builtinsPath),
4672
4627
  formatFolder(context, context.entryPath)
@@ -4678,7 +4633,7 @@ ${formatTypes(types$1)}
4678
4633
  await writeMetaFile(context);
4679
4634
  context.persistedMeta = context.meta;
4680
4635
  });
4681
- this.context.log(types.LogLevelLabel.INFO, "Powerlines API has been prepared successfully");
4636
+ this.context.info("\u2714 Powerlines preparation has completed successfully");
4682
4637
  }
4683
4638
  /**
4684
4639
  * Create a new Powerlines project
@@ -4690,17 +4645,17 @@ ${formatTypes(types$1)}
4690
4645
  * @returns A promise that resolves when the project has been created
4691
4646
  */
4692
4647
  async new(inlineConfig) {
4693
- this.context.log(types.LogLevelLabel.INFO, "\u{1F195} Creating a new Powerlines project");
4648
+ this.context.info("\u{1F195} Creating a new Powerlines project");
4694
4649
  await this.prepare(inlineConfig);
4695
4650
  await this.#executeEnvironments(async (context) => {
4696
- context.log(types.LogLevelLabel.TRACE, `Initializing the processing options for the Powerlines project.`);
4651
+ context.debug("Initializing the processing options for the Powerlines project.");
4697
4652
  await this.callHook("new", {
4698
4653
  environment: context,
4699
4654
  order: "pre"
4700
4655
  });
4701
4656
  const files = await listFiles.listFiles(joinPaths.joinPaths(context.powerlinesPath, "files/common/**/*.hbs"));
4702
4657
  for (const file of files) {
4703
- context.log(types.LogLevelLabel.TRACE, `Adding template file: ${file}`);
4658
+ context.trace(`Adding template file to project: ${file}`);
4704
4659
  const template = Handlebars__default.default.compile(file);
4705
4660
  await context.fs.write(joinPaths.joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
4706
4661
  }
@@ -4711,14 +4666,14 @@ ${formatTypes(types$1)}
4711
4666
  if (context.config.projectType === "application") {
4712
4667
  const files2 = await listFiles.listFiles(joinPaths.joinPaths(context.powerlinesPath, "files/application/**/*.hbs"));
4713
4668
  for (const file of files2) {
4714
- context.log(types.LogLevelLabel.TRACE, `Adding application template file: ${file}`);
4669
+ context.trace(`Adding application template file: ${file}`);
4715
4670
  const template = Handlebars__default.default.compile(file);
4716
4671
  await context.fs.write(joinPaths.joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
4717
4672
  }
4718
4673
  } else {
4719
4674
  const files2 = await listFiles.listFiles(joinPaths.joinPaths(context.powerlinesPath, "files/library/**/*.hbs"));
4720
4675
  for (const file of files2) {
4721
- context.log(types.LogLevelLabel.TRACE, `Adding library template file: ${file}`);
4676
+ context.trace(`Adding library template file: ${file}`);
4722
4677
  const template = Handlebars__default.default.compile(file);
4723
4678
  await context.fs.write(joinPaths.joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
4724
4679
  }
@@ -4728,7 +4683,7 @@ ${formatTypes(types$1)}
4728
4683
  order: "post"
4729
4684
  });
4730
4685
  });
4731
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines - New command completed");
4686
+ this.context.debug("\u2714 Powerlines new command completed successfully");
4732
4687
  }
4733
4688
  /**
4734
4689
  * Clean any previously prepared artifacts
@@ -4742,10 +4697,10 @@ ${formatTypes(types$1)}
4742
4697
  async clean(inlineConfig = {
4743
4698
  command: "clean"
4744
4699
  }) {
4745
- this.context.log(types.LogLevelLabel.INFO, "\u{1F9F9} Cleaning the previous Powerlines artifacts");
4700
+ this.context.info("\u{1F9F9} Cleaning the previous Powerlines artifacts");
4746
4701
  await this.prepare(inlineConfig);
4747
4702
  await this.#executeEnvironments(async (context) => {
4748
- this.context.log(types.LogLevelLabel.TRACE, "Cleaning the project's dist and artifacts directories.");
4703
+ context.debug("Cleaning the project's dist and artifacts directories.");
4749
4704
  await context.fs.remove(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath));
4750
4705
  await context.fs.remove(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.output.artifactsPath));
4751
4706
  await this.callHook("clean", {
@@ -4753,7 +4708,7 @@ ${formatTypes(types$1)}
4753
4708
  sequential: false
4754
4709
  });
4755
4710
  });
4756
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines - Clean command completed");
4711
+ this.context.debug("\u2714 Powerlines cleaning completed successfully");
4757
4712
  }
4758
4713
  /**
4759
4714
  * Lint the project
@@ -4764,7 +4719,7 @@ ${formatTypes(types$1)}
4764
4719
  async lint(inlineConfig = {
4765
4720
  command: "lint"
4766
4721
  }) {
4767
- this.context.log(types.LogLevelLabel.INFO, "\u{1F4CB} Linting the Powerlines project");
4722
+ this.context.info("\u{1F4CB} Linting the Powerlines project");
4768
4723
  await this.prepare(inlineConfig);
4769
4724
  await this.#executeEnvironments(async (context) => {
4770
4725
  if (context.config.lint !== false) {
@@ -4774,7 +4729,7 @@ ${formatTypes(types$1)}
4774
4729
  });
4775
4730
  }
4776
4731
  });
4777
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines linting completed");
4732
+ this.context.debug("\u2714 Powerlines linting completed successfully");
4778
4733
  }
4779
4734
  /**
4780
4735
  * Build the project
@@ -4788,7 +4743,7 @@ ${formatTypes(types$1)}
4788
4743
  async build(inlineConfig = {
4789
4744
  command: "build"
4790
4745
  }) {
4791
- this.context.log(types.LogLevelLabel.INFO, "\u{1F4E6} Building the Powerlines project");
4746
+ this.context.info("\u{1F4E6} Building the Powerlines project");
4792
4747
  await this.prepare(inlineConfig);
4793
4748
  if (this.context.config.singleBuild) {
4794
4749
  await this.#handleBuild(await this.#context.toEnvironment());
@@ -4797,7 +4752,7 @@ ${formatTypes(types$1)}
4797
4752
  await this.#handleBuild(context);
4798
4753
  });
4799
4754
  }
4800
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines build completed");
4755
+ this.context.debug("\u2714 Powerlines build completed successfully");
4801
4756
  }
4802
4757
  /**
4803
4758
  * Prepare the documentation for the project
@@ -4808,10 +4763,10 @@ ${formatTypes(types$1)}
4808
4763
  async docs(inlineConfig = {
4809
4764
  command: "docs"
4810
4765
  }) {
4811
- this.context.log(types.LogLevelLabel.INFO, "\u{1F4D3} Generating documentation for the Powerlines project");
4766
+ this.context.info("\u{1F4D3} Generating documentation for the Powerlines project");
4812
4767
  await this.prepare(inlineConfig);
4813
4768
  await this.#executeEnvironments(async (context) => {
4814
- context.log(types.LogLevelLabel.TRACE, "Writing documentation for the Powerlines project artifacts.");
4769
+ context.debug("Writing documentation for the Powerlines project artifacts.");
4815
4770
  await this.prepare(inlineConfig);
4816
4771
  await this.#executeEnvironments(async (context2) => {
4817
4772
  await this.callHook("docs", {
@@ -4819,7 +4774,7 @@ ${formatTypes(types$1)}
4819
4774
  });
4820
4775
  });
4821
4776
  });
4822
- this.#context.log(types.LogLevelLabel.TRACE, "Powerlines documentation generation completed");
4777
+ this.context.debug("\u2714 Powerlines documentation generation completed successfully");
4823
4778
  }
4824
4779
  /**
4825
4780
  * Deploy the project source code
@@ -4832,14 +4787,14 @@ ${formatTypes(types$1)}
4832
4787
  async deploy(inlineConfig = {
4833
4788
  command: "deploy"
4834
4789
  }) {
4835
- this.context.log(types.LogLevelLabel.INFO, "\u{1F4E6} Deploying the Powerlines project");
4790
+ this.context.info("\u{1F680} Deploying the Powerlines project");
4836
4791
  await this.prepare(inlineConfig);
4837
4792
  await this.#executeEnvironments(async (context) => {
4838
4793
  await this.callHook("deploy", {
4839
4794
  environment: context
4840
4795
  });
4841
4796
  });
4842
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines deploy completed");
4797
+ this.context.debug("\u2714 Powerlines deploy completed successfully");
4843
4798
  }
4844
4799
  /**
4845
4800
  * Finalization process
@@ -4850,14 +4805,14 @@ ${formatTypes(types$1)}
4850
4805
  * @returns A promise that resolves when the finalization process has completed
4851
4806
  */
4852
4807
  async finalize() {
4853
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution started");
4808
+ this.context.info("\u{1F3C1} Powerlines finalization processes started");
4854
4809
  await this.#executeEnvironments(async (context) => {
4855
4810
  await this.callHook("finalize", {
4856
4811
  environment: context
4857
4812
  });
4858
4813
  await context.fs.dispose();
4859
4814
  });
4860
- this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution completed");
4815
+ this.context.debug("\u2714 Powerlines finalization completed successfully");
4861
4816
  }
4862
4817
  /**
4863
4818
  * Invokes the configured plugin hooks
@@ -4898,12 +4853,12 @@ ${formatTypes(types$1)}
4898
4853
  const sourcePath = append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot);
4899
4854
  const destinationPath = joinPaths.joinPaths(append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
4900
4855
  if (context.fs.existsSync(sourcePath) && sourcePath !== destinationPath) {
4901
- context.log(types.LogLevelLabel.INFO, `Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
4856
+ context.debug(`Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
4902
4857
  await context.fs.copy(sourcePath, destinationPath);
4903
4858
  }
4904
4859
  }
4905
4860
  await Promise.all(context.config.output.assets.map(async (asset) => {
4906
- context.log(types.LogLevelLabel.DEBUG, `Copying asset(s): ${chalk5__default.default.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths.joinPaths(replace.replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk5__default.default.greenBright(joinPaths.joinPaths(replace.replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk5__default.default.yellowBright(i)).join(", ")})` : ""}`);
4861
+ context.trace(`Copying asset(s): ${chalk5__default.default.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths.joinPaths(replace.replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk5__default.default.greenBright(joinPaths.joinPaths(replace.replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk5__default.default.yellowBright(i)).join(", ")})` : ""}`);
4907
4862
  await context.fs.copy(asset, asset.output);
4908
4863
  }));
4909
4864
  await this.callHook("build", {
@@ -4918,23 +4873,23 @@ ${formatTypes(types$1)}
4918
4873
  */
4919
4874
  async #getEnvironments() {
4920
4875
  if (!this.context.config.environments || Object.keys(this.context.config.environments).length <= 1) {
4921
- this.context.log(types.LogLevelLabel.DEBUG, "No environments are configured for this Powerlines project. Using the default environment.");
4876
+ this.context.debug("No environments are configured for this Powerlines project. Using the default environment.");
4922
4877
  return [
4923
4878
  await this.context.getEnvironment()
4924
4879
  ];
4925
4880
  }
4926
- this.context.log(types.LogLevelLabel.DEBUG, `Found ${Object.keys(this.context.config.environments).length} configured environment(s) for this Powerlines project.`);
4927
- return (await Promise.all(Object.entries(this.context.config.environments).map(async ([name, config]) => {
4928
- const environment = await this.context.getEnvironmentSafe(name);
4881
+ this.context.debug(`Found ${Object.keys(this.context.config.environments).length} configured environment(s) for this Powerlines project.`);
4882
+ return (await Promise.all(Object.entries(this.context.config.environments).map(async ([name2, config]) => {
4883
+ const environment = await this.context.getEnvironmentSafe(name2);
4929
4884
  if (!environment) {
4930
4885
  const resolvedEnvironment = await this.callHook("configEnvironment", {
4931
- environment: name
4932
- }, name, config);
4886
+ environment: name2
4887
+ }, name2, config);
4933
4888
  if (resolvedEnvironment) {
4934
- this.context.environments[name] = await this.context.in(resolvedEnvironment);
4889
+ this.context.environments[name2] = await this.context.in(resolvedEnvironment);
4935
4890
  }
4936
4891
  }
4937
- return this.context.environments[name];
4892
+ return this.context.environments[name2];
4938
4893
  }))).filter((context) => isSet.isSet(context));
4939
4894
  }
4940
4895
  /**
@@ -4959,7 +4914,7 @@ ${formatTypes(types$1)}
4959
4914
  return;
4960
4915
  }
4961
4916
  for (const plugin of result) {
4962
- this.context.log(types.LogLevelLabel.DEBUG, `Successfully initialized the ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin`);
4917
+ this.context.debug(`Successfully initialized the ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin`);
4963
4918
  await this.context.addPlugin(plugin);
4964
4919
  }
4965
4920
  }
@@ -5046,10 +5001,10 @@ Please ensure the value is one of the following:
5046
5001
  const result = [];
5047
5002
  for (const plugin of plugins) {
5048
5003
  if (checkDedupe(plugin, this.context.plugins)) {
5049
- this.context.log(types.LogLevelLabel.TRACE, `Duplicate ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
5004
+ this.context.trace(`Duplicate ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
5050
5005
  } else {
5051
5006
  result.push(plugin);
5052
- this.context.log(types.LogLevelLabel.TRACE, `Initializing the ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin...`);
5007
+ this.context.trace(`Initializing the ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin...`);
5053
5008
  }
5054
5009
  }
5055
5010
  return result;
@@ -5066,12 +5021,12 @@ Please ensure the value is one of the following:
5066
5021
  ]
5067
5022
  });
5068
5023
  if (!isInstalled && this.context.config.skipInstalls !== true) {
5069
- this.#context.log(types.LogLevelLabel.WARN, `The plugin package "${pluginPath}" is not installed. It will be installed automatically.`);
5024
+ this.#context.warn(`The plugin package "${pluginPath}" is not installed. It will be installed automatically.`);
5070
5025
  const result = await install.install(pluginPath, {
5071
5026
  cwd: this.context.config.projectRoot
5072
5027
  });
5073
5028
  if (isNumber.isNumber(result.exitCode) && result.exitCode > 0) {
5074
- this.#context.log(types.LogLevelLabel.ERROR, result.stderr);
5029
+ this.#context.error(result.stderr);
5075
5030
  throw new Error(`An error occurred while installing the build plugin package "${pluginPath}" `);
5076
5031
  }
5077
5032
  }
@@ -5115,5 +5070,7 @@ exports.combineContexts = combineContexts;
5115
5070
  exports.createLog = createLog;
5116
5071
  exports.extendLog = extendLog;
5117
5072
  exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
5118
- //# sourceMappingURL=chunk-ST65VKTR.cjs.map
5119
- //# sourceMappingURL=chunk-ST65VKTR.cjs.map
5073
+ exports.name = name;
5074
+ exports.version = version;
5075
+ //# sourceMappingURL=chunk-3ZV6MOMH.cjs.map
5076
+ //# sourceMappingURL=chunk-3ZV6MOMH.cjs.map