@powerlines/plugin-unbuild 0.5.55 → 0.5.57
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/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +1 -7
- package/dist/index.d.cts +7 -23
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-Bvn-he2n.mjs +1 -0
- package/dist/plugin-CgpHQ6ZD.d.cts +1653 -0
- package/dist/plugin-CgpHQ6ZD.d.cts.map +1 -0
- package/dist/plugin-e6LPFTic.d.mts +1654 -0
- package/dist/plugin-e6LPFTic.d.mts.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +3 -20
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +2 -20
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-B7VYa_Pp.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +52 -34
- package/dist/index--WcE9eQD.d.cts +0 -1494
- package/dist/index--WcE9eQD.d.ts +0 -1494
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -7
- package/dist/types/index.d.ts +0 -20
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -20
- /package/dist/{types/plugin.js → plugin-DHXHjv16.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* ⚡ Built by Storm Software
|
|
4
|
-
*
|
|
5
|
-
*****************************************/
|
|
6
|
-
|
|
7
|
-
var o=Object.defineProperty;var n=(i,t)=>o(i,"name",{value:t,configurable:true});const e=n((i={})=>({name:"unbuild",config(){return {output:{format:["esm"]},build:{...unbuild$1.DEFAULT_UNBUILD_CONFIG,...i,variant:"unbuild"}}},async build(){await unbuild.build(unbuild$1.extractUnbuildConfig(this));}}),"plugin");var O=e;exports.default=O;exports.plugin=e;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`@storm-software/unbuild`),l=require(`@stryke/helpers/omit`),u=require(`@stryke/path/join-paths`),d=require(`@stryke/type-checks/is-object`),f=require(`defu`);f=s(f);let p=require(`esbuild`);require(`@stryke/fs/read-file`);let m=require(`@stryke/type-checks/is-set-object`),h=require(`@stryke/type-checks/is-string`);require(`magic-string`);let g=require(`@rollup/plugin-alias`);g=s(g);let _=require(`@rollup/plugin-babel`),v=require(`@rollup/plugin-inject`);v=s(v);let y=require(`@rollup/plugin-node-resolve`);y=s(y);let b=require(`@rollup/plugin-replace`);b=s(b);let x=require(`@stryke/convert/to-array`),S=require(`@stryke/type-checks/is-function`),C=require(`node:fs`),w=require(`rollup-plugin-typescript2`);w=s(w);function T(e){return e?(0,h.isString)(e)?e:(0,m.isSetObject)(e)&&`code`in e?e.code:e.toString():``}const E={name:`powerlines:dts-bundle`,async generateBundle(e,t){for(let[,e]of Object.entries(t)){if(e.type===`asset`||!e.isEntry||e.facadeModuleId==null)continue;let t=e.fileName.replace(/(?:\.cjs|\.mjs|\.esm\.js|\.cjs\.js|\.mjs\.js|\.js)$/,`.d.ts`),n=JSON.stringify(`./${e.facadeModuleId.replace(/\.[cm]?[jt]sx?$/,``)}`);this.emitFile({type:`asset`,fileName:t,source:e.exports.includes(`default`)?`export * from ${n};\nexport { default } from ${n};\n`:`export * from ${n};\n`})}}};function D(e){return(0,f.default)({input:(0,C.globSync)((0,x.toArray)(e.config.entry).map(e=>(0,h.isString)(e)?e:e.file)).flat(),external:(t,n,r)=>{let i=e.config.build.variant===`rollup`&&e.config.build.override.external?(0,S.isFunction)(e.config.build.override.external)?e.config.build.override.external:t=>(0,x.toArray)(e.config.build.override.external).includes(t):e.config.build.variant===`vite`&&e.config.build.override.build?.rollupOptions?.external?(0,S.isFunction)(e.config.build.override.build?.rollupOptions?.external)?e.config.build.override.build?.rollupOptions?.external:t=>(0,x.toArray)(e.config.build?.build?.rollupOptions?.external).includes(t):e.config.build.variant===`rollup`&&e.config.build.external?(0,S.isFunction)(e.config.build.external)?e.config.build.external:t=>(0,x.toArray)(e.config.build.external).includes(t):e.config.build.variant===`vite`&&e.config.build.build?.rollupOptions?.external?(0,S.isFunction)(e.config.build.build?.rollupOptions?.external)?e.config.build.build?.rollupOptions?.external:t=>(0,x.toArray)(e.config.build?.build?.rollupOptions?.external).includes(t):void 0;return(0,S.isFunction)(i)&&i(t,n,r)||e.config.build.external&&(0,x.toArray)(e.config.build.external).includes(t)?!0:e.config.build.noExternal&&(0,x.toArray)(e.config.build.noExternal).includes(t)?!1:e.builtins.includes(t)?e.config.projectType!==`application`:!e.config.build.skipNodeModulesBundle},plugins:[(0,w.default)({check:!1,tsconfig:e.tsconfig.tsconfigFilePath}),e.config.build.define&&Object.keys(e.config.build.define).length>0&&(0,b.default)({sourceMap:e.config.mode===`development`,preventAssignment:!0,...e.config.build.define??{}}),e.config.build.inject&&Object.keys(e.config.build.inject).length>0&&(0,v.default)({sourceMap:e.config.mode===`development`,...e.config.build.inject}),(0,g.default)({entries:e.builtins.reduce((t,n)=>{if(!t.find(e=>e.find===n)){let r=e.fs.ids[n];r&&t.push({find:n,replacement:r})}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias:Object.entries(e.config.build.alias).reduce((e,[t,n])=>(e.find(e=>e.find===t)||e.push({find:t,replacement:n}),e),[]):[])}),(0,_.getBabelInputPlugin)((0,f.default)(e.config.transform.babel,{caller:{name:`powerlines`,supportsStaticESM:!0},cwd:e.config.projectRoot,babelrc:!1,extensions:[`.js`,`.jsx`,`.ts`,`.tsx`],babelHelpers:`bundled`,skipPreflightCheck:!0,exclude:/node_modules/})),(0,y.default)({moduleDirectories:[`node_modules`],preferBuiltins:!0}),E].filter(Boolean)},e.config.build.variant===`rollup`?e.config.build.override:{},e.config.build.variant===`vite`?e.config.build.override.build?.rollupOptions:{},e.config.build.variant===`rollup`?(0,l.omit)(e.config.build,[`override`,`variant`]):{},e.config.build.variant===`vite`?e.config.build.build?.rollupOptions:{},{cache:e.config.skipCache?!1:(0,u.joinPaths)(e.cachePath,`rollup`),logLevel:e.config.logLevel,output:[{dir:e.config.output.buildPath,format:`es`,entryFileNames:`[name].js`,preserveModules:!0,sourcemap:e.config.mode===`development`},{dir:e.config.output.buildPath,format:`cjs`,entryFileNames:`[name].cjs`,preserveModules:!0,sourcemap:e.config.mode===`development`}]})}const O={dts:!0,clean:!1,includeSrc:!1,treeShaking:!0,splitting:!0,stub:!1,watchOptions:{},outputPath:`dist`,generatePackageJson:!0,banner:` `,rollup:{dts:{},emitCJS:!0,replace:{},resolve:{},json:{},esbuild:{target:`es2020`},commonjs:{},alias:{}}},k=e=>async(t,{options:n})=>{if(!/\.(?:c|m)?[jt]sx?$/.test(t.path)||/\.d\.[cm]?ts$/.test(t.path))return;let r=[],i=await t.getContents();if(n.declaration&&!t.srcPath?.match(/\.d\.[cm]?ts$/)){let e=`.d.${t.srcPath?.match(/(?<=\.)(?:c|m)(?=[jt]s$)/)?.[0]||``}ts`;r.push({contents:i,srcPath:t.srcPath,path:t.path,extension:e,declaration:!0})}let a=i,o=await e.$$internal.callHook(`transform`,{sequential:!0,order:`pre`},a,t.path);o&&(a=o),o=await e.$$internal.callHook(`transform`,{sequential:!0,order:`normal`},T(a),t.path),o&&(a=o),o=await e.$$internal.callHook(`transform`,{sequential:!0,order:`post`},T(a),t.path),o&&(a=o),[`.ts`,`.mts`,`.cts`].includes(t.extension)?i=await(0,p.transform)(T(a),{...Object.fromEntries(Object.entries(n.esbuild??{}).filter(([e])=>e!==`absPaths`)),loader:`ts`}).then(e=>e.code):[`.tsx`,`.jsx`].includes(t.extension)&&(i=await(0,p.transform)(T(a),{loader:t.extension===`.tsx`?`tsx`:`jsx`,...Object.fromEntries(Object.entries(n.esbuild??{}).filter(([e])=>e!==`absPaths`))}).then(e=>e.code));let s=n.format===`cjs`;s&&(i=e.resolver.transform({source:i,retainLines:!1}).replace(/^exports.default = /gm,`module.exports = `).replace(/^var _default = exports.default = /gm,`module.exports = `).replace(`module.exports = void 0;`,``));let c=s?`.js`:`.mjs`;return n.ext&&(c=n.ext.startsWith(`.`)?n.ext:`.${n.ext}`),r.push({contents:i,path:t.path,extension:c}),r};function A(e){return(0,f.default)({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{})},e.config.build.variant===`unbuild`?e.config.build.override:{},e.config.build.variant===`unbuild`?(0,l.omit)(e.config.build,[`override`,`variant`]):{},{projectName:e.config.name,name:e.config.name,orgName:(0,d.isObject)(e.workspaceConfig.organization)?e.workspaceConfig.organization.name:e.workspaceConfig.organization,sourceRoot:e.config.sourceRoot,projectRoot:e.config.projectRoot,outputPath:e.config.output.buildPath||`dist`,platform:e.config.build.platform,external:e.builtins.reduce((e,t)=>(e.includes(t)||e.push(t),e),e.config.build.external??[]),loaders:[k(e)],jiti:{interopDefault:!0,fsCache:(0,u.joinPaths)(e.envPaths.cache,`jiti`),moduleCache:!0},rollup:D(e),debug:e.config.mode===`development`,minify:e.config.mode!==`development`,sourcemap:e.config.mode===`development`},O)}const j=(e={})=>({name:`unbuild`,config(){return{output:{format:[`esm`]},build:{...O,...e,variant:`unbuild`}}},async build(){await(0,c.build)(A(this))}});var M=j;exports.default=M,exports.plugin=j;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import '@stryke/types/base';
|
|
6
|
-
import '@stryke/types/package-json';
|
|
7
|
-
import 'jiti';
|
|
8
|
-
import 'magic-string';
|
|
9
|
-
import 'semver';
|
|
10
|
-
import 'ts-morph';
|
|
11
|
-
import 'unplugin';
|
|
12
|
-
import '@storm-software/build-tools/types';
|
|
13
|
-
import '@storm-software/config-tools/types';
|
|
14
|
-
import '@storm-software/config/types';
|
|
15
|
-
import '@stryke/types/configuration';
|
|
16
|
-
import '@stryke/types/file';
|
|
17
|
-
import 'vite';
|
|
18
|
-
import '@stryke/fs/resolve';
|
|
19
|
-
import '@stryke/types/array';
|
|
20
|
-
import '@stryke/types/tsconfig';
|
|
21
|
-
import 'typescript';
|
|
1
|
+
import { a as __ΩUnbuildPluginOptions, i as __ΩUnbuildPluginContext, n as UnbuildPluginOptions, o as __ΩUnbuildPluginResolvedConfig, r as UnbuildPluginResolvedConfig, s as Plugin, t as UnbuildPluginContext } from "./plugin-CgpHQ6ZD.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
22
5
|
|
|
23
6
|
/**
|
|
24
7
|
* A Powerlines plugin to build projects using Unbuild.
|
|
25
8
|
*/
|
|
26
9
|
declare const plugin: <TContext extends UnbuildPluginContext = UnbuildPluginContext>(options?: UnbuildPluginOptions) => Plugin<TContext>;
|
|
27
|
-
|
|
28
|
-
export { UnbuildPluginContext, UnbuildPluginOptions, plugin as default, plugin };
|
|
10
|
+
//#endregion
|
|
11
|
+
export { UnbuildPluginContext, UnbuildPluginOptions, UnbuildPluginResolvedConfig, __ΩUnbuildPluginContext, __ΩUnbuildPluginOptions, __ΩUnbuildPluginResolvedConfig, plugin as default, plugin };
|
|
12
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAgCA;;AAC0C,cAD7B,MAC6B,EAAA,CAAA,iBAAvB,oBAAuB,GAAA,oBAAA,CAAA,CAAA,OAAA,CAAA,EAE/B,oBAF+B,EAAA,GAGvC,MAHuC,CAGhC,QAHgC,CAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a as __ΩUnbuildPluginOptions, i as __ΩUnbuildPluginContext, n as UnbuildPluginOptions, o as __ΩUnbuildPluginResolvedConfig, r as UnbuildPluginResolvedConfig, s as Plugin, t as UnbuildPluginContext } from "./plugin-e6LPFTic.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Powerlines plugin to build projects using Unbuild.
|
|
8
|
+
*/
|
|
9
|
+
declare const plugin: <TContext extends UnbuildPluginContext = UnbuildPluginContext>(options?: UnbuildPluginOptions) => Plugin<TContext>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { UnbuildPluginContext, UnbuildPluginOptions, UnbuildPluginResolvedConfig, __ΩUnbuildPluginContext, __ΩUnbuildPluginOptions, __ΩUnbuildPluginResolvedConfig, plugin as default, plugin };
|
|
12
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAgCA;;AAC0C,cAD7B,MAC6B,EAAA,CAAA,iBAAvB,oBAAuB,GAAA,oBAAA,CAAA,CAAA,OAAA,CAAA,EAE/B,oBAF+B,EAAA,GAGvC,MAHuC,CAGhC,QAHgC,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";import{build as e}from"@storm-software/unbuild";import{omit as t}from"@stryke/helpers/omit";import{joinPaths as n}from"@stryke/path/join-paths";import{isObject as r}from"@stryke/type-checks/is-object";import i from"defu";import{transform as a}from"esbuild";import"@stryke/fs/read-file";import{isSetObject as o}from"@stryke/type-checks/is-set-object";import{isString as s}from"@stryke/type-checks/is-string";import"magic-string";import c from"@rollup/plugin-alias";import{getBabelInputPlugin as l}from"@rollup/plugin-babel";import u from"@rollup/plugin-inject";import d from"@rollup/plugin-node-resolve";import f from"@rollup/plugin-replace";import{toArray as p}from"@stryke/convert/to-array";import{isFunction as m}from"@stryke/type-checks/is-function";import{globSync as h}from"node:fs";import g from"rollup-plugin-typescript2";function _(e){return e?s(e)?e:o(e)&&`code`in e?e.code:e.toString():``}const v={name:`powerlines:dts-bundle`,async generateBundle(e,t){for(let[,e]of Object.entries(t)){if(e.type===`asset`||!e.isEntry||e.facadeModuleId==null)continue;let t=e.fileName.replace(/(?:\.cjs|\.mjs|\.esm\.js|\.cjs\.js|\.mjs\.js|\.js)$/,`.d.ts`),n=JSON.stringify(`./${e.facadeModuleId.replace(/\.[cm]?[jt]sx?$/,``)}`);this.emitFile({type:`asset`,fileName:t,source:e.exports.includes(`default`)?`export * from ${n};\nexport { default } from ${n};\n`:`export * from ${n};\n`})}}};function y(e){return i({input:h(p(e.config.entry).map(e=>s(e)?e:e.file)).flat(),external:(t,n,r)=>{let i=e.config.build.variant===`rollup`&&e.config.build.override.external?m(e.config.build.override.external)?e.config.build.override.external:t=>p(e.config.build.override.external).includes(t):e.config.build.variant===`vite`&&e.config.build.override.build?.rollupOptions?.external?m(e.config.build.override.build?.rollupOptions?.external)?e.config.build.override.build?.rollupOptions?.external:t=>p(e.config.build?.build?.rollupOptions?.external).includes(t):e.config.build.variant===`rollup`&&e.config.build.external?m(e.config.build.external)?e.config.build.external:t=>p(e.config.build.external).includes(t):e.config.build.variant===`vite`&&e.config.build.build?.rollupOptions?.external?m(e.config.build.build?.rollupOptions?.external)?e.config.build.build?.rollupOptions?.external:t=>p(e.config.build?.build?.rollupOptions?.external).includes(t):void 0;return m(i)&&i(t,n,r)||e.config.build.external&&p(e.config.build.external).includes(t)?!0:e.config.build.noExternal&&p(e.config.build.noExternal).includes(t)?!1:e.builtins.includes(t)?e.config.projectType!==`application`:!e.config.build.skipNodeModulesBundle},plugins:[g({check:!1,tsconfig:e.tsconfig.tsconfigFilePath}),e.config.build.define&&Object.keys(e.config.build.define).length>0&&f({sourceMap:e.config.mode===`development`,preventAssignment:!0,...e.config.build.define??{}}),e.config.build.inject&&Object.keys(e.config.build.inject).length>0&&u({sourceMap:e.config.mode===`development`,...e.config.build.inject}),c({entries:e.builtins.reduce((t,n)=>{if(!t.find(e=>e.find===n)){let r=e.fs.ids[n];r&&t.push({find:n,replacement:r})}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias:Object.entries(e.config.build.alias).reduce((e,[t,n])=>(e.find(e=>e.find===t)||e.push({find:t,replacement:n}),e),[]):[])}),l(i(e.config.transform.babel,{caller:{name:`powerlines`,supportsStaticESM:!0},cwd:e.config.projectRoot,babelrc:!1,extensions:[`.js`,`.jsx`,`.ts`,`.tsx`],babelHelpers:`bundled`,skipPreflightCheck:!0,exclude:/node_modules/})),d({moduleDirectories:[`node_modules`],preferBuiltins:!0}),v].filter(Boolean)},e.config.build.variant===`rollup`?e.config.build.override:{},e.config.build.variant===`vite`?e.config.build.override.build?.rollupOptions:{},e.config.build.variant===`rollup`?t(e.config.build,[`override`,`variant`]):{},e.config.build.variant===`vite`?e.config.build.build?.rollupOptions:{},{cache:e.config.skipCache?!1:n(e.cachePath,`rollup`),logLevel:e.config.logLevel,output:[{dir:e.config.output.buildPath,format:`es`,entryFileNames:`[name].js`,preserveModules:!0,sourcemap:e.config.mode===`development`},{dir:e.config.output.buildPath,format:`cjs`,entryFileNames:`[name].cjs`,preserveModules:!0,sourcemap:e.config.mode===`development`}]})}const b={dts:!0,clean:!1,includeSrc:!1,treeShaking:!0,splitting:!0,stub:!1,watchOptions:{},outputPath:`dist`,generatePackageJson:!0,banner:` `,rollup:{dts:{},emitCJS:!0,replace:{},resolve:{},json:{},esbuild:{target:`es2020`},commonjs:{},alias:{}}},x=e=>async(t,{options:n})=>{if(!/\.(?:c|m)?[jt]sx?$/.test(t.path)||/\.d\.[cm]?ts$/.test(t.path))return;let r=[],i=await t.getContents();if(n.declaration&&!t.srcPath?.match(/\.d\.[cm]?ts$/)){let e=`.d.${t.srcPath?.match(/(?<=\.)(?:c|m)(?=[jt]s$)/)?.[0]||``}ts`;r.push({contents:i,srcPath:t.srcPath,path:t.path,extension:e,declaration:!0})}let o=i,s=await e.$$internal.callHook(`transform`,{sequential:!0,order:`pre`},o,t.path);s&&(o=s),s=await e.$$internal.callHook(`transform`,{sequential:!0,order:`normal`},_(o),t.path),s&&(o=s),s=await e.$$internal.callHook(`transform`,{sequential:!0,order:`post`},_(o),t.path),s&&(o=s),[`.ts`,`.mts`,`.cts`].includes(t.extension)?i=await a(_(o),{...Object.fromEntries(Object.entries(n.esbuild??{}).filter(([e])=>e!==`absPaths`)),loader:`ts`}).then(e=>e.code):[`.tsx`,`.jsx`].includes(t.extension)&&(i=await a(_(o),{loader:t.extension===`.tsx`?`tsx`:`jsx`,...Object.fromEntries(Object.entries(n.esbuild??{}).filter(([e])=>e!==`absPaths`))}).then(e=>e.code));let c=n.format===`cjs`;c&&(i=e.resolver.transform({source:i,retainLines:!1}).replace(/^exports.default = /gm,`module.exports = `).replace(/^var _default = exports.default = /gm,`module.exports = `).replace(`module.exports = void 0;`,``));let l=c?`.js`:`.mjs`;return n.ext&&(l=n.ext.startsWith(`.`)?n.ext:`.${n.ext}`),r.push({contents:i,path:t.path,extension:l}),r};function S(e){return i({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{})},e.config.build.variant===`unbuild`?e.config.build.override:{},e.config.build.variant===`unbuild`?t(e.config.build,[`override`,`variant`]):{},{projectName:e.config.name,name:e.config.name,orgName:r(e.workspaceConfig.organization)?e.workspaceConfig.organization.name:e.workspaceConfig.organization,sourceRoot:e.config.sourceRoot,projectRoot:e.config.projectRoot,outputPath:e.config.output.buildPath||`dist`,platform:e.config.build.platform,external:e.builtins.reduce((e,t)=>(e.includes(t)||e.push(t),e),e.config.build.external??[]),loaders:[x(e)],jiti:{interopDefault:!0,fsCache:n(e.envPaths.cache,`jiti`),moduleCache:!0},rollup:y(e),debug:e.config.mode===`development`,minify:e.config.mode!==`development`,sourcemap:e.config.mode===`development`},b)}const C=(t={})=>({name:`unbuild`,config(){return{output:{format:[`esm`]},build:{...b,...t,variant:`unbuild`}}},async build(){await e(S(this))}});var w=C;export{w as default,C as plugin};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["dtsBundlePlugin: Plugin","output: LoaderResult","extension","transformed: TransformResult | string","alias"],"sources":["../../powerlines/src/lib/utilities/source-file.ts","../../powerlines/src/lib/build/rollup.ts","../../powerlines/src/lib/build/unbuild.ts","../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 { readFileIfExistingSync } from \"@stryke/fs/read-file\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport MagicString from \"magic-string\";\nimport { TransformResult } from \"unplugin\";\nimport { SourceFile } from \"../../types/context\";\n\n/**\n * Get the string from the source.\n *\n * @param code - The source string or magic string.\n * @returns The source string.\n */\nexport function getString(\n code: string | MagicString | TransformResult\n): string {\n if (!code) {\n return \"\";\n }\n\n if (isString(code)) {\n return code;\n }\n\n if (isSetObject(code) && \"code\" in code) {\n return code.code;\n }\n\n return code.toString();\n}\n\n/**\n * Get the magic string.\n *\n * @param code - The source string or magic string.\n * @returns The magic string.\n */\nexport function getMagicString(code: string | MagicString): MagicString {\n if (isString(code)) {\n return new MagicString(code);\n }\n\n return code;\n}\n\n/**\n * Get the source file.\n *\n * @param code - The source code.\n * @param id - The name of the file.\n * @returns The source file.\n */\nexport function getSourceFile(\n code: string | MagicString,\n id: string\n): SourceFile {\n const content = code ?? readFileIfExistingSync(id);\n\n return {\n id,\n code: getMagicString(content),\n env: []\n };\n}\n","/* -------------------------------------------------------------------\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 alias from \"@rollup/plugin-alias\";\nimport {\n getBabelInputPlugin,\n RollupBabelInputPluginOptions\n} from \"@rollup/plugin-babel\";\nimport inject from \"@rollup/plugin-inject\";\nimport resolve from \"@rollup/plugin-node-resolve\";\nimport replace from \"@rollup/plugin-replace\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport defu from \"defu\";\nimport { globSync } from \"node:fs\";\nimport { Plugin } from \"rollup\";\nimport typescriptPlugin from \"rollup-plugin-typescript2\";\nimport {\n RollupResolvedBuildConfig,\n ViteBuildConfig,\n ViteResolvedBuildConfig\n} from \"../../types/build\";\nimport { Context } from \"../../types/context\";\n\n/**\n * A Rollup plugin to bundle TypeScript declaration files (.d.ts) alongside the JavaScript output files.\n *\n * @remarks\n * This plugin generates .d.ts files for each entry point in the bundle, ensuring that type definitions are available for consumers of the library.\n */\nexport const dtsBundlePlugin: Plugin = {\n name: \"powerlines:dts-bundle\",\n async generateBundle(_opts, bundle) {\n for (const [, file] of Object.entries(bundle)) {\n if (\n file.type === \"asset\" ||\n !file.isEntry ||\n file.facadeModuleId == null\n ) {\n continue;\n }\n\n // Replace various JavaScript file extensions (e.g., .js, .cjs, .mjs, .cjs.js, .mjs.js) with .d.ts for generating type definition file names.\n const dtsFileName = file.fileName.replace(\n /(?:\\.cjs|\\.mjs|\\.esm\\.js|\\.cjs\\.js|\\.mjs\\.js|\\.js)$/,\n \".d.ts\"\n );\n\n const relativeSourceDtsName = JSON.stringify(\n `./${file.facadeModuleId.replace(/\\.[cm]?[jt]sx?$/, \"\")}`\n );\n\n this.emitFile({\n type: \"asset\",\n fileName: dtsFileName,\n source: file.exports.includes(\"default\")\n ? `export * from ${relativeSourceDtsName};\\nexport { default } from ${relativeSourceDtsName};\\n`\n : `export * from ${relativeSourceDtsName};\\n`\n });\n }\n }\n};\n\n/**\n * Resolves the options for [rollup](https://rollupjs.org).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function extractRollupConfig(\n context: Context\n): RollupResolvedBuildConfig {\n const result = defu(\n {\n input: globSync(\n toArray(context.config.entry).map(entry =>\n isString(entry) ? entry : entry.file\n )\n ).flat(),\n external: (\n source: string,\n importer: string | undefined,\n isResolved: boolean\n ) => {\n const externalFn =\n context.config.build.variant === \"rollup\" &&\n context.config.build.override.external\n ? isFunction(context.config.build.override.external)\n ? context.config.build.override.external\n : (id: string) =>\n toArray(\n (\n context.config.build\n .override as Partial<RollupResolvedBuildConfig>\n ).external\n ).includes(id)\n : context.config.build.variant === \"vite\" &&\n (context.config.build.override as ViteResolvedBuildConfig).build\n ?.rollupOptions?.external\n ? isFunction(\n (context.config.build.override as ViteResolvedBuildConfig)\n .build?.rollupOptions?.external\n )\n ? (context.config.build.override as ViteResolvedBuildConfig)\n .build?.rollupOptions?.external\n : (id: string) =>\n toArray(\n (context.config.build as ViteResolvedBuildConfig)?.build\n ?.rollupOptions?.external\n ).includes(id)\n : context.config.build.variant === \"rollup\" &&\n context.config.build.external\n ? isFunction(context.config.build.external)\n ? context.config.build.external\n : (id: string) =>\n toArray(\n (context.config.build as RollupResolvedBuildConfig)\n .external\n ).includes(id)\n : context.config.build.variant === \"vite\" &&\n (context.config.build as ViteBuildConfig).build\n ?.rollupOptions?.external\n ? isFunction(\n (context.config.build as ViteBuildConfig).build\n ?.rollupOptions?.external\n )\n ? (context.config.build as ViteBuildConfig).build\n ?.rollupOptions?.external\n : (id: string) =>\n toArray(\n (context.config.build as ViteBuildConfig)?.build\n ?.rollupOptions?.external\n ).includes(id)\n : undefined;\n if (\n isFunction(externalFn) &&\n externalFn(source, importer, isResolved)\n ) {\n return true;\n }\n\n if (\n context.config.build.external &&\n toArray(context.config.build.external).includes(source)\n ) {\n return true;\n }\n\n if (\n context.config.build.noExternal &&\n toArray(context.config.build.noExternal).includes(source)\n ) {\n return false;\n }\n\n if (context.builtins.includes(source)) {\n return context.config.projectType !== \"application\";\n }\n\n return !context.config.build.skipNodeModulesBundle;\n },\n plugins: [\n typescriptPlugin({\n check: false,\n tsconfig: context.tsconfig.tsconfigFilePath\n }),\n context.config.build.define &&\n Object.keys(context.config.build.define).length > 0 &&\n replace({\n sourceMap: context.config.mode === \"development\",\n preventAssignment: true,\n ...(context.config.build.define ?? {})\n }),\n context.config.build.inject &&\n Object.keys(context.config.build.inject).length > 0 &&\n inject({\n sourceMap: context.config.mode === \"development\",\n ...context.config.build.inject\n }),\n alias({\n entries: context.builtins.reduce(\n (ret, id) => {\n if (!ret.find(e => e.find === id)) {\n const path = context.fs.ids[id];\n if (path) {\n ret.push({ find: id, replacement: path });\n }\n }\n\n return ret;\n },\n (context.config.build.alias\n ? Array.isArray(context.config.build.alias)\n ? context.config.build.alias\n : Object.entries(context.config.build.alias).reduce(\n (ret, [id, path]) => {\n if (!ret.find(e => e.find === id)) {\n ret.push({ find: id, replacement: path });\n }\n\n return ret;\n },\n [] as { find: string; replacement: string }[]\n )\n : []) as { find: string; replacement: string }[]\n )\n }),\n getBabelInputPlugin(\n defu(context.config.transform.babel, {\n caller: {\n name: \"powerlines\",\n supportsStaticESM: true\n },\n cwd: context.config.projectRoot,\n babelrc: false,\n extensions: [\".js\", \".jsx\", \".ts\", \".tsx\"],\n babelHelpers: \"bundled\",\n skipPreflightCheck: true,\n exclude: /node_modules/\n }) as RollupBabelInputPluginOptions\n ),\n resolve({\n moduleDirectories: [\"node_modules\"],\n preferBuiltins: true\n }),\n dtsBundlePlugin\n ].filter(Boolean) as Plugin[]\n },\n context.config.build.variant === \"rollup\"\n ? context.config.build.override\n : {},\n context.config.build.variant === \"vite\"\n ? (context.config.build.override as ViteBuildConfig).build?.rollupOptions\n : {},\n context.config.build.variant === \"rollup\"\n ? omit(context.config.build, [\"override\", \"variant\"])\n : {},\n context.config.build.variant === \"vite\"\n ? (context.config.build as ViteBuildConfig).build?.rollupOptions\n : {},\n {\n cache: !context.config.skipCache\n ? joinPaths(context.cachePath, \"rollup\")\n : false,\n logLevel: context.config.logLevel,\n output: [\n {\n dir: context.config.output.buildPath,\n format: \"es\",\n entryFileNames: \"[name].js\",\n preserveModules: true,\n sourcemap: context.config.mode === \"development\"\n },\n {\n dir: context.config.output.buildPath,\n format: \"cjs\",\n entryFileNames: \"[name].cjs\",\n preserveModules: true,\n sourcemap: context.config.mode === \"development\"\n }\n ]\n }\n ) as RollupResolvedBuildConfig;\n\n return result;\n}\n","/* -------------------------------------------------------------------\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 type { Loader, LoaderResult } from \"@storm-software/unbuild/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport defu from \"defu\";\nimport { transform } from \"esbuild\";\nimport { TransformResult } from \"unplugin\";\nimport {\n UnbuildBuildConfig,\n UnbuildResolvedBuildConfig\n} from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { UNSAFE_PluginContext } from \"../../types/internal\";\nimport { getString } from \"../utilities/source-file\";\nimport { extractRollupConfig } from \"./rollup\";\n\nexport const DEFAULT_UNBUILD_CONFIG = {\n dts: true,\n clean: false,\n includeSrc: false,\n treeShaking: true,\n splitting: true,\n stub: false,\n watchOptions: {},\n outputPath: \"dist\",\n generatePackageJson: true,\n banner: \" \",\n rollup: {\n dts: {},\n emitCJS: true,\n replace: {},\n resolve: {},\n json: {},\n esbuild: { target: \"es2020\" },\n commonjs: {},\n alias: {}\n }\n} as Partial<UnbuildBuildConfig>;\n\nexport const unbuildLoader = (context: UNSAFE_PluginContext): Loader => {\n return async (input, { options }) => {\n if (\n !/\\.(?:c|m)?[jt]sx?$/.test(input.path) ||\n /\\.d\\.[cm]?ts$/.test(input.path)\n ) {\n return;\n }\n\n const output: LoaderResult = [];\n\n let contents = await input.getContents();\n\n // declaration\n if (options.declaration && !input.srcPath?.match(/\\.d\\.[cm]?ts$/)) {\n const cm = input.srcPath?.match(/(?<=\\.)(?:c|m)(?=[jt]s$)/)?.[0] || \"\";\n const extension = `.d.${cm}ts`;\n output.push({\n contents,\n srcPath: input.srcPath,\n path: input.path,\n extension,\n declaration: true\n });\n }\n\n let transformed: TransformResult | string = contents;\n\n let result = await context.$$internal.callHook(\n \"transform\",\n {\n sequential: true,\n order: \"pre\"\n },\n transformed,\n input.path\n );\n if (result) {\n transformed = result;\n }\n\n result = await context.$$internal.callHook(\n \"transform\",\n {\n sequential: true,\n order: \"normal\"\n },\n getString(transformed),\n input.path\n );\n if (result) {\n transformed = result;\n }\n\n result = await context.$$internal.callHook(\n \"transform\",\n {\n sequential: true,\n order: \"post\"\n },\n getString(transformed),\n input.path\n );\n if (result) {\n transformed = result;\n }\n\n // typescript => js\n if ([\".ts\", \".mts\", \".cts\"].includes(input.extension)) {\n contents = await transform(getString(transformed), {\n ...Object.fromEntries(\n Object.entries(options.esbuild ?? {}).filter(\n ([key]) => key !== \"absPaths\"\n )\n ),\n loader: \"ts\"\n }).then(r => r.code);\n } else if ([\".tsx\", \".jsx\"].includes(input.extension)) {\n contents = await transform(getString(transformed), {\n loader: input.extension === \".tsx\" ? \"tsx\" : \"jsx\",\n ...Object.fromEntries(\n Object.entries(options.esbuild ?? {}).filter(\n ([key]) => key !== \"absPaths\"\n )\n )\n }).then(r => r.code);\n }\n\n // esm => cjs\n const isCjs = options.format === \"cjs\";\n if (isCjs) {\n contents = context.resolver\n .transform({\n source: contents,\n retainLines: false\n })\n .replace(/^exports.default = /gm, \"module.exports = \")\n .replace(/^var _default = exports.default = /gm, \"module.exports = \")\n .replace(\"module.exports = void 0;\", \"\");\n }\n\n let extension = isCjs ? \".js\" : \".mjs\"; // TODO: Default to .cjs in next major version\n if (options.ext) {\n extension = options.ext.startsWith(\".\") ? options.ext : `.${options.ext}`;\n }\n\n output.push({\n contents,\n path: input.path,\n extension\n });\n\n return output;\n };\n};\n\n/**\n * Extracts the unbuild configuration from the context.\n *\n * @param context - The build context.\n * @returns The resolved unbuild configuration.\n */\nexport function extractUnbuildConfig(\n context: Context\n): UnbuildResolvedBuildConfig {\n return defu(\n {\n alias: context.builtins.reduce(\n (ret, id) => {\n if (!ret[id]) {\n const path = context.fs.ids[id];\n if (path) {\n ret[id] = path;\n }\n }\n\n return ret;\n },\n context.config.build.alias\n ? Array.isArray(context.config.build.alias)\n ? context.config.build.alias.reduce(\n (ret, alias) => {\n if (!ret[alias.find.toString()]) {\n ret[alias.find.toString()] = alias.replacement;\n }\n\n return ret;\n },\n {} as Record<string, string>\n )\n : context.config.build.alias\n : {}\n )\n },\n context.config.build.variant === \"unbuild\"\n ? context.config.build.override\n : {},\n context.config.build.variant === \"unbuild\"\n ? omit(context.config.build, [\"override\", \"variant\"])\n : {},\n {\n projectName: context.config.name,\n name: context.config.name,\n orgName: isObject(context.workspaceConfig.organization)\n ? context.workspaceConfig.organization.name\n : context.workspaceConfig.organization,\n sourceRoot: context.config.sourceRoot,\n projectRoot: context.config.projectRoot,\n outputPath: context.config.output.buildPath || \"dist\",\n platform: context.config.build.platform,\n external: context.builtins.reduce((ret, id) => {\n if (!ret.includes(id)) {\n ret.push(id);\n }\n\n return ret;\n }, context.config.build.external ?? []) as string[],\n loaders: [unbuildLoader(context as UNSAFE_PluginContext)],\n jiti: {\n interopDefault: true,\n fsCache: joinPaths(context.envPaths.cache, \"jiti\"),\n moduleCache: true\n },\n rollup: extractRollupConfig(context) as any,\n debug: context.config.mode === \"development\",\n minify: context.config.mode !== \"development\",\n sourcemap: context.config.mode === \"development\"\n },\n DEFAULT_UNBUILD_CONFIG\n );\n}\n","/* -------------------------------------------------------------------\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 { build, UnbuildOptions } from \"@storm-software/unbuild\";\nimport {\n DEFAULT_UNBUILD_CONFIG,\n extractUnbuildConfig\n} from \"powerlines/lib/build/unbuild\";\nimport { UnbuildUserConfig } from \"powerlines/types/config\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { UnbuildPluginContext, UnbuildPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to build projects using Unbuild.\n */\nexport const plugin = <\n TContext extends UnbuildPluginContext = UnbuildPluginContext\n>(\n options: UnbuildPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"unbuild\",\n config() {\n return {\n output: {\n format: [\"esm\"]\n },\n build: {\n ...DEFAULT_UNBUILD_CONFIG,\n ...options,\n variant: \"unbuild\"\n }\n } as Partial<UnbuildUserConfig>;\n },\n async build() {\n await build(extractUnbuildConfig(this) as UnbuildOptions);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"w3BA+BA,SAAgB,EACd,EACQ,CAaR,OAZK,EAID,EAAS,EAAK,CACT,EAGL,EAAY,EAAK,EAAI,SAAU,EAC1B,EAAK,KAGP,EAAK,UAAU,CAXb,GCaX,MAAaA,EAA0B,CACrC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