@powerlines/plugin-tsup 0.12.445 → 0.12.447

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.
@@ -70,11 +70,11 @@ function resolveOptions(context) {
70
70
  format: context.config.output.format,
71
71
  mode: context.config.mode,
72
72
  treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
73
- minify: context.config.output.minify ?? context.config.mode !== "development",
73
+ minify: context.config.output.minify,
74
74
  metafile: context.config.mode === "development",
75
- sourcemap: context.config.output.sourceMap ?? context.config.mode === "development",
76
- silent: context.config.logLevel === null || context.config.mode === "production",
77
- verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
75
+ sourcemap: context.config.output.sourceMap,
76
+ silent: context.config.logLevel.general === "silent" || context.config.mode === "production",
77
+ verbose: context.config.logLevel.general === "trace" || context.config.mode === "development",
78
78
  workspaceConfig: { workspaceRoot: context.config.cwd }
79
79
  }, DEFAULT_TSUP_CONFIG);
80
80
  result.format = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(result.format));
@@ -67,11 +67,11 @@ function resolveOptions(context) {
67
67
  format: context.config.output.format,
68
68
  mode: context.config.mode,
69
69
  treeshake: context.config.tsup ? context.config.tsup?.treeshake : void 0,
70
- minify: context.config.output.minify ?? context.config.mode !== "development",
70
+ minify: context.config.output.minify,
71
71
  metafile: context.config.mode === "development",
72
- sourcemap: context.config.output.sourceMap ?? context.config.mode === "development",
73
- silent: context.config.logLevel === null || context.config.mode === "production",
74
- verbose: context.config.logLevel === null || context.config.logLevel === "trace" || context.config.mode === "development",
72
+ sourcemap: context.config.output.sourceMap,
73
+ silent: context.config.logLevel.general === "silent" || context.config.mode === "production",
74
+ verbose: context.config.logLevel.general === "trace" || context.config.mode === "development",
75
75
  workspaceConfig: { workspaceRoot: context.config.cwd }
76
76
  }, DEFAULT_TSUP_CONFIG);
