@powerlines/plugin-tsup 0.12.359 → 0.12.363

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.
@@ -63,7 +63,7 @@ function resolveOptions(context) {
63
63
  projectRoot: context.config.root,
64
64
  assets: context.config.output.assets,
65
65
  resolveExtensions: context.config.resolve.extensions,
66
- outputPath: context.config.output.buildPath,
66
+ outputPath: context.config.output.path,
67
67
  tsconfig: context.tsconfig.tsconfigFilePath,
68
68
  dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
69
69
  format: context.config.output.format,
@@ -60,7 +60,7 @@ function resolveOptions(context) {
60
60
  projectRoot: context.config.root,
61
61
  assets: context.config.output.assets,
62
62
  resolveExtensions: context.config.resolve.extensions,
63
- outputPath: context.config.output.buildPath,
63
+ outputPath: context.config.output.path,
64
64
  tsconfig: context.tsconfig.tsconfigFilePath,
65
65
  dts: context.config.tsup && !context.config.tsup?.experimentalDts ? { compilerOptions: context.tsconfig.tsconfigJson.compilerOptions } : void 0,
66
66
  format: context.config.output.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 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\ninterface TsupResolvedBuildConfig extends Options {\n esbuildOptions?: TsupEsbuildOptionsHandler;\n workspaceConfig?: {\n workspaceRoot: string;\n };\n}\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 }) as TsupResolvedBuildConfig[\"esbuildOptions\"],\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.assets as (string | AssetGlob)[],\n resolveExtensions: context.config.resolve.extensions,\n outputPath: context.config.output.buildPath,\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.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: 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.workspaceConfig.workspaceRoot }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result;\n}\n"],"mappings":";;;;;;;;AA8BA,MAAa,sBAA4C;CACvD,GAAG;CACH,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,KAAK;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AO,SAAS;EAClC,WAAW,QAAQ,OAAO,SAAS;EACnC,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,gBAAgB,eAAe;EAC1E,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 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\ninterface TsupResolvedBuildConfig extends Options {\n esbuildOptions?: TsupEsbuildOptionsHandler;\n workspaceConfig?: {\n workspaceRoot: string;\n };\n}\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 }) as TsupResolvedBuildConfig[\"esbuildOptions\"],\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.assets as (string | AssetGlob)[],\n resolveExtensions: context.config.resolve.extensions,\n outputPath: context.config.output.path,\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.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: 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.workspaceConfig.workspaceRoot }\n },\n DEFAULT_TSUP_CONFIG\n );\n\n result.format = getUnique(toArray(result.format));\n return result;\n}\n"],"mappings":";;;;;;;;AA8BA,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;;;;;;;;AAqBlD,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,kBACE,SACA,QACG;AACH,OAAK,QAAQ,OAAoC,MAA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.363",
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,19 +73,19 @@
73
73
  "typings": "dist/index.d.mts",
74
74
  "files": ["dist/**/*"],
75
75
  "dependencies": {
76
- "@powerlines/core": "^0.4.2",
77
- "@powerlines/plugin-esbuild": "^0.13.358",
78
- "@storm-software/build-tools": "^0.158.112",
79
- "@stryke/convert": "^0.6.54",
80
- "@stryke/helpers": "^0.10.4",
81
- "@stryke/path": "^0.27.0",
82
- "@stryke/type-checks": "^0.5.39",
83
- "@stryke/types": "^0.10.53",
76
+ "@powerlines/core": "^0.5.3",
77
+ "@powerlines/plugin-esbuild": "^0.13.362",
78
+ "@storm-software/build-tools": "^0.158.120",
79
+ "@stryke/convert": "^0.6.56",
80
+ "@stryke/helpers": "^0.10.6",
81
+ "@stryke/path": "^0.27.2",
82
+ "@stryke/type-checks": "^0.5.41",
83
+ "@stryke/types": "^0.11.1",
84
84
  "defu": "^6.1.4",
85
85
  "unplugin": "^3.0.0"
86
86
  },
87
87
  "devDependencies": {
88
- "@storm-software/tsup": "^0.2.110",
88
+ "@storm-software/tsup": "^0.2.118",
89
89
  "@types/node": "^25.5.0",
90
90
  "tsup": "8.4.0"
91
91
  },
@@ -95,5 +95,5 @@
95
95
  "tsup": { "optional": false }
96
96
  },
97
97
  "publishConfig": { "access": "public" },
98
- "gitHead": "35de1fedab5f201f37c40614247597978a213844"
98
+ "gitHead": "27305574e9a8dbc8107e4127b2feba7a10fa9c89"
99
99
  }