@visulima/packem 2.0.0-alpha.4 → 2.0.0-alpha.43
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/CHANGELOG.md +480 -1
- package/LICENSE.md +6393 -1445
- package/README.md +16 -12
- package/dist/builder/typedoc/index.d.ts +3 -26
- package/dist/builder/typedoc/index.js +160 -3
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +1379 -43
- package/dist/config/index.d.ts +48 -28
- package/dist/config/index.js +4 -1
- package/dist/config/preset/react.d.ts +59 -0
- package/dist/config/preset/react.js +43 -0
- package/dist/config/preset/solid.d.ts +101 -0
- package/dist/config/preset/solid.js +72 -0
- package/dist/config/preset/svelte.d.ts +71 -0
- package/dist/config/preset/svelte.js +44 -0
- package/dist/config/preset/vue.d.ts +53 -0
- package/dist/config/preset/vue.js +33 -0
- package/dist/index.d.ts +45 -32
- package/dist/index.js +30 -1
- package/dist/packem/node10-compatibility.d.ts +7 -0
- package/dist/packem_shared/create-or-update-key-storage-Dd7b8-t1.js +36 -0
- package/dist/packem_shared/default-79SPobLI.js +12 -0
- package/dist/packem_shared/default-DWBYeUSC.js +210 -0
- package/dist/packem_shared/default-DaU6CQEi.js +28 -0
- package/dist/packem_shared/default-DavaZMwC.js +32 -0
- package/dist/packem_shared/default-DeYZ934H.js +32 -0
- package/dist/packem_shared/default-tUOOZ8w7.js +42 -0
- package/dist/packem_shared/default-wScAfTaq.js +27 -0
- package/dist/packem_shared/index-CTIRxV2x.js +63 -0
- package/dist/packem_shared/index-DzTDn4ad.js +9521 -0
- package/dist/rollup/plugins/css/loaders/less.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/less.js +1 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.js +1 -1
- package/dist/rollup/plugins/css/loaders/postcss.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss.js +1 -1
- package/dist/rollup/plugins/css/loaders/sass.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/sass.js +1 -1
- package/dist/rollup/plugins/css/loaders/sourcemap.d.ts +1 -8
- package/dist/rollup/plugins/css/loaders/sourcemap.js +1 -1
- package/dist/rollup/plugins/css/loaders/stylus.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/stylus.js +1 -1
- package/dist/rollup/plugins/css/loaders/tailwindcss.d.ts +1 -0
- package/dist/rollup/plugins/css/loaders/tailwindcss.js +1 -0
- package/dist/rollup/plugins/css/minifiers/cssnano.d.ts +1 -1
- package/dist/rollup/plugins/css/minifiers/cssnano.js +1 -1
- package/dist/rollup/plugins/css/minifiers/lightningcss.d.ts +1 -1
- package/dist/rollup/plugins/css/minifiers/lightningcss.js +1 -1
- package/dist/rollup/plugins/esbuild/index.d.ts +2 -24
- package/dist/rollup/plugins/esbuild/index.js +1 -1
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +1 -25
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.js +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.d.ts +2 -20
- package/dist/rollup/plugins/oxc/oxc-transformer.js +1 -1
- package/dist/rollup/plugins/resolve-externals-plugin.d.ts +60 -0
- package/dist/rollup/plugins/sucrase/index.d.ts +2 -19
- package/dist/rollup/plugins/sucrase/index.js +1 -1
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +1 -20
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.js +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.d.ts +2 -26
- package/dist/rollup/plugins/swc/swc-plugin.js +1 -1
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +1 -24
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.js +1 -1
- package/dist/types.d.ts +329 -0
- package/files.d.ts +37 -0
- package/package.json +190 -29
- package/dist/packem_shared/browserslistToEsbuild-C0IWmbNe-C6xPL1oW.js +0 -1
- package/dist/packem_shared/create-or-update-key-storage-GwAIWW7R.js +0 -3
- package/dist/packem_shared/default-B6X7-Lx3.js +0 -1
- package/dist/packem_shared/default-B_dUKZ_J.js +0 -1
- package/dist/packem_shared/default-C3sdXf4G.js +0 -1
- package/dist/packem_shared/default-DR5Fia_R.js +0 -1
- package/dist/packem_shared/default-DqRcOUe1.js +0 -1
- package/dist/packem_shared/esbuildPlugin-BAwyhG6L-yty60jMl.js +0 -3
- package/dist/packem_shared/index-CUp9WuCG.js +0 -1
- package/dist/packem_shared/index-DySckW0r.d.ts +0 -5227
- package/dist/packem_shared/index-VKZ7e6tb.js +0 -138
- package/dist/packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js +0 -1
- package/dist/packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js +0 -1
- package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js +0 -3
- package/dist/packem_shared/oxcResolvePlugin-BJpi-eSG-BsYx9cDO.js +0 -1
- package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Cpfv95eA.js +0 -4
- package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.js +0 -6
- package/dist/packem_shared/swcPlugin-Boip4lWG-CwJ-HVJc.js +0 -1
- package/dist/packem_shared/types-CaBbG-vU.d.ts +0 -163
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var l=(e,r)=>m(e,"name",{value:r,configurable:!0});import{transpileDeclaration as f,formatDiagnostics as y,sys as n}from"typescript";var v=Object.defineProperty,d=l((e,r)=>v(e,"name",{value:r,configurable:!0}),"p"),N=Object.defineProperty,C=d((e,r)=>N(e,"name",{value:r,configurable:!0}),"l"),D=Object.defineProperty,t=C((e,r)=>D(e,"name",{value:r,configurable:!0}),"s");const b=t(e=>{const r=e.split(`
|
|
2
|
-
`);return r.at(-1)?.startsWith("//# sourceMappingURL=")?r.slice(0,-1).join(`
|
|
3
|
-
`):e},"stripMapUrl"),M=t(async(e,r,u,o)=>{const s={declarationMap:u,...o?.compilerOptions};let{diagnostics:c,outputText:i,sourceMapText:a}=f(r,{fileName:e,reportDiagnostics:!0,...o,compilerOptions:s});s.declarationMap&&(i=b(i));const g=c?.length?[y(c,{getCanonicalFileName:t(p=>n.useCaseSensitiveFileNames?p:p.toLowerCase(),"getCanonicalFileName"),getCurrentDirectory:t(()=>n.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:t(()=>n.newLine,"getNewLine")})]:[];return a&&(a=JSON.parse(a).mappings),{errors:g,map:a,sourceText:i}},"isolatedDeclarationsTypescriptTransformer");export{M as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var R=Object.defineProperty;var y=(r,e)=>R(r,"name",{value:e,configurable:!0});import{createFilter as S}from"@rollup/pluginutils";import{findPackageJson as j}from"@visulima/package/package-json";import{dirname as n}from"@visulima/path";import{ResolverFactory as k}from"oxc-resolver";var O=Object.defineProperty,M=y((r,e)=>O(r,"name",{value:e,configurable:!0}),"y"),A=Object.defineProperty,J=M((r,e)=>A(r,"name",{value:e,configurable:!0}),"g"),z=Object.defineProperty,u=J((r,e)=>z(r,"name",{value:e,configurable:!0}),"a");let x;const I=new Map,G=u((r,e,h,m)=>{const{ignoreSideEffectsForRoot:E,...a}=r;let c=x;return c||(c=x=new k({...a,roots:[...a.roots??[],e],tsconfig:m?{configFile:m,references:"auto"}:void 0})),{name:"oxc-resolve",resolveId:{async handler(v,l,{isEntry:w}){const p=w||!l?n(v):n(l),{error:g,path:o}=await c.async(p,v);if(g){h.debug(g,{context:[{basedir:e,extensions:a.extensions,id:o}]});return}let f=u(s=>!1,"hasModuleSideEffects");try{const{packageJson:s,path:P}=await j(n(o),{cache:I}),b=n(P);if(!E||e!==b){const i=s.sideEffects;if(typeof i=="boolean")f=u(()=>i,"hasModuleSideEffects");else if(Array.isArray(i)){const F=i.map(d=>d.includes("/")?d:`**/${d}`);f=S(F,void 0,{resolve:b})}}}catch(s){console.debug(s.message,{context:[{basedir:p,caller:"Resolver",error:s,extensions:a.extensions,id:o}]})}const t=await this.resolve(o,l,{skipSelf:!0});if(t)return t.external?!1:t.id!==o?t:{id:o,meta:t.meta,moduleSideEffects:f(o)}},order:"post"}}},"oxcResolvePlugin");export{G as z};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(r,e)=>i(r,"name",{value:e,configurable:!0});import{createFilter as s}from"@rollup/pluginutils";import{f as l}from"./index-CUp9WuCG.js";import{transform as p}from"oxc-transform";var d=Object.defineProperty,v=a((r,e)=>d(r,"name",{value:e,configurable:!0}),"t"),g=Object.defineProperty,b=v((r,e)=>g(r,"name",{value:e,configurable:!0}),"a"),x=Object.defineProperty,j=b((r,e)=>x(r,"name",{value:e,configurable:!0}),"t");const y=j(({exclude:r,include:e,...n})=>{const c=s(e,r??l);return{name:"packem:oxc-transform",async transform(m,o){if(!c(o))return;const{code:u,errors:t,map:f}=p(o,m,{...n,sourcemap:!0});return t.length>0?this.error({message:[`
|
|
2
|
-
transform errors:`,...t].join(`
|
|
3
|
-
|
|
4
|
-
`),pluginCode:"ERR_TRANSFORM"}):{code:u,map:f}}}},"oxcTransformPlugin");y.NAME="oxc";export{y as n};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var M=Object.defineProperty;var u=(t,e)=>M(t,"name",{value:e,configurable:!0});import{parse as U}from"@babel/parser";import q from"magic-string";import{findStaticImports as F}from"mlly";import{isAbsolute as L,join as N,dirname as Z,resolve as R}from"@visulima/path";import{isRelative as z}from"@visulima/path/utils";var G=Object.defineProperty,m=u((t,e)=>G(t,"name",{value:e,configurable:!0}),"u$1"),H=Object.defineProperty,h=m((t,e)=>H(t,"name",{value:e,configurable:!0}),"n"),J=Object.defineProperty,_=h((t,e)=>J(t,"name",{value:e,configurable:!0}),"i");let B=class{static{u(this,"y")}static{m(this,"_")}static{h(this,"WalkerBase")}static{_(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:_(()=>this.should_skip=!0,"skip"),remove:_(()=>this.should_remove=!0,"remove"),replace:_(e=>this.replacement=e,"replace")}}replace(e,s,r,n){e&&s&&(r!=null?e[s][r]=n:e[s]=n)}remove(e,s,r){e&&s&&(r!=null?e[s].splice(r,1):delete e[s])}};var K=Object.defineProperty,g=h((t,e)=>K(t,"name",{value:e,configurable:!0}),"c$1");let Q=class extends B{static{u(this,"A")}static{m(this,"x")}static{h(this,"SyncWalker")}static{g(this,"SyncWalker")}constructor(e,s){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:g(()=>this.should_skip=!0,"skip"),remove:g(()=>this.should_remove=!0,"remove"),replace:g(r=>this.replacement=r,"replace")},this.enter=e,this.leave=s}visit(e,s,r,n){if(e){if(this.enter){const i=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const a=this.should_skip,p=this.should_remove;if(this.should_skip=i,this.should_remove=o,this.replacement=l,a)return e;if(p)return null}let c;for(c in e){const i=e[c];if(i&&typeof i=="object")if(Array.isArray(i)){const o=i;for(let l=0;l<o.length;l+=1){const a=o[l];$(a)&&(this.visit(a,e,c,l)||l--)}}else $(i)&&this.visit(i,e,c,null)}if(this.leave){const i=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const l=this.should_remove;if(this.replacement=i,this.should_remove=o,l)return null}}return e}};function $(t){return t!==null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"}u($,"d$2");m($,"f");h($,"n");g($,"isNode");var V=Object.defineProperty,y=h((t,e)=>V(t,"name",{value:e,configurable:!0}),"c");let X=class extends B{static{u(this,"P")}static{m(this,"j")}static{h(this,"AsyncWalker")}static{y(this,"AsyncWalker")}constructor(e,s){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:y(()=>this.should_skip=!0,"skip"),remove:y(()=>this.should_remove=!0,"remove"),replace:y(r=>this.replacement=r,"replace")},this.enter=e,this.leave=s}async visit(e,s,r,n){if(e){if(this.enter){const i=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,await this.enter.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const a=this.should_skip,p=this.should_remove;if(this.should_skip=i,this.should_remove=o,this.replacement=l,a)return e;if(p)return null}let c;for(c in e){const i=e[c];if(i&&typeof i=="object")if(Array.isArray(i)){const o=i;for(let l=0;l<o.length;l+=1){const a=o[l];b(a)&&(await this.visit(a,e,c,l)||l--)}}else b(i)&&await this.visit(i,e,c,null)}if(this.leave){const i=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,await this.leave.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const l=this.should_remove;if(this.replacement=i,this.should_remove=o,l)return null}}return e}};function b(t){return t!==null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"}u(b,"f$2");m(b,"d");h(b,"a$1");y(b,"isNode");var Y=Object.defineProperty,C=h((t,e)=>Y(t,"name",{value:e,configurable:!0}),"a");function j(t,{enter:e,leave:s}){return new Q(e,s).visit(t,null)}u(j,"k$2");m(j,"A");h(j,"walk");C(j,"walk");async function P(t,{enter:e,leave:s}){return await new X(e,s).visit(t,null)}u(P,"w$3");m(P,"O");h(P,"asyncWalk");C(P,"asyncWalk");var ee=Object.defineProperty,A=u((t,e)=>ee(t,"name",{value:e,configurable:!0}),"l$1"),te=Object.defineProperty,W=A((t,e)=>te(t,"name",{value:e,configurable:!0}),"l"),se=Object.defineProperty,d=W((t,e)=>se(t,"name",{value:e,configurable:!0}),"r");const re=/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g,ie=/MIT License|MIT license|BSD license/,ne=/\n{2,}/g,oe=/\b(\w+)\$\d+\b/g,le=/[-/\\^$*+?.()|[\]{}]/g,ae=d(t=>t.replaceAll(le,String.raw`\$&`),"escapeRegex"),ce=d(t=>[...new Set(t)],"unique"),ue=d(t=>t.replaceAll(re,e=>ie.test(e)?"":e).replaceAll(ne,`
|
|
2
|
-
|
|
3
|
-
`),"cleanUnnecessaryComments"),I=new Map;function w(t,e,{identifierReplacements:s},r){const n=F(t);for(const i in s){const o=n.find(a=>a.specifier===i&&a.imports.includes("{"));if(!o){this.warn(`${e.fileName} does not import "${i}" for replacement`),process.exitCode=1;continue}const l=s[i];for(const a in l){if(!o.imports.includes(a))throw new Error(`${e.fileName} does not import "${a}" from "${i}" for replacement`);const p=l[a],v=ae(a);p.includes(".")&&(t=t.replace(new RegExp(`\\b\\w+\\b as ${v},?\\s?`),"")),t=t.replaceAll(new RegExp(`\\b${v}\\b`,"g"),p)}}const c=ce(Array.from(t.matchAll(oe),i=>i[0]));if(c.length>0){const i=c.map(l=>`
|
|
4
|
-
- ${l}`).join(""),o=e.fileName.replace(/\.[^/.]+$/,"");I.has(o)||r.warn({message:`${e.fileName} contains confusing identifier names${i}
|
|
5
|
-
|
|
6
|
-
To replace these, add them to the "rollup -> patchTypes -> identifierReplacements" option in your packem config.`,prefix:"plugin:patch-types"}),I.set(o,!0)}return t}u(w,"f$1");A(w,"g");W(w,"I");d(w,"replaceConfusingTypeNames");const pe=d((t,e)=>{if(e.leadingComments?.some(s=>s.type==="CommentBlock"&&s.value.includes("@internal"))){const s=t.original[e.end]===","?e.end+1:e.end;return t.remove(e.leadingComments[0].start,s),!0}return!1},"removeInternal");function O(t,e){if(t.includes("@internal")){const s=new q(t),r=U(t,{plugins:["typescript"],sourceType:"module"});if(j(r,{enter(n){pe(s,n)&&this.skip()}}),t=s.toString(),t.includes("@internal"))throw new Error(`${e.fileName} has unhandled @internal declarations`)}return t}u(O,"u");A(O,"h");W(O,"S");d(O,"stripInternalTypes");const He=d((t,e)=>({name:"packem:patch-types",renderChunk(s,r){return s=w.call(this,s,r,t,e),s=O.call(this,s,r),s=ue(s),s}}),"patchTypescriptTypes");var he=Object.defineProperty,fe=u((t,e)=>he(t,"name",{value:e,configurable:!0}),"d$1"),me=Object.defineProperty,de=fe((t,e)=>me(t,"name",{value:e,configurable:!0}),"d"),ve=Object.defineProperty,f=de((t,e)=>ve(t,"name",{value:e,configurable:!0}),"o");const ge=42,ye=f(t=>{let e=!1;for(let s=0;s<t.length;s++)if(t.codePointAt(s)===ge){if(e)return!1;e=!0}return!0},"hasZeroOrOneAsteriskCharacter"),$e=f(t=>{const e=t.indexOf("*");return e===-1?void 0:{prefix:t.slice(0,e),suffix:t.slice(e+1)}},"tryParsePattern"),be=f(({prefix:t,suffix:e},s)=>s.length>=t.length+e.length&&s.startsWith(t)&&s.endsWith(e),"isPatternMatch"),ke=f((t,e,s)=>{let r,n=-1;for(const c of t){const i=e(c);be(i,s)&&i.prefix.length>n&&(n=i.prefix.length,r=c)}return r},"findBestPatternMatch"),xe=f((t,e)=>{const s=[];for(const r of t){if(!ye(r))continue;const n=$e(r);if(n)s.push(n);else if(r===e)return r}return ke(s,r=>r,e)},"matchPatternOrExact"),_e=f((t,e)=>e.substring(t.prefix.length,e.length-t.suffix.length),"matchedText"),je=f(({prefix:t,suffix:e})=>`${t}*${e}`,"patternText"),we=f((t,e,s)=>{let r=Z(e.path);e.config.compilerOptions?.baseUrl&&(r=R(t,e.config.compilerOptions.baseUrl)),s?.debug({message:`Resolved baseUrl to ${r}`,prefix:"plugin:packem:resolve-tsconfig-paths"});const n=e.config.compilerOptions?.paths??{};return Object.keys(n).length===0&&s?.debug({message:"No paths found in tsconfig.json",prefix:"plugin:packem:resolve-tsconfig-paths"}),{paths:n,resolvedBaseUrl:r}},"getTsconfigPaths"),Je=f((t,e,s,r)=>{const{paths:n,resolvedBaseUrl:c}=we(t,e,s),i=Object.keys(n);return{name:"packem:resolve-tsconfig-paths",async resolveId(o,l,a){if(i.length===0)return;if(o.includes("\0")){s.debug({message:`Skipping resolution of ${o} as it is a virtual module`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}if(o.includes("node_modules")){s.debug({message:`Skipping request as it is inside node_modules ${o}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}if(!r.resolveAbsolutePath&&L(o)){s.debug({message:`Skipping request as it is an absolute path ${o}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}if(z(o)){s.debug({message:`Skipping request as it is a relative path ${o}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}const p=xe(i,o);if(!p){s.debug({message:`moduleName did not match any paths pattern ${o}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}const v=typeof p=="string"?void 0:_e(p,o),E=typeof p=="string"?p:je(p);for await(const T of n[E]){const k=v?T.replace("*",v):T;if(k.endsWith(".d.ts")||k.endsWith(".d.cts")||k.endsWith(".d.mts"))continue;const S=N(c,k);try{const x=await this.resolve(S,l,{skipSelf:!0,...a});if(x)return x}catch(x){s.debug({context:[x],message:`Failed to resolve ${S} from ${o}`,prefix:"plugin:packem:resolve-tsconfig-paths"})}}}}},"resolveTsconfigPathsPlugin");var Oe=Object.defineProperty,Pe=u((t,e)=>Oe(t,"name",{value:e,configurable:!0}),"f"),Ae=Object.defineProperty,We=Pe((t,e)=>Ae(t,"name",{value:e,configurable:!0}),"c"),Te=Object.defineProperty,D=We((t,e)=>Te(t,"name",{value:e,configurable:!0}),"u");const Se=D((t,e)=>{if(!e)return;const{config:s,path:r}=e;if(!s.compilerOptions)return;const{rootDirs:n}=s.compilerOptions;if(!n)return;const c=[];for(const i of n){if(i.startsWith("."))throw new Error(`Invalid rootDir value '.' in ${r}.`);if(i.startsWith(".."))throw new Error(`Invalid rootDir value '..' in ${r}.`);c.push(R(t,i))}return c},"getRootDirectories"),Ke=D((t,e,s)=>{const r=Se(t,s);return{name:"packem:resolve-tsconfig-root-dirs",async resolveId(n,c,i){if(!(r===void 0||r.length===0)&&n.startsWith("."))for(const o of r){const l=N(o,n),a=await this.resolve(l,c,{skipSelf:!0,...i});if(a)return e.debug({message:`Resolved ${n} to ${a.id} using rootDirs from tsconfig.json.`,prefix:"plugin:resolve-tsconfig-root-dirs"}),a.id}}}},"resolveTsconfigRootDirectories");var Ie=Object.defineProperty,Ne=u((t,e)=>Ie(t,"name",{value:e,configurable:!0}),"t"),Re=Object.defineProperty,Be=Ne((t,e)=>Re(t,"name",{value:e,configurable:!0}),"t"),Ce=Object.defineProperty,De=Be((t,e)=>Ce(t,"name",{value:e,configurable:!0}),"r");const Qe=De(()=>{const t=/\.(?:[mc]?js|jsx)$/;return{name:"packem:resolve-typescript-mjs-cjs",async resolveId(e,s,r){if(t.test(e)&&s)return await this.resolve(e.replace(/js(x?)$/,"ts$1"),s,r)}}},"resolveTypescriptMjsCts");export{He as B,Ke as D,Je as N,Qe as i,j as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var t=(e,r)=>m(e,"name",{value:r,configurable:!0});import{createFilter as u}from"@rollup/pluginutils";import{transform as l}from"@swc/core";import{f as s}from"./index-CUp9WuCG.js";var p=Object.defineProperty,v=t((e,r)=>p(e,"name",{value:r,configurable:!0}),"n"),d=Object.defineProperty,b=v((e,r)=>d(e,"name",{value:r,configurable:!0}),"t"),g=Object.defineProperty,w=b((e,r)=>g(e,"name",{value:r,configurable:!0}),"e");const y=w(({exclude:e,include:r,...n})=>{const c=u(r,e??s);return{name:"packem:swc",async transform(o,a){if(!c(a))return;const{code:f,map:i}=await l(o,{...n,configFile:!1,filename:a,swcrc:!1});return{code:f,map:i}}}},"swcPlugin");y.NAME="swc";export{y as t};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { B as BuildContext, E as Environment, R as Runtime, I as IsolatedDeclarationsTransformer, F as Format, P as PackemRollupOptions, T as TransformerFn, d as BuildHooks, g as InternalOXCTransformPluginConfig, a as TransformerName, M as Mode } from './index-DySckW0r.js';
|
|
2
|
-
import { StyleOptions } from '@visulima/rollup-css-plugin';
|
|
3
|
-
import { JitiOptions } from 'jiti';
|
|
4
|
-
import { TypeDocOptions } from 'typedoc';
|
|
5
|
-
|
|
6
|
-
interface RollupLogger {
|
|
7
|
-
debug: (log: {
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
message: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
error: (log: {
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
message: string;
|
|
14
|
-
}) => void;
|
|
15
|
-
info: (log: {
|
|
16
|
-
[key: string]: unknown;
|
|
17
|
-
message: string;
|
|
18
|
-
}) => void;
|
|
19
|
-
warn: (log: {
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
message: string;
|
|
22
|
-
}) => void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare class FileCache {
|
|
26
|
-
#private;
|
|
27
|
-
constructor(cwd: string, cachePath: string | undefined, hashKey: string, logger: RollupLogger);
|
|
28
|
-
set isEnabled(value: boolean);
|
|
29
|
-
get isEnabled(): boolean;
|
|
30
|
-
has(name: string, subDirectory?: string): boolean;
|
|
31
|
-
get<R>(name: string, subDirectory?: string): R | undefined;
|
|
32
|
-
set(name: string, data: ArrayBuffer | ArrayBufferView | boolean | number | object | string | null | undefined, subDirectory?: string): void;
|
|
33
|
-
private getFilePath;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
type Node10CompatibilityOptions = {
|
|
37
|
-
typeScriptVersion?: string;
|
|
38
|
-
writeToPackageJson?: boolean;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
type MaybeFalsy<T> = T | false | null | undefined;
|
|
42
|
-
type ResolveExternalsPluginOptions = {
|
|
43
|
-
builtins?: boolean;
|
|
44
|
-
builtinsPrefix?: "add" | "ignore" | "strip";
|
|
45
|
-
deps?: boolean;
|
|
46
|
-
devDeps?: boolean;
|
|
47
|
-
exclude?: MaybeFalsy<RegExp | string>[];
|
|
48
|
-
optDeps?: boolean;
|
|
49
|
-
peerDeps?: boolean;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
type DeepPartial<T> = {
|
|
53
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
54
|
-
};
|
|
55
|
-
interface BuildConfig extends DeepPartial<Omit<BuildOptions, "entries">> {
|
|
56
|
-
entries?: (BuildEntry | string)[];
|
|
57
|
-
hooks?: Partial<BuildHooks<InternalBuildOptions>>;
|
|
58
|
-
preset?: BuildPreset | "auto" | "none" | (NonNullable<unknown> & string);
|
|
59
|
-
}
|
|
60
|
-
type BuildPreset = BuildConfig | (() => BuildConfig);
|
|
61
|
-
type BuildConfigFunction = (environment: Environment, mode: Mode) => BuildConfig | Promise<BuildConfig>;
|
|
62
|
-
type BuildEntry = {
|
|
63
|
-
cjs?: boolean;
|
|
64
|
-
declaration?: boolean | "compatible" | "node16";
|
|
65
|
-
environment?: Environment;
|
|
66
|
-
esm?: boolean;
|
|
67
|
-
executable?: true;
|
|
68
|
-
exportKey?: Set<string>;
|
|
69
|
-
fileAlias?: string;
|
|
70
|
-
input: string;
|
|
71
|
-
isGlob?: boolean;
|
|
72
|
-
name?: string;
|
|
73
|
-
outDir?: string;
|
|
74
|
-
runtime?: Runtime;
|
|
75
|
-
};
|
|
76
|
-
interface BuildOptions {
|
|
77
|
-
alias: Record<string, string>;
|
|
78
|
-
analyze?: boolean;
|
|
79
|
-
browserTargets?: string[];
|
|
80
|
-
builder?: Record<string, (context: BuildContext<BuildOptions>, cachePath: string | undefined, fileCache: FileCache, logged: boolean) => Promise<void>>;
|
|
81
|
-
cjsInterop?: boolean;
|
|
82
|
-
clean: boolean;
|
|
83
|
-
debug: boolean;
|
|
84
|
-
declaration?: boolean | "compatible" | "node16" | undefined;
|
|
85
|
-
dtsOnly?: boolean;
|
|
86
|
-
emitCJS?: boolean;
|
|
87
|
-
emitESM?: boolean;
|
|
88
|
-
entries: BuildEntry[];
|
|
89
|
-
experimental?: {
|
|
90
|
-
oxcResolve?: boolean;
|
|
91
|
-
};
|
|
92
|
-
externals: (RegExp | string)[];
|
|
93
|
-
failOnWarn?: boolean;
|
|
94
|
-
fileCache?: boolean;
|
|
95
|
-
ignoreExportKeys?: string[];
|
|
96
|
-
isolatedDeclarationTransformer?: IsolatedDeclarationsTransformer;
|
|
97
|
-
jiti: Omit<JitiOptions, "onError" | "transform">;
|
|
98
|
-
killSignal?: KillSignal;
|
|
99
|
-
minify?: boolean | undefined;
|
|
100
|
-
name: string;
|
|
101
|
-
node10Compatibility?: Node10CompatibilityOptions | false;
|
|
102
|
-
onSuccess?: string | (() => Promise<(() => Promise<void> | void) | undefined | void>);
|
|
103
|
-
onSuccessTimeout?: number;
|
|
104
|
-
outDir: string;
|
|
105
|
-
outputExtensionMap?: Record<Format, string>;
|
|
106
|
-
rollup: RollupBuildOptions;
|
|
107
|
-
rootDir: string;
|
|
108
|
-
runtime?: "browser" | "node";
|
|
109
|
-
sourceDir: string;
|
|
110
|
-
sourcemap: boolean;
|
|
111
|
-
transformer: TransformerFn;
|
|
112
|
-
typedoc: TypeDocumentOptions | false;
|
|
113
|
-
validation?: ValidationOptions | false;
|
|
114
|
-
}
|
|
115
|
-
interface InternalBuildOptions extends BuildOptions {
|
|
116
|
-
rollup: Omit<BuildOptions["rollup"], "oxc"> & {
|
|
117
|
-
oxc?: InternalOXCTransformPluginConfig;
|
|
118
|
-
};
|
|
119
|
-
transformerName: TransformerName | undefined;
|
|
120
|
-
}
|
|
121
|
-
type KillSignal = "SIGKILL" | "SIGTERM";
|
|
122
|
-
interface RollupBuildOptions extends PackemRollupOptions {
|
|
123
|
-
css?: StyleOptions | false;
|
|
124
|
-
resolveExternals?: ResolveExternalsPluginOptions;
|
|
125
|
-
}
|
|
126
|
-
type TypeDocumentOptions = Partial<Omit<TypeDocOptions, "entryPoints" | "hideGenerator" | "out" | "preserveWatchOutput" | "watch">> & {
|
|
127
|
-
format?: "html" | "inline" | "json" | "markdown";
|
|
128
|
-
jsonFileName?: string;
|
|
129
|
-
marker?: string;
|
|
130
|
-
output?: string;
|
|
131
|
-
readmePath?: string;
|
|
132
|
-
};
|
|
133
|
-
type ValidationOptions = {
|
|
134
|
-
bundleLimit?: {
|
|
135
|
-
allowFail?: boolean;
|
|
136
|
-
limit?: number | `${number}${"B" | "GB" | "KB" | "MB" | "TB"}`;
|
|
137
|
-
limits?: Record<string, number | `${number}${"B" | "GB" | "KB" | "MB" | "TB"}`>;
|
|
138
|
-
};
|
|
139
|
-
dependencies: {
|
|
140
|
-
hoisted: {
|
|
141
|
-
exclude: string[];
|
|
142
|
-
} | false;
|
|
143
|
-
unused: {
|
|
144
|
-
exclude: string[];
|
|
145
|
-
} | false;
|
|
146
|
-
} | false;
|
|
147
|
-
packageJson?: {
|
|
148
|
-
allowedExportExtensions?: string[];
|
|
149
|
-
bin?: boolean;
|
|
150
|
-
dependencies?: boolean;
|
|
151
|
-
engines?: boolean;
|
|
152
|
-
exports?: boolean;
|
|
153
|
-
extraConditions?: string[];
|
|
154
|
-
files?: boolean;
|
|
155
|
-
main?: boolean;
|
|
156
|
-
module?: boolean;
|
|
157
|
-
name?: boolean;
|
|
158
|
-
types?: boolean;
|
|
159
|
-
typesVersions?: boolean;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
export type { BuildConfig as B, InternalBuildOptions as I, RollupBuildOptions as R, BuildEntry as a, BuildOptions as b, BuildConfigFunction as c, BuildPreset as d };
|