77
77
  result.format = getUnique(toArray(result.format));
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-options.mjs","names":["resolveEsbuildEntry"],"sources":["../../src/helpers/resolve-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Context, ResolvedEntryTypeDefinition } from \"@powerlines/core\";\nimport { resolveEntry as resolveEsbuildEntry } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { AssetGlob, Entry } from \"@storm-software/build-tools/types\";\nimport { resolveOptions as resolveOptionsBase } from \"@storm-software/tsup\";\nimport { DEFAULT_BUILD_OPTIONS } from \"@storm-software/tsup/constants\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport defu from \"defu\";\nimport { Options } from \"tsup\";\nimport { TsupOptions, TsupPluginResolvedConfig } from \"../types\";\n\nexport const DEFAULT_TSUP_CONFIG: Partial<TsupOptions> = {\n ...DEFAULT_BUILD_OPTIONS,\n target: \"esnext\",\n config: false,\n minify: true,\n sourcemap: false,\n cjsInterop: true,\n bundle: true,\n dts: true,\n shims: true,\n silent: true,\n treeshake: true,\n keepNames: true,\n splitting: true,\n banner: {}\n};\n\n/**\n * Resolves the entry options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @param entryPoints - The entry points to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveEntry(\n context: Context,\n entryPoints: ResolvedEntryTypeDefinition[] | string[]\n): Entry {\n return resolveEsbuildEntry(context, entryPoints) as Entry;\n}\n\ntype TsupEsbuildOptionsHandler = NonNullable<Options[\"esbuildOptions\"]>;\ntype TsupEsbuildOptionsArgs = Parameters<TsupEsbuildOptionsHandler>;\ntype TsupEsbuildOptions = TsupEsbuildOptionsArgs[0];\ntype TsupEsbuildContext = TsupEsbuildOptionsArgs[1];\n\n/**\n * Resolves the options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(\n context: Context\n): Parameters<typeof resolveOptionsBase>[0] {\n const result = defu(\n {\n entry: Object.fromEntries(\n Object.entries(resolveEntry(context, context.entry)).map(\n ([key, value]) => [key, appendPath(value, context.config.root)]\n )\n ),\n esbuildOptions: (\n options: TsupEsbuildOptions,\n ctx: TsupEsbuildContext\n ) => {\n if ((context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions) {\n (context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions?.(\n options,\n ctx\n );\n }\n\n options.alias = {\n ...context.alias,\n ...context.builtins.reduce(\n (ret, id) => {\n const path = context.fs.paths[id];\n if (path) {\n ret[id] = path;\n }\n\n return ret;\n },\n {} as Record<string, string>\n ),\n ...options.alias\n };\n },\n noExternal: context.builtins\n },\n (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup\n : {},\n {\n name: context.config.name,\n root: context.config.root,\n projectRoot: context.config.root,\n assets: context.config.output.copy\n ? (context.config.output.copy.assets as (string | AssetGlob)[])\n : undefined,\n resolveExtensions: context.config.resolve.extensions,\n outputPath: relativePath(\n appendPath(context.config.root, context.config.cwd),\n context.config.output.path\n ),\n tsconfig: context.tsconfig.tsconfigFilePath,\n dts:\n (context.config as TsupPluginResolvedConfig).tsup &&\n !(context.config as TsupPluginResolvedConfig).tsup?.experimentalDts\n ? {\n compilerOptions: context.tsconfig.tsconfigJson.compilerOptions\n }\n : undefined,\n format: context.config.output.format,\n mode: context.config.mode,\n treeshake: (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup?.treeshake\n : undefined,\n minify:\n context.config.output.minify ?? context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap:\n context.config.output.sourceMap ??\n context.config.mode === \"development\",\n silent:\n context.config.logLevel === null ||\n context.config.mode === \"production\",\n verbose:\n context.config.logLevel === null ||\n context.config.logLevel === \"trace\" ||\n context.config.mode === \"development\",\n workspaceConfig: { workspaceRoot: context.config.cwd }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result as Parameters<typeof resolveOptionsBase>[0];\n}\n"],"mappings":";;;;;;;;;AA+BA,MAAa,sBAA4C;CACvD,GAAG;CACH,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,KAAK;CACL,OAAO;CACP,QAAQ;CACR,WAAW;CACX,WAAW;CACX,WAAW;CACX,QAAQ,EAAE;CACX;;;;;;;;AASD,SAAgB,aACd,SACA,aACO;AACP,QAAOA,eAAoB,SAAS,YAAY;;;;;;;;AAclD,SAAgB,eACd,SAC0C;CAC1C,MAAM,SAAS,KACb;EACE,OAAO,OAAO,YACZ,OAAO,QAAQ,aAAa,SAAS,QAAQ,MAAM,CAAC,CAAC,KAClD,CAAC,KAAK,WAAW,CAAC,KAAK,WAAW,OAAO,QAAQ,OAAO,KAAK,CAAC,CAChE,CACF;EACD,iBACE,SACA,QACG;AACH,OAAK,QAAQ,OAAoC,MAAM,eACrD,CAAC,QAAQ,OAAoC,MAAM,iBACjD,SACA,IACD;AAGH,WAAQ,QAAQ;IACd,GAAG,QAAQ;IACX,GAAG,QAAQ,SAAS,QACjB,KAAK,OAAO;KACX,MAAM,OAAO,QAAQ,GAAG,MAAM;AAC9B,SAAI,KACF,KAAI,MAAM;AAGZ,YAAO;OAET,EAAE,CACH;IACD,GAAG,QAAQ;IACZ;;EAEH,YAAY,QAAQ;EACrB,EACA,QAAQ,OAAoC,OACxC,QAAQ,OAAoC,OAC7C,EAAE,EACN;EACE,MAAM,QAAQ,OAAO;EACrB,MAAM,QAAQ,OAAO;EACrB,aAAa,QAAQ,OAAO;EAC5B,QAAQ,QAAQ,OAAO,OAAO,OACzB,QAAQ,OAAO,OAAO,KAAK,SAC5B;EACJ,mBAAmB,QAAQ,OAAO,QAAQ;EAC1C,YAAY,aACV,WAAW,QAAQ,OAAO,MAAM,QAAQ,OAAO,IAAI,EACnD,QAAQ,OAAO,OAAO,KACvB;EACD,UAAU,QAAQ,SAAS;EAC3B,KACG,QAAQ,OAAoC,QAC7C,CAAE,QAAQ,OAAoC,MAAM,kBAChD,EACE,iBAAiB,QAAQ,SAAS,aAAa,iBAChD,GACD;EACN,QAAQ,QAAQ,OAAO,OAAO;EAC9B,MAAM,QAAQ,OAAO;EACrB,WAAY,QAAQ,OAAoC,OACnD,QAAQ,OAAoC,MAAM,YACnD;EACJ,QACE,QAAQ,OAAO,OAAO,UAAU,QAAQ,OAAO,SAAS;EAC1D,UAAU,QAAQ,OAAO,SAAS;EAClC,WACE,QAAQ,OAAO,OAAO,aACtB,QAAQ,OAAO,SAAS;EAC1B,QACE,QAAQ,OAAO,aAAa,QAC5B,QAAQ,OAAO,SAAS;EAC1B,SACE,QAAQ,OAAO,aAAa,QAC5B,QAAQ,OAAO,aAAa,WAC5B,QAAQ,OAAO,SAAS;EAC1B,iBAAiB,EAAE,eAAe,QAAQ,OAAO,KAAK;EACvD,EACD,oBACD;AAED,QAAO,SAAS,UAAU,QAAQ,OAAO,OAAO,CAAC;AACjD,QAAO"}
1
+ {"version":3,"file":"resolve-options.mjs","names":["resolveEsbuildEntry"],"sources":["../../src/helpers/resolve-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Context, ResolvedEntryTypeDefinition } from \"@powerlines/core\";\nimport { resolveEntry as resolveEsbuildEntry } from \"@powerlines/plugin-esbuild/helpers/resolve-options\";\nimport { AssetGlob, Entry } from \"@storm-software/build-tools/types\";\nimport { resolveOptions as resolveOptionsBase } from \"@storm-software/tsup\";\nimport { DEFAULT_BUILD_OPTIONS } from \"@storm-software/tsup/constants\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport defu from \"defu\";\nimport { Options } from \"tsup\";\nimport { TsupOptions, TsupPluginResolvedConfig } from \"../types\";\n\nexport const DEFAULT_TSUP_CONFIG: Partial<TsupOptions> = {\n ...DEFAULT_BUILD_OPTIONS,\n target: \"esnext\",\n config: false,\n minify: true,\n sourcemap: false,\n cjsInterop: true,\n bundle: true,\n dts: true,\n shims: true,\n silent: true,\n treeshake: true,\n keepNames: true,\n splitting: true,\n banner: {}\n};\n\n/**\n * Resolves the entry options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @param entryPoints - The entry points to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveEntry(\n context: Context,\n entryPoints: ResolvedEntryTypeDefinition[] | string[]\n): Entry {\n return resolveEsbuildEntry(context, entryPoints) as Entry;\n}\n\ntype TsupEsbuildOptionsHandler = NonNullable<Options[\"esbuildOptions\"]>;\ntype TsupEsbuildOptionsArgs = Parameters<TsupEsbuildOptionsHandler>;\ntype TsupEsbuildOptions = TsupEsbuildOptionsArgs[0];\ntype TsupEsbuildContext = TsupEsbuildOptionsArgs[1];\n\n/**\n * Resolves the options for [tsup](https://github.com/egoist/tsup).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(\n context: Context\n): Parameters<typeof resolveOptionsBase>[0] {\n const result = defu(\n {\n entry: Object.fromEntries(\n Object.entries(resolveEntry(context, context.entry)).map(\n ([key, value]) => [key, appendPath(value, context.config.root)]\n )\n ),\n esbuildOptions: (\n options: TsupEsbuildOptions,\n ctx: TsupEsbuildContext\n ) => {\n if ((context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions) {\n (context.config as TsupPluginResolvedConfig).tsup?.esbuildOptions?.(\n options,\n ctx\n );\n }\n\n options.alias = {\n ...context.alias,\n ...context.builtins.reduce(\n (ret, id) => {\n const path = context.fs.paths[id];\n if (path) {\n ret[id] = path;\n }\n\n return ret;\n },\n {} as Record<string, string>\n ),\n ...options.alias\n };\n },\n noExternal: context.builtins\n },\n (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup\n : {},\n {\n name: context.config.name,\n root: context.config.root,\n projectRoot: context.config.root,\n assets: context.config.output.copy\n ? (context.config.output.copy.assets as (string | AssetGlob)[])\n : undefined,\n resolveExtensions: context.config.resolve.extensions,\n outputPath: relativePath(\n appendPath(context.config.root, context.config.cwd),\n context.config.output.path\n ),\n tsconfig: context.tsconfig.tsconfigFilePath,\n dts:\n (context.config as TsupPluginResolvedConfig).tsup &&\n !(context.config as TsupPluginResolvedConfig).tsup?.experimentalDts\n ? {\n compilerOptions: context.tsconfig.tsconfigJson.compilerOptions\n }\n : undefined,\n format: context.config.output.format,\n mode: context.config.mode,\n treeshake: (context.config as TsupPluginResolvedConfig).tsup\n ? (context.config as TsupPluginResolvedConfig).tsup?.treeshake\n : undefined,\n minify: context.config.output.minify,\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.output.sourceMap,\n silent:\n context.config.logLevel.general === \"silent\" ||\n context.config.mode === \"production\",\n verbose:\n context.config.logLevel.general === \"trace\" ||\n context.config.mode === \"development\",\n workspaceConfig: { workspaceRoot: context.config.cwd }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result as Parameters<typeof resolveOptionsBase>[0];\n}\n"],"mappings":";;;;;;;;;AA+BA,MAAa,sBAA4C;CACvD,GAAG;CACH,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,KAAK;CACL,OAAO;CACP,QAAQ;CACR,WAAW;CACX,WAAW;CACX,WAAW;CACX,QAAQ,EAAE;CACX;;;;;;;;AASD,SAAgB,aACd,SACA,aACO;AACP,QAAOA,eAAoB,SAAS,YAAY;;;;;;;;AAclD,SAAgB,eACd,SAC0C;CAC1C,MAAM,SAAS,KACb;EACE,OAAO,OAAO,YACZ,OAAO,QAAQ,aAAa,SAAS,QAAQ,MAAM,CAAC,CAAC,KAClD,CAAC,KAAK,WAAW,CAAC,KAAK,WAAW,OAAO,QAAQ,OAAO,KAAK,CAAC,CAChE,CACF;EACD,iBACE,SACA,QACG;AACH,OAAK,QAAQ,OAAoC,MAAM,eACrD,CAAC,QAAQ,OAAoC,MAAM,iBACjD,SACA,IACD;AAGH,WAAQ,QAAQ;IACd,GAAG,QAAQ;IACX,GAAG,QAAQ,SAAS,QACjB,KAAK,OAAO;KACX,MAAM,OAAO,QAAQ,GAAG,MAAM;AAC9B,SAAI,KACF,KAAI,MAAM;AAGZ,YAAO;OAET,EAAE,CACH;IACD,GAAG,QAAQ;IACZ;;EAEH,YAAY,QAAQ;EACrB,EACA,QAAQ,OAAoC,OACxC,QAAQ,OAAoC,OAC7C,EAAE,EACN;EACE,MAAM,QAAQ,OAAO;EACrB,MAAM,QAAQ,OAAO;EACrB,aAAa,QAAQ,OAAO;EAC5B,QAAQ,QAAQ,OAAO,OAAO,OACzB,QAAQ,OAAO,OAAO,KAAK,SAC5B;EACJ,mBAAmB,QAAQ,OAAO,QAAQ;EAC1C,YAAY,aACV,WAAW,QAAQ,OAAO,MAAM,QAAQ,OAAO,IAAI,EACnD,QAAQ,OAAO,OAAO,KACvB;EACD,UAAU,QAAQ,SAAS;EAC3B,KACG,QAAQ,OAAoC,QAC7C,CAAE,QAAQ,OAAoC,MAAM,kBAChD,EACE,iBAAiB,QAAQ,SAAS,aAAa,iBAChD,GACD;EACN,QAAQ,QAAQ,OAAO,OAAO;EAC9B,MAAM,QAAQ,OAAO;EACrB,WAAY,QAAQ,OAAoC,OACnD,QAAQ,OAAoC,MAAM,YACnD;EACJ,QAAQ,QAAQ,OAAO,OAAO;EAC9B,UAAU,QAAQ,OAAO,SAAS;EAClC,WAAW,QAAQ,OAAO,OAAO;EACjC,QACE,QAAQ,OAAO,SAAS,YAAY,YACpC,QAAQ,OAAO,SAAS;EAC1B,SACE,QAAQ,OAAO,SAAS,YAAY,WACpC,QAAQ,OAAO,SAAS;EAC1B,iBAAiB,EAAE,eAAe,QAAQ,OAAO,KAAK;EACvD,EACD,oBACD;AAED,QAAO,SAAS,UAAU,QAAQ,OAAO,OAAO,CAAC;AACjD,QAAO"}
@@ -5,7 +5,10 @@ let unplugin = require("unplugin");
5
5
 
