@powerlines/plugin-tsdown 0.1.242 → 0.1.244
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.
- package/dist/core/src/lib/logger.mjs +40 -0
- package/dist/core/src/lib/logger.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
- package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/index.mjs +5 -0
- package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
- package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/plugin.mjs +71 -0
- package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
- package/dist/core/src/lib/utilities/format.mjs +29 -0
- package/dist/core/src/lib/utilities/format.mjs.map +1 -0
- package/dist/core/src/lib/utilities/source-file.mjs +21 -0
- package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
- package/dist/core/src/plugin-utils/build-helpers.mjs +35 -0
- package/dist/core/src/plugin-utils/build-helpers.mjs.map +1 -0
- package/dist/core/src/plugin-utils/context-helpers.mjs +4 -0
- package/dist/core/src/plugin-utils/extend.mjs +5 -0
- package/dist/core/src/plugin-utils/get-config-path.mjs +3 -0
- package/dist/core/src/plugin-utils/helpers.mjs +48 -0
- package/dist/core/src/plugin-utils/helpers.mjs.map +1 -0
- package/dist/core/src/plugin-utils/index.mjs +9 -0
- package/dist/core/src/plugin-utils/merge.mjs +47 -0
- package/dist/core/src/plugin-utils/merge.mjs.map +1 -0
- package/dist/core/src/plugin-utils/paths.mjs +4 -0
- package/dist/core/src/types/api.d.mts +103 -0
- package/dist/core/src/types/api.d.mts.map +1 -0
- package/dist/core/src/types/commands.d.mts +10 -0
- package/dist/core/src/types/commands.d.mts.map +1 -0
- package/dist/core/src/types/commands.mjs +16 -0
- package/dist/core/src/types/commands.mjs.map +1 -0
- package/dist/core/src/types/config.d.mts +551 -0
- package/dist/core/src/types/config.d.mts.map +1 -0
- package/dist/core/src/types/context.d.mts +511 -0
- package/dist/core/src/types/context.d.mts.map +1 -0
- package/dist/core/src/types/fs.d.mts +487 -0
- package/dist/core/src/types/fs.d.mts.map +1 -0
- package/dist/core/src/types/hooks.d.mts +99 -0
- package/dist/core/src/types/hooks.d.mts.map +1 -0
- package/dist/core/src/types/index.d.mts +9 -0
- package/dist/core/src/types/plugin.d.mts +204 -0
- package/dist/core/src/types/plugin.d.mts.map +1 -0
- package/dist/core/src/types/plugin.mjs +33 -0
- package/dist/core/src/types/plugin.mjs.map +1 -0
- package/dist/core/src/types/tsconfig.d.mts +70 -0
- package/dist/core/src/types/tsconfig.d.mts.map +1 -0
- package/dist/core/src/types/unplugin.d.mts +25 -0
- package/dist/core/src/types/unplugin.d.mts.map +1 -0
- package/dist/core/src/types/unplugin.mjs +22 -0
- package/dist/core/src/types/unplugin.mjs.map +1 -0
- package/dist/helpers/format-package-json.mjs +4 -4
- package/dist/helpers/format-package-json.mjs.map +1 -1
- package/dist/helpers/index.d.mts +3 -1
- package/dist/helpers/index.mjs +3 -1
- package/dist/helpers/resolve-options.d.mts +31 -0
- package/dist/helpers/resolve-options.d.mts.map +1 -0
- package/dist/helpers/resolve-options.mjs +124 -0
- package/dist/helpers/resolve-options.mjs.map +1 -0
- package/dist/helpers/unplugin.mjs +2 -1
- package/dist/helpers/unplugin.mjs.map +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -9
- package/dist/index.mjs.map +1 -1
- package/dist/types/build.d.mts +8 -0
- package/dist/types/build.d.mts.map +1 -0
- package/dist/types/build.mjs +1 -0
- package/dist/types/index.d.mts +2 -1
- package/dist/types/plugin.d.mts +11 -7
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +28 -107
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/helpers/format-package-json.cjs +0 -19
- package/dist/helpers/format-package-json.d.cts +0 -13
- package/dist/helpers/format-package-json.d.cts.map +0 -1
- package/dist/helpers/index.cjs +0 -3
- package/dist/helpers/index.d.cts +0 -2
- package/dist/helpers/unplugin.cjs +0 -11
- package/dist/helpers/unplugin.d.cts +0 -8
- package/dist/helpers/unplugin.d.cts.map +0 -1
- package/dist/index.cjs +0 -43
- package/dist/index.d.cts +0 -14
- package/dist/index.d.cts.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.cjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs +0 -29
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.cjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs +0 -21
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.cjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs +0 -21
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.cjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.cjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +0 -1
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +0 -2
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +0 -17
- package/dist/types/plugin.d.cts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options.mjs","names":["DEFAULT_TSDOWN_CONFIG: Partial<BuildOptions>","defu"],"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 { getDependencyConfig } from \"@powerlines/core/plugin-utils\";\nimport { Context } from \"@powerlines/core/types\";\nimport { RolldownPluginResolvedConfig } from \"@powerlines/plugin-rolldown/types/plugin\";\nimport type { Format } from \"@storm-software/build-tools/types\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport { UserConfig as BuildOptions, Format as TsdownFormat } from \"tsdown\";\nimport { TsdownPluginResolvedConfig } from \"../types/plugin\";\n\nexport const DEFAULT_TSDOWN_CONFIG: Partial<BuildOptions> = {\n platform: \"neutral\",\n target: \"esnext\",\n fixedExtension: true,\n nodeProtocol: true,\n clean: false\n} as const;\n\n/**\n * Resolves the entry options for [tsdown](https://github.com/rolldown/tsdown).\n *\n * @param formats - The formats to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveFormat(formats?: Format | Format[]): TsdownFormat[] {\n return toArray(formats).map(format => {\n switch (format) {\n case \"cjs\":\n return \"cjs\";\n case \"iife\":\n return \"iife\";\n case \"esm\":\n default:\n return \"esm\";\n }\n });\n}\n\n/**\n * Resolves the entry options for [tsdown](https://github.com/rolldown/tsdown).\n *\n * @param formats - The formats to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveFromFormat(\n formats?: TsdownFormat | TsdownFormat[]\n): Format[] {\n return toArray(formats).map(format => {\n switch (format) {\n case \"cjs\":\n case \"commonjs\":\n return \"cjs\";\n case \"iife\":\n return \"iife\";\n case \"esm\":\n case \"es\":\n case \"module\":\n case \"umd\":\n default:\n return \"esm\";\n }\n });\n}\n\nconst formatMessage = (context: Context, ...msgs: any[]) =>\n msgs\n .filter(Boolean)\n .join(\" \")\n .replace(new RegExp(`\\\\[${context.config.name}\\\\]`, \"g\"), \"\")\n .replaceAll(/^\\s+/g, \"\")\n .replaceAll(/\\s+$/g, \"\")\n .trim();\n\n/**\n * Resolves the options for [tsdown](https://github.com/rolldown/tsdown).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): BuildOptions {\n const { external, noExternal } = getDependencyConfig(context);\n\n return defu(\n {\n entry:\n context.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n context.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(context.config.root, \"src\")\n ),\n context.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n external,\n noExternal,\n alias: context.alias,\n resolve: {\n alias: context.alias\n },\n exports:\n (context.config as TsdownPluginResolvedConfig)?.tsdown &&\n (context.config as TsdownPluginResolvedConfig).tsdown?.exports\n ? defu(\n isSetObject(\n (context.config as TsdownPluginResolvedConfig).tsdown?.exports\n )\n ? (context.config as TsdownPluginResolvedConfig).tsdown?.exports\n : {},\n {\n customExports: (exports: Record<string, any>) => {\n const result = Object.fromEntries(\n Object.entries(exports).map(([key, value]) => {\n if (isSetString(value)) {\n return [key, value];\n }\n\n const currentExport = {} as Record<string, any>;\n if (isSetString(value.require)) {\n currentExport.require = {\n types: replaceExtension(value.require, \".d.cts\", {\n fullExtension: true\n }),\n default: value.require\n };\n }\n\n if (isSetString(value.import)) {\n currentExport.import = {\n types: replaceExtension(value.import, \".d.mts\", {\n fullExtension: true\n }),\n default: value.import\n };\n }\n\n if (!isSetObject(value.default)) {\n if (isSetObject(currentExport.import)) {\n currentExport.default = currentExport.import;\n } else if (isSetObject(currentExport.require)) {\n currentExport.default = currentExport.require;\n }\n }\n\n return [key, currentExport];\n })\n );\n\n return Object.keys(result)\n .sort()\n .reduce(\n (ret, key) => {\n ret[key] = result[key];\n return ret;\n },\n {} as Record<string, any>\n );\n }\n }\n )\n : undefined\n },\n (context.config as TsdownPluginResolvedConfig)?.tsdown\n ? (context.config as TsdownPluginResolvedConfig)?.tsdown\n : {},\n (context.config as RolldownPluginResolvedConfig)?.rolldown\n ? {\n inputOptions: (context.config as RolldownPluginResolvedConfig)\n ?.rolldown\n }\n : {},\n {\n name: context.config.name,\n cwd: appendPath(\n context.config.root,\n context.workspaceConfig.workspaceRoot\n ),\n define: context.config.define,\n inputOptions: {\n transform: {\n inject: context.config.inject\n }\n },\n platform: context.config.platform,\n dts: true,\n outDir: appendPath(\n context.config.output.buildPath,\n context.workspaceConfig.workspaceRoot\n ),\n tsconfig: appendPath(\n context.tsconfig.tsconfigFilePath,\n context.workspaceConfig.workspaceRoot\n ),\n format: resolveFormat(context.config.output.format).filter(Boolean),\n mode: context.config.mode,\n treeshake: (context.config as TsdownPluginResolvedConfig)?.tsdown\n ? (context.config as TsdownPluginResolvedConfig)?.tsdown?.treeshake\n : undefined,\n minify: context.config.mode === \"production\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\",\n debug: context.config.mode === \"development\",\n silent:\n context.config.logLevel === null ||\n context.config.mode === \"production\",\n logLevel:\n context.config.logLevel === \"trace\" ? \"debug\" : context.config.logLevel,\n customLogger: {\n level:\n context.config.logLevel === \"trace\"\n ? \"debug\"\n : context.config.logLevel,\n info: (...msgs: any[]) =>\n isSetString(formatMessage(context, ...msgs).replace(/\\s+/g, \"\")) &&\n context.debug(formatMessage(context, ...msgs)),\n warn: (...msgs: any[]) =>\n isSetString(formatMessage(context, ...msgs).replace(/\\s+/g, \"\")) &&\n context.warn(formatMessage(context, ...msgs)),\n warnOnce: (...msgs: any[]) =>\n isSetString(formatMessage(context, ...msgs).replace(/\\s+/g, \"\")) &&\n context.warn(formatMessage(context, ...msgs)),\n error: (...msgs: any[]) =>\n isSetString(formatMessage(context, ...msgs).replace(/\\s+/g, \"\")) &&\n context.error(formatMessage(context, ...msgs)),\n success: (...msgs: any[]) =>\n isSetString(formatMessage(context, ...msgs).replace(/\\s+/g, \"\")) &&\n context.debug(formatMessage(context, ...msgs))\n }\n },\n DEFAULT_TSDOWN_CONFIG\n ) as BuildOptions;\n}\n"],"mappings":"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"}
|
|
@@ -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/lib/unplugin\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { TsdownPluginContext } from \"../types/plugin\";\n\nexport function createTsdownPlugin(context: TsdownPluginContext) {\n return createRolldownPlugin(createUnplugin(context))({});\n}\n"],"mappings":"
|
|
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 { createRolldownPlugin } from \"unplugin\";\nimport { TsdownPluginContext } from \"../types/plugin\";\n\nexport function createTsdownPlugin(context: TsdownPluginContext) {\n return createRolldownPlugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAO,qBAAqB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { Plugin } from "./core/src/types/plugin.mjs";
|
|
2
|
+
import "./core/src/types/index.mjs";
|
|
3
|
+
import { TsdownOptions, __ΩTsdownOptions } from "./types/build.mjs";
|
|
1
4
|
import { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig } from "./types/plugin.mjs";
|
|
5
|
+
import { formatPackageJson } from "./helpers/format-package-json.mjs";
|
|
6
|
+
import { DEFAULT_TSDOWN_CONFIG, resolveFormat, resolveFromFormat, resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
7
|
import { createTsdownPlugin } from "./helpers/unplugin.mjs";
|
|
3
8
|
import "./helpers/index.mjs";
|
|
4
9
|
import "./types/index.mjs";
|
|
5
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
6
10
|
|
|
7
11
|
//#region src/index.d.ts
|
|
8
12
|
/**
|
|
@@ -10,5 +14,5 @@ import { Plugin } from "powerlines/types/plugin";
|
|
|
10
14
|
*/
|
|
11
15
|
declare const plugin: <TContext extends TsdownPluginContext = TsdownPluginContext>(options?: TsdownPluginOptions) => Plugin<TContext>;
|
|
12
16
|
//#endregion
|
|
13
|
-
export { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig, createTsdownPlugin, plugin as default, plugin };
|
|
17
|
+
export { DEFAULT_TSDOWN_CONFIG, TsdownOptions, TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownOptions, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig, createTsdownPlugin, plugin as default, plugin, formatPackageJson, resolveFormat, resolveFromFormat, resolveOptions };
|
|
14
18
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAoCa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { formatPackageJson } from "./helpers/format-package-json.mjs";
|
|
2
|
+
import { DEFAULT_TSDOWN_CONFIG, resolveFormat, resolveFromFormat, resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
3
|
import { createTsdownPlugin } from "./helpers/unplugin.mjs";
|
|
3
4
|
import "./helpers/index.mjs";
|
|
4
|
-
import defu from "defu";
|
|
5
|
-
import { extractTsdownConfig } from "powerlines/lib/build/tsdown";
|
|
5
|
+
import defu$1 from "defu";
|
|
6
6
|
import { build } from "tsdown";
|
|
7
7
|
|
|
8
8
|
//#region src/index.ts
|
|
@@ -16,18 +16,15 @@ const plugin = (options = {}) => {
|
|
|
16
16
|
this.trace("Providing default configuration for the Powerlines `tsdown` build plugin.");
|
|
17
17
|
return {
|
|
18
18
|
output: { format: ["cjs", "esm"] },
|
|
19
|
-
|
|
20
|
-
...options,
|
|
21
|
-
variant: "tsdown"
|
|
22
|
-
}
|
|
19
|
+
tsdown: { ...options }
|
|
23
20
|
};
|
|
24
21
|
},
|
|
25
22
|
async build() {
|
|
26
23
|
this.trace("Starting Tsdown build process...");
|
|
27
|
-
await build(defu({
|
|
24
|
+
await build(defu$1({
|
|
28
25
|
config: false,
|
|
29
26
|
plugins: [createTsdownPlugin(this)]
|
|
30
|
-
},
|
|
27
|
+
}, resolveOptions(this)));
|
|
31
28
|
await formatPackageJson(this);
|
|
32
29
|
}
|
|
33
30
|
};
|
|
@@ -35,5 +32,5 @@ const plugin = (options = {}) => {
|
|
|
35
32
|
var src_default = plugin;
|
|
36
33
|
|
|
37
34
|
//#endregion
|
|
38
|
-
export { createTsdownPlugin, src_default as default, plugin };
|
|
35
|
+
export { DEFAULT_TSDOWN_CONFIG, createTsdownPlugin, src_default as default, formatPackageJson, plugin, resolveFormat, resolveFromFormat, resolveOptions };
|
|
39
36
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"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
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["defu"],"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/types\";\nimport defu from \"defu\";\nimport { build } from \"tsdown\";\nimport { formatPackageJson } from \"./helpers/format-package-json\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createTsdownPlugin } from \"./helpers/unplugin\";\nimport {\n TsdownPluginContext,\n TsdownPluginOptions,\n TsdownPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to use Tsdown to build the project.\n */\nexport const plugin = <\n TContext extends TsdownPluginContext = TsdownPluginContext\n>(\n options: TsdownPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"tsdown\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `tsdown` build plugin.\"\n );\n\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n tsdown: {\n ...options\n }\n } as Partial<TsdownPluginResolvedConfig>;\n },\n async build() {\n this.trace(\"Starting Tsdown build process...\");\n\n await build(\n defu(\n {\n config: false,\n plugins: [createTsdownPlugin(this)]\n },\n resolveOptions(this)\n )\n );\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAoCA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,4EACD;AAED,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,QAAQ,EACN,GAAG,SACJ;IACF;;EAEH,MAAM,QAAQ;AACZ,QAAK,MAAM,mCAAmC;AAE9C,SAAM,MACJA,OACE;IACE,QAAQ;IACR,SAAS,CAAC,mBAAmB,KAAK,CAAC;IACpC,EACD,eAAe,KAAK,CACrB,CACF;AAED,SAAM,kBAAkB,KAAK;;EAEhC;;AAGH,kBAAe"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UserConfig } from "tsdown";
|
|
2
|
+
|
|
3
|
+
//#region src/types/build.d.ts
|
|
4
|
+
type TsdownOptions = Partial<Omit<UserConfig, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">>;
|
|
5
|
+
declare type __ΩTsdownOptions = any[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TsdownOptions, __ΩTsdownOptions };
|
|
8
|
+
//# sourceMappingURL=build.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.mts","names":[],"sources":["../../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,QAC1B,KACE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { TsdownOptions, __ΩTsdownOptions } from "./build.mjs";
|
|
1
2
|
import { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig } from "./plugin.mjs";
|
|
2
|
-
export { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig };
|
|
3
|
+
export { TsdownOptions, TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownOptions, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { PluginContext } from "../core/src/types/context.mjs";
|
|
2
|
+
import { ResolvedConfig, UserConfig } from "../core/src/types/config.mjs";
|
|
3
|
+
import "../core/src/types/index.mjs";
|
|
4
|
+
import { TsdownOptions } from "./build.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/types/plugin.d.ts
|
|
7
|
-
type TsdownPluginOptions = Partial<
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type TsdownPluginOptions = Partial<TsdownOptions>;
|
|
8
|
+
interface TsdownPluginUserConfig extends UserConfig {
|
|
9
|
+
tsdown?: TsdownPluginOptions;
|
|
10
|
+
}
|
|
11
|
+
interface TsdownPluginResolvedConfig extends ResolvedConfig {
|
|
12
|
+
tsdown: TsdownOptions;
|
|
13
|
+
}
|
|
10
14
|
type TsdownPluginContext<TResolvedConfig extends TsdownPluginResolvedConfig = TsdownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
11
15
|
declare type __ΩTsdownPluginOptions = any[];
|
|
12
16
|
declare type __ΩTsdownPluginUserConfig = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAyBY,mBAAA,GAAsB,QAAQ;UAEzB,sBAAA,SAA+B;WACrC;;AAHC,UAMK,0BAAA,SAAmC,cANX,CAAA;EAExB,MAAA,EAKP,aALO;AAIjB;AAIY,KAAA,mBAAmB,CAAA,wBACL,0BADK,GAE3B,0BAF2B,CAAA,GAG3B,aAH2B,CAGb,eAHa,CAAA;AACL,sCAAA,GAAA,EAAA;AACtB,yCAAA,GAAA,EAAA;AACc,6CAAA,GAAA,EAAA;AAAd,sCAAA,GAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsdown",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.1.244",
|
|
4
|
+
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
|
+
"keywords": ["tsdown", "powerlines", "storm-software", "powerlines-plugin"],
|
|
7
|
+
"homepage": "https://stormsoftware.com",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://stormsoftware.com/support",
|
|
10
|
+
"email": "support@stormsoftware.com"
|
|
11
|
+
},
|
|
6
12
|
"repository": {
|
|
7
13
|
"type": "github",
|
|
8
14
|
"url": "https://github.com/storm-software/powerlines.git",
|
|
9
15
|
"directory": "packages/plugin-tsdown"
|
|
10
16
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"url": "https://
|
|
14
|
-
"email": "support@stormsoftware.com"
|
|
17
|
+
"funding": {
|
|
18
|
+
"type": "github",
|
|
19
|
+
"url": "https://github.com/sponsors/storm-software"
|
|
15
20
|
},
|
|
21
|
+
"license": "Apache-2.0",
|
|
16
22
|
"author": {
|
|
17
23
|
"name": "Storm Software",
|
|
18
24
|
"email": "contact@stormsoftware.com",
|
|
@@ -32,115 +38,30 @@
|
|
|
32
38
|
"url": "https://stormsoftware.com"
|
|
33
39
|
}
|
|
34
40
|
],
|
|
35
|
-
"
|
|
36
|
-
"type": "github",
|
|
37
|
-
"url": "https://github.com/sponsors/storm-software"
|
|
38
|
-
},
|
|
39
|
-
"license": "Apache-2.0",
|
|
40
|
-
"private": false,
|
|
41
|
-
"main": "./dist/index.cjs",
|
|
42
|
-
"module": "./dist/index.mjs",
|
|
41
|
+
"type": "module",
|
|
43
42
|
"exports": {
|
|
44
|
-
".":
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"default": {
|
|
54
|
-
"types": "./dist/index.d.mts",
|
|
55
|
-
"default": "./dist/index.mjs"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"./helpers": {
|
|
59
|
-
"require": {
|
|
60
|
-
"types": "./dist/helpers/index.d.cts",
|
|
61
|
-
"default": "./dist/helpers/index.cjs"
|
|
62
|
-
},
|
|
63
|
-
"import": {
|
|
64
|
-
"types": "./dist/helpers/index.d.mts",
|
|
65
|
-
"default": "./dist/helpers/index.mjs"
|
|
66
|
-
},
|
|
67
|
-
"default": {
|
|
68
|
-
"types": "./dist/helpers/index.d.mts",
|
|
69
|
-
"default": "./dist/helpers/index.mjs"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"./helpers/format-package-json": {
|
|
73
|
-
"require": {
|
|
74
|
-
"types": "./dist/helpers/format-package-json.d.cts",
|
|
75
|
-
"default": "./dist/helpers/format-package-json.cjs"
|
|
76
|
-
},
|
|
77
|
-
"import": {
|
|
78
|
-
"types": "./dist/helpers/format-package-json.d.mts",
|
|
79
|
-
"default": "./dist/helpers/format-package-json.mjs"
|
|
80
|
-
},
|
|
81
|
-
"default": {
|
|
82
|
-
"types": "./dist/helpers/format-package-json.d.mts",
|
|
83
|
-
"default": "./dist/helpers/format-package-json.mjs"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"./helpers/unplugin": {
|
|
87
|
-
"require": {
|
|
88
|
-
"types": "./dist/helpers/unplugin.d.cts",
|
|
89
|
-
"default": "./dist/helpers/unplugin.cjs"
|
|
90
|
-
},
|
|
91
|
-
"import": {
|
|
92
|
-
"types": "./dist/helpers/unplugin.d.mts",
|
|
93
|
-
"default": "./dist/helpers/unplugin.mjs"
|
|
94
|
-
},
|
|
95
|
-
"default": {
|
|
96
|
-
"types": "./dist/helpers/unplugin.d.mts",
|
|
97
|
-
"default": "./dist/helpers/unplugin.mjs"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"./package.json": "./package.json",
|
|
101
|
-
"./types": {
|
|
102
|
-
"require": {
|
|
103
|
-
"types": "./dist/types/index.d.cts",
|
|
104
|
-
"default": "./dist/types/index.cjs"
|
|
105
|
-
},
|
|
106
|
-
"import": {
|
|
107
|
-
"types": "./dist/types/index.d.mts",
|
|
108
|
-
"default": "./dist/types/index.mjs"
|
|
109
|
-
},
|
|
110
|
-
"default": {
|
|
111
|
-
"types": "./dist/types/index.d.mts",
|
|
112
|
-
"default": "./dist/types/index.mjs"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"./types/plugin": {
|
|
116
|
-
"require": {
|
|
117
|
-
"types": "./dist/types/plugin.d.cts",
|
|
118
|
-
"default": "./dist/types/plugin.cjs"
|
|
119
|
-
},
|
|
120
|
-
"import": {
|
|
121
|
-
"types": "./dist/types/plugin.d.mts",
|
|
122
|
-
"default": "./dist/types/plugin.mjs"
|
|
123
|
-
},
|
|
124
|
-
"default": {
|
|
125
|
-
"types": "./dist/types/plugin.d.mts",
|
|
126
|
-
"default": "./dist/types/plugin.mjs"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
43
|
+
".": "./dist/index.mjs",
|
|
44
|
+
"./helpers": "./dist/helpers/index.mjs",
|
|
45
|
+
"./helpers/format-package-json": "./dist/helpers/format-package-json.mjs",
|
|
46
|
+
"./helpers/resolve-options": "./dist/helpers/resolve-options.mjs",
|
|
47
|
+
"./helpers/unplugin": "./dist/helpers/unplugin.mjs",
|
|
48
|
+
"./types": "./dist/types/index.mjs",
|
|
49
|
+
"./types/build": "./dist/types/build.mjs",
|
|
50
|
+
"./types/plugin": "./dist/types/plugin.mjs",
|
|
51
|
+
"./*": "./*"
|
|
129
52
|
},
|
|
53
|
+
"main": "./dist/index.mjs",
|
|
54
|
+
"module": "./dist/index.mjs",
|
|
55
|
+
"types": "./dist/index.d.mts",
|
|
130
56
|
"typings": "dist/index.d.mts",
|
|
131
57
|
"files": ["dist/**/*"],
|
|
132
|
-
"keywords": ["tsdown", "powerlines", "storm-software", "powerlines-plugin"],
|
|
133
58
|
"dependencies": {
|
|
59
|
+
"@powerlines/plugin-rolldown": "^0.7.301",
|
|
134
60
|
"defu": "^6.1.4",
|
|
135
|
-
"powerlines": "^0.38.56",
|
|
136
61
|
"tsdown": "0.17.0-beta.5",
|
|
137
62
|
"unplugin": "3.0.0-beta.3"
|
|
138
63
|
},
|
|
139
|
-
"devDependencies": {
|
|
140
|
-
"@powerlines/plugin-plugin": "^0.12.240",
|
|
141
|
-
"@types/node": "^25.3.0"
|
|
142
|
-
},
|
|
64
|
+
"devDependencies": { "@types/node": "^25.3.2" },
|
|
143
65
|
"publishConfig": { "access": "public" },
|
|
144
|
-
"
|
|
145
|
-
"gitHead": "256020b11a6afd9decac143ca57eaba68d102906"
|
|
66
|
+
"gitHead": "0dcb16f054b8a69915b074578e6d4dfa3ecc1529"
|
|
146
67
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
|
-
const require_is_set_string = require('../node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.cjs');
|
|
4
|
-
let powerlines_lib_utilities_format = require("powerlines/lib/utilities/format");
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/format-package-json.ts
|
|
7
|
-
/**
|
|
8
|
-
* Formats the `package.json` file in the project root.
|
|
9
|
-
*
|
|
10
|
-
* @param context - The Tsdown plugin context.
|
|
11
|
-
*/
|
|
12
|
-
async function formatPackageJson(context) {
|
|
13
|
-
const packageJsonPath = require_join_paths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, "package.json");
|
|
14
|
-
const packageJsonFile = await context.fs.read(packageJsonPath);
|
|
15
|
-
if (require_is_set_string.isSetString(packageJsonFile)) await context.fs.write(packageJsonPath, await (0, powerlines_lib_utilities_format.format)(context, packageJsonPath, packageJsonFile));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
exports.formatPackageJson = formatPackageJson;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TsdownPluginContext } from "../types/plugin.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/format-package-json.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Formats the `package.json` file in the project root.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The Tsdown plugin context.
|
|
9
|
-
*/
|
|
10
|
-
declare function formatPackageJson(context: TsdownPluginContext): Promise<void>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { formatPackageJson };
|
|
13
|
-
//# sourceMappingURL=format-package-json.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-package-json.d.cts","names":[],"sources":["../../src/helpers/format-package-json.ts"],"sourcesContent":[],"mappings":";;;;;;AA4BA;;;iBAAsB,iBAAA,UAA2B,sBAAmB"}
|
package/dist/helpers/index.cjs
DELETED
package/dist/helpers/index.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let powerlines_lib_unplugin = require("powerlines/lib/unplugin");
|
|
3
|
-
let unplugin = require("unplugin");
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/unplugin.ts
|
|
6
|
-
function createTsdownPlugin(context) {
|
|
7
|
-
return (0, unplugin.createRolldownPlugin)((0, powerlines_lib_unplugin.createUnplugin)(context))({});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
exports.createTsdownPlugin = createTsdownPlugin;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TsdownPluginContext } from "../types/plugin.cjs";
|
|
2
|
-
import * as rolldown0 from "rolldown";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createTsdownPlugin(context: TsdownPluginContext): rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createTsdownPlugin };
|
|
8
|
-
//# sourceMappingURL=unplugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA,cAAA,SAAA,CAAA"}
|
package/dist/index.cjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_helpers_format_package_json = require('./helpers/format-package-json.cjs');
|
|
4
|
-
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
5
|
-
require('./helpers/index.cjs');
|
|
6
|
-
let defu = require("defu");
|
|
7
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
8
|
-
let powerlines_lib_build_tsdown = require("powerlines/lib/build/tsdown");
|
|
9
|
-
let tsdown = require("tsdown");
|
|
10
|
-
|
|
11
|
-
//#region src/index.ts
|
|
12
|
-
/**
|
|
13
|
-
* A Powerlines plugin to use Tsdown to build the project.
|
|
14
|
-
*/
|
|
15
|
-
const plugin = (options = {}) => {
|
|
16
|
-
return {
|
|
17
|
-
name: "tsdown",
|
|
18
|
-
config() {
|
|
19
|
-
this.trace("Providing default configuration for the Powerlines `tsdown` build plugin.");
|
|
20
|
-
return {
|
|
21
|
-
output: { format: ["cjs", "esm"] },
|
|
22
|
-
build: {
|
|
23
|
-
...options,
|
|
24
|
-
variant: "tsdown"
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
async build() {
|
|
29
|
-
this.trace("Starting Tsdown build process...");
|
|
30
|
-
await (0, tsdown.build)((0, defu.default)({
|
|
31
|
-
config: false,
|
|
32
|
-
plugins: [require_helpers_unplugin.createTsdownPlugin(this)]
|
|
33
|
-
}, (0, powerlines_lib_build_tsdown.extractTsdownConfig)(this)));
|
|
34
|
-
await require_helpers_format_package_json.formatPackageJson(this);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
var src_default = plugin;
|
|
39
|
-
|
|
40
|
-
//#endregion
|
|
41
|
-
exports.createTsdownPlugin = require_helpers_unplugin.createTsdownPlugin;
|
|
42
|
-
exports.default = src_default;
|
|
43
|
-
exports.plugin = plugin;
|
package/dist/index.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
-
import { createTsdownPlugin } from "./helpers/unplugin.cjs";
|
|
3
|
-
import "./helpers/index.cjs";
|
|
4
|
-
import "./types/index.cjs";
|
|
5
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
6
|
-
|
|
7
|
-
//#region src/index.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* A Powerlines plugin to use Tsdown to build the project.
|
|
10
|
-
*/
|
|
11
|
-
declare const plugin: <TContext extends TsdownPluginContext = TsdownPluginContext>(options?: TsdownPluginOptions) => Plugin<TContext>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig, createTsdownPlugin, plugin as default, plugin };
|
|
14
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAoCa,cAAA,MAsCZ,EAAA,CAAA,iBArCkB,mBAqClB,GArCwC,mBAqCxC,CAAA,CAAA,OAAA,CAAA,EAnCU,mBAmCV,EAAA,GAlCE,MAkCF,CAlCS,QAkCT,CAAA"}
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const require_regex = require('./regex.cjs');
|
|
2
|
-
const require_slash = require('./slash.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs
|
|
5
|
-
/**
|
|
6
|
-
* Check if the path is an absolute path.
|
|
7
|
-
*
|
|
8
|
-
* @param path - The path to check
|
|
9
|
-
* @returns An indicator specifying if the path is an absolute path
|
|
10
|
-
*/
|
|
11
|
-
function isAbsolutePath(path) {
|
|
12
|
-
return require_regex.ABSOLUTE_PATH_REGEX.test(require_slash.slash(path));
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Check if the path is an absolute path.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* This is an alias for {@link isAbsolutePath}.
|
|
19
|
-
*
|
|
20
|
-
* @param path - The path to check
|
|
21
|
-
* @returns An indicator specifying if the path is an absolute path
|
|
22
|
-
*/
|
|
23
|
-
function isAbsolute(path) {
|
|
24
|
-
return isAbsolutePath(path);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
exports.isAbsolute = isAbsolute;
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ABSOLUTE_PATH_REGEX } from "./regex.mjs";
|
|
2
|
-
import { slash } from "./slash.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs
|
|
5
|
-
/**
|
|
6
|
-
* Check if the path is an absolute path.
|
|
7
|
-
*
|
|
8
|
-
* @param path - The path to check
|
|
9
|
-
* @returns An indicator specifying if the path is an absolute path
|
|
10
|
-
*/
|
|
11
|
-
function isAbsolutePath(path) {
|
|
12
|
-
return ABSOLUTE_PATH_REGEX.test(slash(path));
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Check if the path is an absolute path.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* This is an alias for {@link isAbsolutePath}.
|
|
19
|
-
*
|
|
20
|
-
* @param path - The path to check
|
|
21
|
-
* @returns An indicator specifying if the path is an absolute path
|
|
22
|
-
*/
|
|
23
|
-
function isAbsolute(path) {
|
|
24
|
-
return isAbsolutePath(path);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
export { isAbsolute };
|
|
29
|
-
//# sourceMappingURL=is-type.mjs.map
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-type.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs"],"sourcesContent":["import { ABSOLUTE_PATH_REGEX, NPM_SCOPED_PACKAGE_REGEX } from \"./regex.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/is-type.ts\n/**\n* Check if the path is an absolute path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolutePath(path) {\n\treturn ABSOLUTE_PATH_REGEX.test(slash(path));\n}\n/**\n* Check if the path is an absolute path.\n*\n* @remarks\n* This is an alias for {@link isAbsolutePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is an absolute path\n*/\nfunction isAbsolute(path) {\n\treturn isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelativePath(path) {\n\treturn !isAbsolutePath(path);\n}\n/**\n* Check if the path is a relative path.\n*\n* @remarks\n* This is an alias for {@link isRelativePath}.\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a relative path\n*/\nfunction isRelative(path) {\n\treturn isRelativePath(path);\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackage}.\n*\n* @example\n* ```ts\n* isNpmScopedPackage(\"@stryke/path\"); // returns true\n* isNpmScopedPackage(\"lodash\"); // returns false\n* isNpmNamespacePackage(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackagePath(path) {\n\treturn NPM_SCOPED_PACKAGE_REGEX.test(slash(path));\n}\n/**\n* Check if the path is a npm package path.\n*\n* @remarks\n* This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackagePath}.\n*\n* @example\n* ```ts\n* isNpmScopedPackagePath(\"@stryke/path\"); // returns true\n* isNpmScopedPackagePath(\"lodash\"); // returns false\n* isNpmScopedPackagePath(\"./src/index.ts\"); // returns false\n* ```\n*\n* @param path - The path to check\n* @returns An indicator specifying if the path is a npm package path\n*/\nfunction isNpmScopedPackage(path) {\n\treturn isNpmScopedPackagePath(path);\n}\n\n//#endregion\nexport { isAbsolute, isAbsolutePath, isNpmScopedPackage, isNpmScopedPackagePath, isRelative, isRelativePath };\n//# sourceMappingURL=is-type.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAS,eAAe,MAAM;AAC7B,QAAO,oBAAoB,KAAK,MAAM,KAAK,CAAC;;;;;;;;;;;AAW7C,SAAS,WAAW,MAAM;AACzB,QAAO,eAAe,KAAK"}
|