powerlines 0.34.2 → 0.34.4

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.
@@ -1,4 +1,4 @@
1
- import { bundle } from './chunk-LSSLZECF.js';
1
+ import { bundle } from './chunk-YP46XYZS.js';
2
2
  import { __name } from './chunk-7QVYU63E.js';
3
3
  import { parseTypeDefinition } from '@stryke/convert/parse-type-definition';
4
4
  import { isSetString } from '@stryke/type-checks/is-set-string';
@@ -24,5 +24,5 @@ async function resolve(context, type, overrides = {}) {
24
24
  __name(resolve, "resolve");
25
25
 
26
26
  export { resolve };
27
- //# sourceMappingURL=chunk-5QJRVWP3.js.map
28
- //# sourceMappingURL=chunk-5QJRVWP3.js.map
27
+ //# sourceMappingURL=chunk-4CS5G76I.js.map
28
+ //# sourceMappingURL=chunk-4CS5G76I.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/utilities/resolve.ts"],"names":["resolve","context","type","overrides","typeDefinition","isSetString","parseTypeDefinition","result","bundle","file","resolved","resolver","evalModule","text","filename","path","forceTranspile","exportName","name"],"mappings":";;;;;AAoCA,eAAsBA,OAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,IAAIC,cAAAA;AACJ,EAAA,IAAIC,WAAAA,CAAYH,IAAAA,CAAAA,EAAO;AACrBE,IAAAA,cAAAA,GAAiBE,oBAAoBJ,IAAAA,CAAAA;EACvC,CAAA,MAAO;AACLE,IAAAA,cAAAA,GAAiBF,IAAAA;AACnB,EAAA;AAEA,EAAA,MAAMK,SAAS,MAAMC,MAAAA,CAAOP,OAAAA,EAASG,cAAAA,CAAeK,MAAMN,SAAAA,CAAAA;AAE1D,EAAA,MAAMO,WAAY,MAAMT,OAAAA,CAAQU,QAAAA,CAASC,UAAAA,CAAWL,OAAOM,IAAAA,EAAM;AAC/DC,IAAAA,QAAAA,EAAUP,MAAAA,CAAOQ,IAAAA;IACjBC,cAAAA,EAAgB;GAClB,CAAA;AAEA,EAAA,IAAIC,aAAab,cAAAA,CAAec,IAAAA;AAChC,EAAA,IAAI,CAACD,UAAAA,EAAY;AACfA,IAAAA,UAAAA,GAAa,SAAA;AACf,EAAA;AAEA,EAAA,OAAOP,SAASO,UAAAA,CAAAA,IAAeP,QAAAA,CAAS,CAAA,QAAA,EAAMO,UAAAA,CAAAA,CAAY,CAAA;AAC5D;AAzBsBjB,MAAAA,CAAAA,OAAAA,EAAAA,SAAAA,CAAAA","file":"chunk-5QJRVWP3.js","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 { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { bundle } from \"./bundle\";\n\n/**\n * Compiles a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolve<TResult = any>(\n context: Context,\n type: TypeDefinitionParameter,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const result = await bundle(context, typeDefinition.file, overrides);\n\n const resolved = (await context.resolver.evalModule(result.text, {\n filename: result.path,\n forceTranspile: true\n })) as Record<string, any>;\n\n let exportName = typeDefinition.name;\n if (!exportName) {\n exportName = \"default\";\n }\n\n return resolved[exportName] ?? resolved[`__Ω${exportName}`];\n}\n"]}
1
+ {"version":3,"sources":["../../src/lib/utilities/resolve.ts"],"names":["resolve","context","type","overrides","typeDefinition","isSetString","parseTypeDefinition","result","bundle","file","resolved","resolver","evalModule","text","filename","path","forceTranspile","exportName","name"],"mappings":";;;;;AAoCA,eAAsBA,OAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,IAAIC,cAAAA;AACJ,EAAA,IAAIC,WAAAA,CAAYH,IAAAA,CAAAA,EAAO;AACrBE,IAAAA,cAAAA,GAAiBE,oBAAoBJ,IAAAA,CAAAA;EACvC,CAAA,MAAO;AACLE,IAAAA,cAAAA,GAAiBF,IAAAA;AACnB,EAAA;AAEA,EAAA,MAAMK,SAAS,MAAMC,MAAAA,CAAOP,OAAAA,EAASG,cAAAA,CAAeK,MAAMN,SAAAA,CAAAA;AAE1D,EAAA,MAAMO,WAAY,MAAMT,OAAAA,CAAQU,QAAAA,CAASC,UAAAA,CAAWL,OAAOM,IAAAA,EAAM;AAC/DC,IAAAA,QAAAA,EAAUP,MAAAA,CAAOQ,IAAAA;IACjBC,cAAAA,EAAgB;GAClB,CAAA;AAEA,EAAA,IAAIC,aAAab,cAAAA,CAAec,IAAAA;AAChC,EAAA,IAAI,CAACD,UAAAA,EAAY;AACfA,IAAAA,UAAAA,GAAa,SAAA;AACf,EAAA;AAEA,EAAA,OAAOP,SAASO,UAAAA,CAAAA,IAAeP,QAAAA,CAAS,CAAA,QAAA,EAAMO,UAAAA,CAAAA,CAAY,CAAA;AAC5D;AAzBsBjB,MAAAA,CAAAA,OAAAA,EAAAA,SAAAA,CAAAA","file":"chunk-4CS5G76I.js","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 { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { bundle } from \"./bundle\";\n\n/**\n * Compiles a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolve<TResult = any>(\n context: Context,\n type: TypeDefinitionParameter,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const result = await bundle(context, typeDefinition.file, overrides);\n\n const resolved = (await context.resolver.evalModule(result.text, {\n filename: result.path,\n forceTranspile: true\n })) as Record<string, any>;\n\n let exportName = typeDefinition.name;\n if (!exportName) {\n exportName = \"default\";\n }\n\n return resolved[exportName] ?? resolved[`__Ω${exportName}`];\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk4UN7FLKQ_cjs = require('./chunk-4UN7FLKQ.cjs');
3
+ var chunkRRLXO5T2_cjs = require('./chunk-RRLXO5T2.cjs');
4
4
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
5
5
  var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
6
6
  var isSetString = require('@stryke/type-checks/is-set-string');
@@ -12,7 +12,7 @@ async function resolve(context, type, overrides = {}) {
12
12
  } else {
13
13
  typeDefinition = type;
14
14
  }
15
- const result = await chunk4UN7FLKQ_cjs.bundle(context, typeDefinition.file, overrides);
15
+ const result = await chunkRRLXO5T2_cjs.bundle(context, typeDefinition.file, overrides);
16
16
  const resolved = await context.resolver.evalModule(result.text, {
17
17
  filename: result.path,
18
18
  forceTranspile: true
@@ -26,5 +26,5 @@ async function resolve(context, type, overrides = {}) {
26
26
  chunkPK6SKIKE_cjs.__name(resolve, "resolve");
27
27
 
28
28
  exports.resolve = resolve;
29
- //# sourceMappingURL=chunk-23BFL3LB.cjs.map
30
- //# sourceMappingURL=chunk-23BFL3LB.cjs.map
29
+ //# sourceMappingURL=chunk-O7OCZP2L.cjs.map
30
+ //# sourceMappingURL=chunk-O7OCZP2L.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/utilities/resolve.ts"],"names":["resolve","context","type","overrides","typeDefinition","isSetString","parseTypeDefinition","result","bundle","file","resolved","resolver","evalModule","text","filename","path","forceTranspile","exportName","name"],"mappings":";;;;;;;AAoCA,eAAsBA,OAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,IAAIC,cAAAA;AACJ,EAAA,IAAIC,uBAAAA,CAAYH,IAAAA,CAAAA,EAAO;AACrBE,IAAAA,cAAAA,GAAiBE,wCAAoBJ,IAAAA,CAAAA;EACvC,CAAA,MAAO;AACLE,IAAAA,cAAAA,GAAiBF,IAAAA;AACnB,EAAA;AAEA,EAAA,MAAMK,SAAS,MAAMC,wBAAAA,CAAOP,OAAAA,EAASG,cAAAA,CAAeK,MAAMN,SAAAA,CAAAA;AAE1D,EAAA,MAAMO,WAAY,MAAMT,OAAAA,CAAQU,QAAAA,CAASC,UAAAA,CAAWL,OAAOM,IAAAA,EAAM;AAC/DC,IAAAA,QAAAA,EAAUP,MAAAA,CAAOQ,IAAAA;IACjBC,cAAAA,EAAgB;GAClB,CAAA;AAEA,EAAA,IAAIC,aAAab,cAAAA,CAAec,IAAAA;AAChC,EAAA,IAAI,CAACD,UAAAA,EAAY;AACfA,IAAAA,UAAAA,GAAa,SAAA;AACf,EAAA;AAEA,EAAA,OAAOP,SAASO,UAAAA,CAAAA,IAAeP,QAAAA,CAAS,CAAA,QAAA,EAAMO,UAAAA,CAAAA,CAAY,CAAA;AAC5D;AAzBsBjB,wBAAAA,CAAAA,OAAAA,EAAAA,SAAAA,CAAAA","file":"chunk-23BFL3LB.cjs","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 { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { bundle } from \"./bundle\";\n\n/**\n * Compiles a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolve<TResult = any>(\n context: Context,\n type: TypeDefinitionParameter,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const result = await bundle(context, typeDefinition.file, overrides);\n\n const resolved = (await context.resolver.evalModule(result.text, {\n filename: result.path,\n forceTranspile: true\n })) as Record<string, any>;\n\n let exportName = typeDefinition.name;\n if (!exportName) {\n exportName = \"default\";\n }\n\n return resolved[exportName] ?? resolved[`__Ω${exportName}`];\n}\n"]}
1
+ {"version":3,"sources":["../../src/lib/utilities/resolve.ts"],"names":["resolve","context","type","overrides","typeDefinition","isSetString","parseTypeDefinition","result","bundle","file","resolved","resolver","evalModule","text","filename","path","forceTranspile","exportName","name"],"mappings":";;;;;;;AAoCA,eAAsBA,OAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,IAAIC,cAAAA;AACJ,EAAA,IAAIC,uBAAAA,CAAYH,IAAAA,CAAAA,EAAO;AACrBE,IAAAA,cAAAA,GAAiBE,wCAAoBJ,IAAAA,CAAAA;EACvC,CAAA,MAAO;AACLE,IAAAA,cAAAA,GAAiBF,IAAAA;AACnB,EAAA;AAEA,EAAA,MAAMK,SAAS,MAAMC,wBAAAA,CAAOP,OAAAA,EAASG,cAAAA,CAAeK,MAAMN,SAAAA,CAAAA;AAE1D,EAAA,MAAMO,WAAY,MAAMT,OAAAA,CAAQU,QAAAA,CAASC,UAAAA,CAAWL,OAAOM,IAAAA,EAAM;AAC/DC,IAAAA,QAAAA,EAAUP,MAAAA,CAAOQ,IAAAA;IACjBC,cAAAA,EAAgB;GAClB,CAAA;AAEA,EAAA,IAAIC,aAAab,cAAAA,CAAec,IAAAA;AAChC,EAAA,IAAI,CAACD,UAAAA,EAAY;AACfA,IAAAA,UAAAA,GAAa,SAAA;AACf,EAAA;AAEA,EAAA,OAAOP,SAASO,UAAAA,CAAAA,IAAeP,QAAAA,CAAS,CAAA,QAAA,EAAMO,UAAAA,CAAAA,CAAY,CAAA;AAC5D;AAzBsBjB,wBAAAA,CAAAA,OAAAA,EAAAA,SAAAA,CAAAA","file":"chunk-O7OCZP2L.cjs","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 { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { bundle } from \"./bundle\";\n\n/**\n * Compiles a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolve<TResult = any>(\n context: Context,\n type: TypeDefinitionParameter,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const result = await bundle(context, typeDefinition.file, overrides);\n\n const resolved = (await context.resolver.evalModule(result.text, {\n filename: result.path,\n forceTranspile: true\n })) as Record<string, any>;\n\n let exportName = typeDefinition.name;\n if (!exportName) {\n exportName = \"default\";\n }\n\n return resolved[exportName] ?? resolved[`__Ω${exportName}`];\n}\n"]}
@@ -12,7 +12,7 @@ async function bundle(context, file, overrides = {}) {
12
12
  }
13
13
  const result = await esbuild.build({
14
14
  ...chunkLIZRGQES_cjs.extractESBuildConfig(context),
15
- entry: [
15
+ entryPoints: [
16
16
  path
17
17
  ],
18
18
  write: false,
@@ -36,5 +36,5 @@ async function bundle(context, file, overrides = {}) {
36
36
  chunkPK6SKIKE_cjs.__name(bundle, "bundle");
37
37
 
38
38
  exports.bundle = bundle;
39
- //# sourceMappingURL=chunk-4UN7FLKQ.cjs.map
40
- //# sourceMappingURL=chunk-4UN7FLKQ.cjs.map
39
+ //# sourceMappingURL=chunk-RRLXO5T2.cjs.map
40
+ //# sourceMappingURL=chunk-RRLXO5T2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","fs","resolve","existsSync","Error","result","build","extractESBuildConfig","entryPoints","write","sourcemap","splitting","treeShaking","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;;;AAgCA,eAAsBA,MAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,MAAMC,IAAAA,GAAO,MAAMH,OAAAA,CAAQI,EAAAA,CAAGC,QAAQJ,IAAAA,CAAAA;AACtC,EAAA,IAAI,CAACE,IAAAA,IAAQ,CAACH,QAAQI,EAAAA,CAAGE,UAAAA,CAAWH,IAAAA,CAAAA,EAAO;AACzC,IAAA,MAAM,IAAII,KAAAA,CACR,CAAA,mBAAA,EAAsBN,IAAAA,CAAAA,uCAAAA,CAA6C,CAAA;AAEvE,EAAA;AAEA,EAAA,MAAMO,MAAAA,GAAS,MAAMC,aAAAA,CAAM;AACzB,IAAA,GAAGC,uCAAqBV,OAAAA,CAAAA;IACxBW,WAAAA,EAAa;AAACR,MAAAA;;IACdS,KAAAA,EAAO,KAAA;IACPC,SAAAA,EAAW,KAAA;IACXC,SAAAA,EAAW,KAAA;IACXC,WAAAA,EAAa,KAAA;IACbhB,MAAAA,EAAQ,IAAA;IACR,GAAGG;GACL,CAAA;AACA,EAAA,IAAIM,MAAAA,CAAOQ,MAAAA,CAAOC,MAAAA,GAAS,CAAA,EAAG;AAC5B,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,oBAAA,EAAuBN,IAAAA,CAAAA,EAAAA,EAASO,OAAOQ,MAAAA,CACpCE,GAAAA,CAAIC,CAAAA,KAAAA,KAASA,MAAMC,IAAI,CAAA,CACvBC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAIb,MAAAA,CAAOc,QAAAA,CAASL,MAAAA,GAAS,CAAA,EAAG;AAC9BjB,IAAAA,OAAAA,CAAQuB,IACNC,mBAAAA,CAAcC,IAAAA,EACd,CAAA,2BAAA,EAA8BxB,IAAAA,KAASO,MAAAA,CAAOc,QAAAA,CAC3CJ,GAAAA,CAAIQ,CAAAA,YAAWA,OAAAA,CAAQN,IAAI,EAC3BC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAI,CAACb,OAAOmB,WAAAA,IAAenB,MAAAA,CAAOmB,YAAYC,MAAAA,CAAOC,OAAAA,CAAAA,CAASZ,MAAAA,KAAW,CAAA,EAAG;AAC1E,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,8BAAA,EACEN,IAAAA,CAAAA,+CAAAA,CAC+C,CAAA;AAErD,EAAA;AAEA,EAAA,OAAOO,MAAAA,CAAOmB,WAAAA,CAAYC,MAAAA,CAAOC,OAAAA,EAAS,CAAA,CAAA;AAC5C;AA9CsB9B,wBAAAA,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-RRLXO5T2.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entryPoints: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"]}
@@ -10,7 +10,7 @@ async function bundle(context, file, overrides = {}) {
10
10
  }
11
11
  const result = await build({
12
12
  ...extractESBuildConfig(context),
13
- entry: [
13
+ entryPoints: [
14
14
  path
15
15
  ],
16
16
  write: false,
@@ -34,5 +34,5 @@ async function bundle(context, file, overrides = {}) {
34
34
  __name(bundle, "bundle");
35
35
 
36
36
  export { bundle };
37
- //# sourceMappingURL=chunk-LSSLZECF.js.map
38
- //# sourceMappingURL=chunk-LSSLZECF.js.map
37
+ //# sourceMappingURL=chunk-YP46XYZS.js.map
38
+ //# sourceMappingURL=chunk-YP46XYZS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","fs","resolve","existsSync","Error","result","build","extractESBuildConfig","entryPoints","write","sourcemap","splitting","treeShaking","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;AAgCA,eAAsBA,MAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,MAAMC,IAAAA,GAAO,MAAMH,OAAAA,CAAQI,EAAAA,CAAGC,QAAQJ,IAAAA,CAAAA;AACtC,EAAA,IAAI,CAACE,IAAAA,IAAQ,CAACH,QAAQI,EAAAA,CAAGE,UAAAA,CAAWH,IAAAA,CAAAA,EAAO;AACzC,IAAA,MAAM,IAAII,KAAAA,CACR,CAAA,mBAAA,EAAsBN,IAAAA,CAAAA,uCAAAA,CAA6C,CAAA;AAEvE,EAAA;AAEA,EAAA,MAAMO,MAAAA,GAAS,MAAMC,KAAAA,CAAM;AACzB,IAAA,GAAGC,qBAAqBV,OAAAA,CAAAA;IACxBW,WAAAA,EAAa;AAACR,MAAAA;;IACdS,KAAAA,EAAO,KAAA;IACPC,SAAAA,EAAW,KAAA;IACXC,SAAAA,EAAW,KAAA;IACXC,WAAAA,EAAa,KAAA;IACbhB,MAAAA,EAAQ,IAAA;IACR,GAAGG;GACL,CAAA;AACA,EAAA,IAAIM,MAAAA,CAAOQ,MAAAA,CAAOC,MAAAA,GAAS,CAAA,EAAG;AAC5B,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,oBAAA,EAAuBN,IAAAA,CAAAA,EAAAA,EAASO,OAAOQ,MAAAA,CACpCE,GAAAA,CAAIC,CAAAA,KAAAA,KAASA,MAAMC,IAAI,CAAA,CACvBC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAIb,MAAAA,CAAOc,QAAAA,CAASL,MAAAA,GAAS,CAAA,EAAG;AAC9BjB,IAAAA,OAAAA,CAAQuB,IACNC,aAAAA,CAAcC,IAAAA,EACd,CAAA,2BAAA,EAA8BxB,IAAAA,KAASO,MAAAA,CAAOc,QAAAA,CAC3CJ,GAAAA,CAAIQ,CAAAA,YAAWA,OAAAA,CAAQN,IAAI,EAC3BC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAI,CAACb,OAAOmB,WAAAA,IAAenB,MAAAA,CAAOmB,YAAYC,MAAAA,CAAOC,OAAAA,CAAAA,CAASZ,MAAAA,KAAW,CAAA,EAAG;AAC1E,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,8BAAA,EACEN,IAAAA,CAAAA,+CAAAA,CAC+C,CAAA;AAErD,EAAA;AAEA,EAAA,OAAOO,MAAAA,CAAOmB,WAAAA,CAAYC,MAAAA,CAAOC,OAAAA,EAAS,CAAA,CAAA;AAC5C;AA9CsB9B,MAAAA,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-YP46XYZS.js","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entryPoints: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  require('./chunk-UYDY7RRQ.cjs');
4
4
  var chunkRQICHHZM_cjs = require('./chunk-RQICHHZM.cjs');
5
5
  var chunkNPSC73QO_cjs = require('./chunk-NPSC73QO.cjs');
6
- var chunk23BFL3LB_cjs = require('./chunk-23BFL3LB.cjs');
6
+ var chunkO7OCZP2L_cjs = require('./chunk-O7OCZP2L.cjs');
7
7
  var chunkHYQXPNVP_cjs = require('./chunk-HYQXPNVP.cjs');
8
8
  var chunkOGEFARN2_cjs = require('./chunk-OGEFARN2.cjs');
9
9
  require('./chunk-3GMJQ5G3.cjs');
@@ -11,7 +11,7 @@ var chunkVM6LBJ3L_cjs = require('./chunk-VM6LBJ3L.cjs');
11
11
  var chunkMFC7UJHT_cjs = require('./chunk-MFC7UJHT.cjs');
12
12
  var chunk3DKBH67A_cjs = require('./chunk-3DKBH67A.cjs');
13
13
  var chunkA4RSMLXW_cjs = require('./chunk-A4RSMLXW.cjs');
14
- var chunk4UN7FLKQ_cjs = require('./chunk-4UN7FLKQ.cjs');
14
+ var chunkRRLXO5T2_cjs = require('./chunk-RRLXO5T2.cjs');
15
15
  require('./chunk-QMKA57N4.cjs');
16
16
  require('./chunk-K3FDM5F3.cjs');
17
17
  require('./chunk-XBOHJTOI.cjs');
@@ -53,7 +53,7 @@ Object.defineProperty(exports, "setCache", {
53
53
  });
54
54
  Object.defineProperty(exports, "resolve", {
55
55
  enumerable: true,
56
- get: function () { return chunk23BFL3LB_cjs.resolve; }
56
+ get: function () { return chunkO7OCZP2L_cjs.resolve; }
57
57
  });
58
58
  Object.defineProperty(exports, "generateSourceMap", {
59
59
  enumerable: true,
@@ -89,7 +89,7 @@ Object.defineProperty(exports, "combineContexts", {
89
89
  });
90
90
  Object.defineProperty(exports, "bundle", {
91
91
  enumerable: true,
92
- get: function () { return chunk4UN7FLKQ_cjs.bundle; }
92
+ get: function () { return chunkRRLXO5T2_cjs.bundle; }
93
93
  });
94
94
  Object.defineProperty(exports, "isolatedDeclarations", {
95
95
  enumerable: true,
package/dist/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import './chunk-CLOW34EQ.js';
2
2
  export { writeFile } from './chunk-HQ6TGY34.js';
3
3
  export { getCache, setCache } from './chunk-MJ6WN3XA.js';
4
- export { resolve } from './chunk-5QJRVWP3.js';
4
+ export { resolve } from './chunk-4CS5G76I.js';
5
5
  export { generateSourceMap } from './chunk-OC2AD37X.js';
6
6
  export { Worker, createWorker } from './chunk-RHADQ6HA.js';
7
7
  import './chunk-4BPHC6QQ.js';
@@ -9,7 +9,7 @@ export { createUnpluginFactory } from './chunk-HVL3SPVN.js';
9
9
  export { getBaseFileHeader, getFileHeader } from './chunk-7R23HVGQ.js';
10
10
  export { createUnplugin } from './chunk-ZVZFMMNL.js';
11
11
  export { combineContexts } from './chunk-HDUSUF6L.js';
12
- export { bundle } from './chunk-LSSLZECF.js';
12
+ export { bundle } from './chunk-YP46XYZS.js';
13
13
  import './chunk-FJMP4CXA.js';
14
14
  import './chunk-GTNYRHTO.js';
15
15
  import './chunk-DQJCGJ5P.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk4UN7FLKQ_cjs = require('../chunk-4UN7FLKQ.cjs');
3
+ var chunkRRLXO5T2_cjs = require('../chunk-RRLXO5T2.cjs');
4
4
  require('../chunk-LIZRGQES.cjs');
5
5
  require('../chunk-FQZQA4EJ.cjs');
6
6
  require('../chunk-YF57WETC.cjs');
@@ -10,7 +10,7 @@ require('../chunk-PK6SKIKE.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "bundle", {
12
12
  enumerable: true,
13
- get: function () { return chunk4UN7FLKQ_cjs.bundle; }
13
+ get: function () { return chunkRRLXO5T2_cjs.bundle; }
14
14
  });
15
15
  //# sourceMappingURL=bundle.cjs.map
16
16
  //# sourceMappingURL=bundle.cjs.map
@@ -1,4 +1,4 @@
1
- export { bundle } from '../chunk-LSSLZECF.js';
1
+ export { bundle } from '../chunk-YP46XYZS.js';
2
2
  import '../chunk-D5IEZABI.js';
3
3
  import '../chunk-KLU5DWCZ.js';
4
4
  import '../chunk-FFATMOAQ.js';
@@ -3,11 +3,11 @@
3
3
  require('../chunk-UYDY7RRQ.cjs');
4
4
  var chunkRQICHHZM_cjs = require('../chunk-RQICHHZM.cjs');
5
5
  var chunkNPSC73QO_cjs = require('../chunk-NPSC73QO.cjs');
6
- var chunk23BFL3LB_cjs = require('../chunk-23BFL3LB.cjs');
6
+ var chunkO7OCZP2L_cjs = require('../chunk-O7OCZP2L.cjs');
7
7
  var chunkHYQXPNVP_cjs = require('../chunk-HYQXPNVP.cjs');
8
8
  var chunkOGEFARN2_cjs = require('../chunk-OGEFARN2.cjs');
9
9
  var chunkMFC7UJHT_cjs = require('../chunk-MFC7UJHT.cjs');
10
- var chunk4UN7FLKQ_cjs = require('../chunk-4UN7FLKQ.cjs');
10
+ var chunkRRLXO5T2_cjs = require('../chunk-RRLXO5T2.cjs');
11
11
  var chunkBJGMF356_cjs = require('../chunk-BJGMF356.cjs');
12
12
  require('../chunk-632PWWU7.cjs');
13
13
  var chunkOXOTWH3L_cjs = require('../chunk-OXOTWH3L.cjs');
@@ -32,7 +32,7 @@ Object.defineProperty(exports, "setCache", {
32
32
  });
33
33
  Object.defineProperty(exports, "resolve", {
34
34
  enumerable: true,
35
- get: function () { return chunk23BFL3LB_cjs.resolve; }
35
+ get: function () { return chunkO7OCZP2L_cjs.resolve; }
36
36
  });
37
37
  Object.defineProperty(exports, "generateSourceMap", {
38
38
  enumerable: true,
@@ -56,7 +56,7 @@ Object.defineProperty(exports, "getFileHeader", {
56
56
  });
57
57
  Object.defineProperty(exports, "bundle", {
58
58
  enumerable: true,
59
- get: function () { return chunk4UN7FLKQ_cjs.bundle; }
59
+ get: function () { return chunkRRLXO5T2_cjs.bundle; }
60
60
  });
61
61
  Object.defineProperty(exports, "CACHE_HASH_LENGTH", {
62
62
  enumerable: true,
@@ -1,11 +1,11 @@
1
1
  import '../chunk-CLOW34EQ.js';
2
2
  export { writeFile } from '../chunk-HQ6TGY34.js';
3
3
  export { getCache, setCache } from '../chunk-MJ6WN3XA.js';
4
- export { resolve } from '../chunk-5QJRVWP3.js';
4
+ export { resolve } from '../chunk-4CS5G76I.js';
5
5
  export { generateSourceMap } from '../chunk-OC2AD37X.js';
6
6
  export { Worker, createWorker } from '../chunk-RHADQ6HA.js';
7
7
  export { getBaseFileHeader, getFileHeader } from '../chunk-7R23HVGQ.js';
8
- export { bundle } from '../chunk-LSSLZECF.js';
8
+ export { bundle } from '../chunk-YP46XYZS.js';
9
9
  export { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, discoverTemplates, getPersistedMeta, getPrefixedProjectRootHash, writeMetaFile } from '../chunk-45D4XIOK.js';
10
10
  import '../chunk-35EO5Y7R.js';
11
11
  export { getMagicString, getSourceFile, getString } from '../chunk-D55ZAZCX.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk23BFL3LB_cjs = require('../chunk-23BFL3LB.cjs');
4
- require('../chunk-4UN7FLKQ.cjs');
3
+ var chunkO7OCZP2L_cjs = require('../chunk-O7OCZP2L.cjs');
4
+ require('../chunk-RRLXO5T2.cjs');
5
5
  require('../chunk-LIZRGQES.cjs');
6
6
  require('../chunk-FQZQA4EJ.cjs');
7
7
  require('../chunk-YF57WETC.cjs');
@@ -11,7 +11,7 @@ require('../chunk-PK6SKIKE.cjs');
11
11
 
12
12
  Object.defineProperty(exports, "resolve", {
13
13
  enumerable: true,
14
- get: function () { return chunk23BFL3LB_cjs.resolve; }
14
+ get: function () { return chunkO7OCZP2L_cjs.resolve; }
15
15
  });
16
16
  //# sourceMappingURL=resolve.cjs.map
17
17
  //# sourceMappingURL=resolve.cjs.map
@@ -1,5 +1,5 @@
1
- export { resolve } from '../chunk-5QJRVWP3.js';
2
- import '../chunk-LSSLZECF.js';
1
+ export { resolve } from '../chunk-4CS5G76I.js';
2
+ import '../chunk-YP46XYZS.js';
3
3
  import '../chunk-D5IEZABI.js';
4
4
  import '../chunk-KLU5DWCZ.js';
5
5
  import '../chunk-FFATMOAQ.js';
package/dist/nuxt.cjs CHANGED
@@ -14,7 +14,7 @@ var kit = require('@nuxt/kit');
14
14
 
15
15
  // package.json
16
16
  var name = "powerlines";
17
- var version = "0.34.1";
17
+ var version = "0.34.3";
18
18
 
19
19
  // src/nuxt.ts
20
20
  var nuxt = kit.defineNuxtModule({
package/dist/nuxt.js CHANGED
@@ -10,7 +10,7 @@ import { defineNuxtModule, addVitePlugin, addWebpackPlugin } from '@nuxt/kit';
10
10
 
11
11
  // package.json
12
12
  var name = "powerlines";
13
- var version = "0.34.1";
13
+ var version = "0.34.3";
14
14
 
15
15
  // src/nuxt.ts
16
16
  var nuxt = defineNuxtModule({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerlines",
3
- "version": "0.34.2",
3
+ "version": "0.34.4",
4
4
  "type": "module",
5
5
  "description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
6
6
  "repository": {
@@ -631,5 +631,5 @@
631
631
  "undici-types": "^7.16.0"
632
632
  },
633
633
  "publishConfig": { "access": "public" },
634
- "gitHead": "6407c0f7097c50efaf2096a8ea0b53f403f3ac0a"
634
+ "gitHead": "65adada341ab6f4ea32ec364c1bd5eec876ee5ba"
635
635
  }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","fs","resolve","existsSync","Error","result","build","extractESBuildConfig","entry","write","sourcemap","splitting","treeShaking","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;;;AAgCA,eAAsBA,MAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,MAAMC,IAAAA,GAAO,MAAMH,OAAAA,CAAQI,EAAAA,CAAGC,QAAQJ,IAAAA,CAAAA;AACtC,EAAA,IAAI,CAACE,IAAAA,IAAQ,CAACH,QAAQI,EAAAA,CAAGE,UAAAA,CAAWH,IAAAA,CAAAA,EAAO;AACzC,IAAA,MAAM,IAAII,KAAAA,CACR,CAAA,mBAAA,EAAsBN,IAAAA,CAAAA,uCAAAA,CAA6C,CAAA;AAEvE,EAAA;AAEA,EAAA,MAAMO,MAAAA,GAAS,MAAMC,aAAAA,CAAM;AACzB,IAAA,GAAGC,uCAAqBV,OAAAA,CAAAA;IACxBW,KAAAA,EAAO;AAACR,MAAAA;;IACRS,KAAAA,EAAO,KAAA;IACPC,SAAAA,EAAW,KAAA;IACXC,SAAAA,EAAW,KAAA;IACXC,WAAAA,EAAa,KAAA;IACbhB,MAAAA,EAAQ,IAAA;IACR,GAAGG;GACL,CAAA;AACA,EAAA,IAAIM,MAAAA,CAAOQ,MAAAA,CAAOC,MAAAA,GAAS,CAAA,EAAG;AAC5B,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,oBAAA,EAAuBN,IAAAA,CAAAA,EAAAA,EAASO,OAAOQ,MAAAA,CACpCE,GAAAA,CAAIC,CAAAA,KAAAA,KAASA,MAAMC,IAAI,CAAA,CACvBC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAIb,MAAAA,CAAOc,QAAAA,CAASL,MAAAA,GAAS,CAAA,EAAG;AAC9BjB,IAAAA,OAAAA,CAAQuB,IACNC,mBAAAA,CAAcC,IAAAA,EACd,CAAA,2BAAA,EAA8BxB,IAAAA,KAASO,MAAAA,CAAOc,QAAAA,CAC3CJ,GAAAA,CAAIQ,CAAAA,YAAWA,OAAAA,CAAQN,IAAI,EAC3BC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAI,CAACb,OAAOmB,WAAAA,IAAenB,MAAAA,CAAOmB,YAAYC,MAAAA,CAAOC,OAAAA,CAAAA,CAASZ,MAAAA,KAAW,CAAA,EAAG;AAC1E,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,8BAAA,EACEN,IAAAA,CAAAA,+CAAAA,CAC+C,CAAA;AAErD,EAAA;AAEA,EAAA,OAAOO,MAAAA,CAAOmB,WAAAA,CAAYC,MAAAA,CAAOC,OAAAA,EAAS,CAAA,CAAA;AAC5C;AA9CsB9B,wBAAAA,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-4UN7FLKQ.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entry: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","fs","resolve","existsSync","Error","result","build","extractESBuildConfig","entry","write","sourcemap","splitting","treeShaking","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;AAgCA,eAAsBA,MAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,MAAMC,IAAAA,GAAO,MAAMH,OAAAA,CAAQI,EAAAA,CAAGC,QAAQJ,IAAAA,CAAAA;AACtC,EAAA,IAAI,CAACE,IAAAA,IAAQ,CAACH,QAAQI,EAAAA,CAAGE,UAAAA,CAAWH,IAAAA,CAAAA,EAAO;AACzC,IAAA,MAAM,IAAII,KAAAA,CACR,CAAA,mBAAA,EAAsBN,IAAAA,CAAAA,uCAAAA,CAA6C,CAAA;AAEvE,EAAA;AAEA,EAAA,MAAMO,MAAAA,GAAS,MAAMC,KAAAA,CAAM;AACzB,IAAA,GAAGC,qBAAqBV,OAAAA,CAAAA;IACxBW,KAAAA,EAAO;AAACR,MAAAA;;IACRS,KAAAA,EAAO,KAAA;IACPC,SAAAA,EAAW,KAAA;IACXC,SAAAA,EAAW,KAAA;IACXC,WAAAA,EAAa,KAAA;IACbhB,MAAAA,EAAQ,IAAA;IACR,GAAGG;GACL,CAAA;AACA,EAAA,IAAIM,MAAAA,CAAOQ,MAAAA,CAAOC,MAAAA,GAAS,CAAA,EAAG;AAC5B,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,oBAAA,EAAuBN,IAAAA,CAAAA,EAAAA,EAASO,OAAOQ,MAAAA,CACpCE,GAAAA,CAAIC,CAAAA,KAAAA,KAASA,MAAMC,IAAI,CAAA,CACvBC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAIb,MAAAA,CAAOc,QAAAA,CAASL,MAAAA,GAAS,CAAA,EAAG;AAC9BjB,IAAAA,OAAAA,CAAQuB,IACNC,aAAAA,CAAcC,IAAAA,EACd,CAAA,2BAAA,EAA8BxB,IAAAA,KAASO,MAAAA,CAAOc,QAAAA,CAC3CJ,GAAAA,CAAIQ,CAAAA,YAAWA,OAAAA,CAAQN,IAAI,EAC3BC,IAAAA,CAAK,IAAA,CAAA,CAAA,CAAO,CAAA;AAEnB,EAAA;AACA,EAAA,IAAI,CAACb,OAAOmB,WAAAA,IAAenB,MAAAA,CAAOmB,YAAYC,MAAAA,CAAOC,OAAAA,CAAAA,CAASZ,MAAAA,KAAW,CAAA,EAAG;AAC1E,IAAA,MAAM,IAAIV,KAAAA,CACR,CAAA,8BAAA,EACEN,IAAAA,CAAAA,+CAAAA,CAC+C,CAAA;AAErD,EAAA;AAEA,EAAA,OAAOO,MAAAA,CAAOmB,WAAAA,CAAYC,MAAAA,CAAOC,OAAAA,EAAS,CAAA,CAAA;AAC5C;AA9CsB9B,MAAAA,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-LSSLZECF.js","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entry: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"]}