6
6
  //#region src/helpers/unplugin.ts
7
7
  function createTsupPlugin(context) {
8
- return (0, unplugin.createEsbuildPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context, { silenceHookLogging: true }))({});
8
+ return (0, unplugin.createEsbuildPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context, {
9
+ silenceHookLogging: true,
10
+ name: "tsup"
11
+ }))({});
9
12
  }
10
13
 
11
14
  //#endregion
@@ -3,7 +3,10 @@ import { createEsbuildPlugin } from "unplugin";
3
3
 
4
4
  //#region src/helpers/unplugin.ts
5
5
  function createTsupPlugin(context) {
6
- return createEsbuildPlugin(createUnplugin(context, { silenceHookLogging: true }))({});
6
+ return createEsbuildPlugin(createUnplugin(context, {
7
+ silenceHookLogging: true,
8
+ name: "tsup"
9
+ }))({});
7
10
  }
8
11
 
9
12
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.mjs","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { TsupPluginContext } from \"../types/plugin\";\n\nexport function createTsupPlugin(context: TsupPluginContext) {\n return createEsbuildPlugin(\n createUnplugin(context, { silenceHookLogging: true })\n )({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAO,oBACL,eAAe,SAAS,EAAE,oBAAoB,MAAM,CAAC,CACtD,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"unplugin.mjs","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { TsupPluginContext } from \"../types/plugin\";\n\nexport function createTsupPlugin(context: TsupPluginContext) {\n return createEsbuildPlugin(\n createUnplugin(context, { silenceHookLogging: true, name: \"tsup\" })\n )({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,iBAAiB,SAA4B;AAC3D,QAAO,oBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAQ,CAAC,CACpE,CAAC,EAAE,CAAC"}
package/dist/index.cjs CHANGED
@@ -4,6 +4,7 @@ const require_helpers_resolve_options = require('./helpers/resolve-options.cjs')
4
4
  const require_helpers_unplugin = require('./helpers/unplugin.cjs');
