@visulima/packem 2.0.0-alpha.83 → 2.0.0-alpha.84
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 +13 -0
- package/dist/builder/typedoc/index.d.ts +1 -1
- package/dist/builder/typedoc/index.js +1 -1
- package/dist/cli/index.js +9 -9
- package/dist/config/index.d.ts +1 -1
- package/dist/config/preset/preact.d.ts +1 -1
- package/dist/config/preset/react.d.ts +1 -1
- package/dist/config/preset/solid.d.ts +1 -1
- package/dist/config/preset/svelte.d.ts +1 -1
- package/dist/config/preset/vue.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +34 -30
- package/dist/packem_shared/create-or-update-key-storage-Cp_qI2Lt.js +28 -0
- package/dist/packem_shared/default-Dbrx9zI9.js +1 -0
- package/dist/packem_shared/index-C1JIQmoZ.js +244 -0
- package/dist/packem_shared/oxcTransformPlugin-Dwvbw2jE-CIiF8y3S.js +185 -0
- package/dist/packem_shared/{types.d-Cm6dnCyD.d.ts → types.d-DOt53hsx.d.ts} +0 -4
- package/dist/rollup/plugins/oxc/oxc-transformer.js +1 -1
- package/package.json +4 -4
- package/dist/packem_shared/create-or-update-key-storage-DUTe5Prf.js +0 -13
- package/dist/packem_shared/default-Dj-WgmWM.js +0 -1
- package/dist/packem_shared/index-BcKJ8RJU.js +0 -255
- package/dist/packem_shared/oxcResolvePlugin-DeIohkWk-rspLVIoy.js +0 -170
- package/dist/packem_shared/oxcTransformPlugin-Dwvbw2jE-Bbz81VnA.js +0 -4
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var N=Object.defineProperty;var u=(e,n)=>N(e,"name",{value:n,configurable:!0});import{createFilter as R}from"@rollup/pluginutils";import{EXCLUDE_REGEXP as x}from"@visulima/packem-share/constants";import{createRequire as v}from"node:module";var C=Object.defineProperty,t=u((e,n)=>C(e,"name",{value:n,configurable:!0}),"t$1");const r=v(import.meta.url);new URL(".",import.meta.url).pathname;const{readFileSync:b}=r("node:fs");let i=null;const s=[],c=t(()=>{let e=!1;return process.platform==="linux"&&(e=I(),e===null&&(e=O()),e===null&&(e=w())),e},"isMusl"),S=t(e=>e.includes("libc.musl-")||e.includes("ld-musl-"),"isFileMusl"),I=t(()=>{try{return b("/usr/bin/ldd","utf-8").includes("musl")}catch{return null}},"isMuslFromFilesystem"),O=t(()=>{let e=null;return typeof process.report?.getReport=="function"&&(process.report.excludeNetwork=!0,e=process.report.getReport()),e?e.header&&e.header.glibcVersionRuntime?!1:!!(Array.isArray(e.sharedObjects)&&e.sharedObjects.some(S)):null},"isMuslFromReport"),w=t(()=>{try{return r("child_process").execSync("ldd --version",{encoding:"utf8"}).includes("musl")}catch{return!1}},"isMuslFromChildProcess");function h(){if(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)try{return r(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)}catch(e){s.push(e)}else if(process.platform==="android")if(process.arch==="arm64"){try{return r("./transform.android-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-android-arm64"),n=r("@oxc-transform/binding-android-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm"){try{return r("./transform.android-arm-eabi.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-android-arm-eabi"),n=r("@oxc-transform/binding-android-arm-eabi/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on Android ${process.arch}`));else if(process.platform==="win32")if(process.arch==="x64")if(process.config?.variables?.shlib_suffix==="dll.a"||process.config?.variables?.node_target_type==="shared_library"){try{return r("./transform.win32-x64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-x64-gnu"),n=r("@oxc-transform/binding-win32-x64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.win32-x64-msvc.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-x64-msvc"),n=r("@oxc-transform/binding-win32-x64-msvc/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="ia32"){try{return r("./transform.win32-ia32-msvc.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-ia32-msvc"),n=r("@oxc-transform/binding-win32-ia32-msvc/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64"){try{return r("./transform.win32-arm64-msvc.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-arm64-msvc"),n=r("@oxc-transform/binding-win32-arm64-msvc/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));else if(process.platform==="darwin"){try{return r("./transform.darwin-universal.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-darwin-universal"),n=r("@oxc-transform/binding-darwin-universal/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}if(process.arch==="x64"){try{return r("./transform.darwin-x64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-darwin-x64"),n=r("@oxc-transform/binding-darwin-x64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64"){try{return r("./transform.darwin-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-darwin-arm64"),n=r("@oxc-transform/binding-darwin-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))}else if(process.platform==="freebsd")if(process.arch==="x64"){try{return r("./transform.freebsd-x64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-freebsd-x64"),n=r("@oxc-transform/binding-freebsd-x64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64"){try{return r("./transform.freebsd-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-freebsd-arm64"),n=r("@oxc-transform/binding-freebsd-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));else if(process.platform==="linux")if(process.arch==="x64")if(c()){try{return r("./transform.linux-x64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-x64-musl"),n=r("@oxc-transform/binding-linux-x64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-x64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-x64-gnu"),n=r("@oxc-transform/binding-linux-x64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64")if(c()){try{return r("./transform.linux-arm64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm64-musl"),n=r("@oxc-transform/binding-linux-arm64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-arm64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm64-gnu"),n=r("@oxc-transform/binding-linux-arm64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm")if(c()){try{return r("./transform.linux-arm-musleabihf.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm-musleabihf"),n=r("@oxc-transform/binding-linux-arm-musleabihf/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-arm-gnueabihf.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm-gnueabihf"),n=r("@oxc-transform/binding-linux-arm-gnueabihf/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="loong64")if(c()){try{return r("./transform.linux-loong64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-loong64-musl"),n=r("@oxc-transform/binding-linux-loong64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-loong64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-loong64-gnu"),n=r("@oxc-transform/binding-linux-loong64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="riscv64")if(c()){try{return r("./transform.linux-riscv64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-riscv64-musl"),n=r("@oxc-transform/binding-linux-riscv64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-riscv64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-riscv64-gnu"),n=r("@oxc-transform/binding-linux-riscv64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="ppc64"){try{return r("./transform.linux-ppc64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-ppc64-gnu"),n=r("@oxc-transform/binding-linux-ppc64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="s390x"){try{return r("./transform.linux-s390x-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-s390x-gnu"),n=r("@oxc-transform/binding-linux-s390x-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));else if(process.platform==="openharmony")if(process.arch==="arm64"){try{return r("./transform.openharmony-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-openharmony-arm64"),n=r("@oxc-transform/binding-openharmony-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="x64"){try{return r("./transform.openharmony-x64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-openharmony-x64"),n=r("@oxc-transform/binding-openharmony-x64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm"){try{return r("./transform.openharmony-arm.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-openharmony-arm"),n=r("@oxc-transform/binding-openharmony-arm/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));else s.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))}u(h,"m");t(h,"requireNative");i=h();if(!i||process.env.NAPI_RS_FORCE_WASI){let e=null,n=null;try{e=r("./transform.wasi.cjs"),i=e}catch(o){process.env.NAPI_RS_FORCE_WASI&&(n=o)}if(!i||process.env.NAPI_RS_FORCE_WASI)try{e=r("@oxc-transform/binding-wasm32-wasi"),i=e}catch(o){process.env.NAPI_RS_FORCE_WASI&&(n?n.cause=o:n=o,s.push(o))}if(process.env.NAPI_RS_FORCE_WASI==="error"&&!e){const o=new Error("WASI binding not found and NAPI_RS_FORCE_WASI is set to error");throw o.cause=n,o}}if(!i&&globalThis.process?.versions?.webcontainer)try{i=r("./webcontainer-fallback.cjs")}catch(e){s.push(e)}if(!i)throw s.length>0?new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.",{cause:s.reduce((e,n)=>(n.cause=e,n))}):new Error("Failed to load native binding");const{transform:y}=i;var A=Object.defineProperty,P=u((e,n)=>A(e,"name",{value:n,configurable:!0}),"t"),F=Object.defineProperty,k=P((e,n)=>F(e,"name",{value:n,configurable:!0}),"n"),H=Object.defineProperty,V=k((e,n)=>H(e,"name",{value:n,configurable:!0}),"s");const K=V(({exclude:e,include:n,...o})=>{const m=R(n,e??x);return{name:"packem:oxc-transform",async transform(E,p){if(!m(p))return;const _=await y(p,E,{...o,sourcemap:!0}),{code:l,errors:d,map:f}=_;if(d.length>0){const g=d.map(a=>typeof a=="string"?a:a.message??JSON.stringify(a));return this.error({message:[`
|
|
2
|
-
transform errors:`,...g].join(`
|
|
3
|
-
|
|
4
|
-
`),pluginCode:"ERR_TRANSFORM"})}return{code:l,map:f}}}},"oxcTransformPlugin");K.NAME="oxc";export{K as s};
|