5
5
  require('./helpers/index.cjs');
6
6
  let _storm_software_tsup = require("@storm-software/tsup");
7
+ let _stryke_helpers_omit = require("@stryke/helpers/omit");
7
8
  let defu = require("defu");
8
9
  defu = require_runtime.__toESM(defu, 1);
9
10
 
@@ -22,7 +23,13 @@ const plugin = (options = {}) => {
22
23
  };
23
24
  },
24
25
  async build() {
25
- return (0, _storm_software_tsup.build)(await (0, _storm_software_tsup.resolveOptions)((0, defu.default)(require_helpers_resolve_options.resolveOptions(this), { esbuildPlugins: [require_helpers_unplugin.createTsupPlugin(this)] })));
26
+ this.debug("Starting Tsup build process...");
27
+ const options = await (0, _storm_software_tsup.resolveOptions)((0, defu.default)(require_helpers_resolve_options.resolveOptions(this), { esbuildPlugins: [require_helpers_unplugin.createTsupPlugin(this)] }));
28
+ this.trace({
29
+ meta: { category: "config" },
30
+ message: `Resolved Tsup configuration: \n${JSON.stringify((0, _stryke_helpers_omit.omit)(options, ["plugins"]), null, 2)}`
31
+ });
32
+ return (0, _storm_software_tsup.build)(options);
26
33
  }
27
34
  };
28
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAgCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;AAJa;;;AAAA,cAWX,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAiCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;AAJa;;;AAAA,cAWX,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAgCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;AAJa;;;AAAA,cAWX,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAiCY,MAAA;IACR,IAAA,GAAO,iBAAA;EAAA;AAAA;AAJa;;;AAAA,cAWX,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs CHANGED
@@ -2,6 +2,7 @@ import { DEFAULT_TSUP_CONFIG, resolveEntry, resolveOptions } from "./helpers/res
2
2
  import { createTsupPlugin } from "./helpers/unplugin.mjs";
3
3
  import "./helpers/index.mjs";
4
4
  import { build, resolveOptions as resolveOptions$1 } from "@storm-software/tsup";
5
+ import { omit } from "@stryke/helpers/omit";
5
6
  import defu from "defu";
6
7
 
7
8
  //#region src/index.ts
@@ -19,7 +20,13 @@ const plugin = (options = {}) => {
19
20
  };
20
21
  },
21
22
  async build() {
22
- return build(await resolveOptions$1(defu(resolveOptions(this), { esbuildPlugins: [createTsupPlugin(this)] })));
23
+ this.debug("Starting Tsup build process...");
24
+ const options = await resolveOptions$1(defu(resolveOptions(this), { esbuildPlugins: [createTsupPlugin(this)] }));
25
+ this.trace({
26
+ meta: { category: "config" },
27
+ message: `Resolved Tsup configuration: \n${JSON.stringify(omit(options, ["plugins"]), null, 2)}`
28
+ });
29
+ return build(options);
23
30
  }
24
31
  };
25
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["resolveOptionsBase"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Plugin } from \"@powerlines/core\";\nimport {\n build,\n resolveOptions as resolveOptionsBase\n} from \"@storm-software/tsup\";\nimport defu from \"defu\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createTsupPlugin } from \"./helpers/unplugin\";\nimport { TsupPluginContext, TsupPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n tsup?: TsupPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to use Tsup to build the project.\n */\nexport const plugin = <TContext extends TsupPluginContext = TsupPluginContext>(\n options: TsupPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"tsup\",\n config() {\n this.debug(\n \"Providing default configuration for the Powerlines `tsup` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n tsup: {\n ...options\n }\n };\n },\n async build() {\n return build(\n await resolveOptionsBase(\n defu(resolveOptions(this), {\n esbuildPlugins: [createTsupPlugin(this)]\n })\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AAwCA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,0EACD;AAED,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,MAAM,EACJ,GAAG,SACJ;IACF;;EAEH,MAAM,QAAQ;AACZ,UAAO,MACL,MAAMA,iBACJ,KAAK,eAAe,KAAK,EAAE,EACzB,gBAAgB,CAAC,iBAAiB,KAAK,CAAC,EACzC,CAAC,CACH,CACF;;EAEJ"}
1
+ {"version":3,"file":"index.mjs","names":["resolveOptionsBase"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Plugin } from \"@powerlines/core\";\nimport {\n build,\n resolveOptions as resolveOptionsBase\n} from \"@storm-software/tsup\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport defu from \"defu\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createTsupPlugin } from \"./helpers/unplugin\";\nimport { TsupPluginContext, TsupPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n tsup?: TsupPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to use Tsup to build the project.\n */\nexport const plugin = <TContext extends TsupPluginContext = TsupPluginContext>(\n options: TsupPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"tsup\",\n config() {\n this.debug(\n \"Providing default configuration for the Powerlines `tsup` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n tsup: {\n ...options\n }\n };\n },\n async build() {\n this.debug(\"Starting Tsup build process...\");\n\n const options = await resolveOptionsBase(\n defu(resolveOptions(this), {\n esbuildPlugins: [createTsupPlugin(this)]\n })\n );\n\n this.trace({\n meta: {\n category: \"config\"\n },\n message: `Resolved Tsup configuration: \\n${JSON.stringify(\n omit(options, [\"plugins\"]),\n null,\n 2\n )}`\n });\n\n return build(options);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAyCA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,0EACD;AAED,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,MAAM,EACJ,GAAG,SACJ;IACF;;EAEH,MAAM,QAAQ;AACZ,QAAK,MAAM,iCAAiC;GAE5C,MAAM,UAAU,MAAMA,iBACpB,KAAK,eAAe,KAAK,EAAE,EACzB,gBAAgB,CAAC,iBAAiB,KAAK,CAAC,EACzC,CAAC,CACH;AAED,QAAK,MAAM;IACT,MAAM,EACJ,UAAU,UACX;IACD,SAAS,kCAAkC,KAAK,UAC9C,KAAK,SAAS,CAAC,UAAU,CAAC,EAC1B,MACA,EACD;IACF,CAAC;AAEF,UAAO,MAAM,QAAQ;;EAExB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-tsup",
3
- "version": "0.12.445",
3
+ "version": "0.12.447",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "keywords": ["tsup", "powerlines", "storm-software", "powerlines-plugin"],
@@ -73,8 +73,8 @@
73
73
  "typings": "dist/index.d.mts",
74
74
  "files": ["dist/**/*"],
75
75
  "dependencies": {
76
- "@powerlines/core": "^0.44.10",
77
- "@powerlines/plugin-esbuild": "^0.13.443",
76
+ "@powerlines/core": "^0.44.12",
77
+ "@powerlines/plugin-esbuild": "^0.13.445",
78
78
  "@storm-software/build-tools": "^0.158.161",
79
79
  "@stryke/convert": "^0.7.2",
80
80
  "@stryke/helpers": "^0.10.11",
@@ -95,5 +95,5 @@
95
95
  "tsup": { "optional": false }
96
96
  },
97
97
  "publishConfig": { "access": "public" },
98
- "gitHead": "2ec0bd52afe701cca38dcb4b3d284b27621ab55f"
98
+ "gitHead": "93fe3bf5054baa0bb1841c64fe082da56631a010"
99
99
  }