@visulima/packem 2.0.0-alpha.80 → 2.0.0-alpha.81
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 +14 -0
- package/dist/builder/typedoc/index.js +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/index.js +1 -1
- package/dist/packem_shared/{create-or-update-key-storage-D8L6IRYf.js → create-or-update-key-storage-DUTe5Prf.js} +3 -3
- package/dist/packem_shared/{default-DCITr7u7.js → default-Dj-WgmWM.js} +1 -1
- package/dist/packem_shared/{index-D4AUfFZu.js → index-CD5sgWFu.js} +130 -126
- package/dist/packem_shared/{oxcResolvePlugin-DeIohkWk-DfJ30lek.js → oxcResolvePlugin-DeIohkWk-rspLVIoy.js} +1 -1
- package/package.json +5 -5
|
@@ -167,4 +167,4 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
|
|
|
167
167
|
`);let s=0;for(;n[s]&&n[s].trim().match(/^(#|$)/);)s++;const i=n.length;let o=s+1;for(;o<i&&n[o].trim();)o++;return n.slice(s,o).join(" ").trim()}return h(r,"extractDescription"),e(r,"extractDescription"),Jn}h(P0,"requireExtract_description");var Ou={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},Pu={web:"url",name:"url"},Nu={server:"start",tests:"test"};const N0={topLevel:Ou,bugs:Pu,script:Nu},B0=Object.defineProperty({__proto__:null,bugs:Pu,default:N0,script:Nu,topLevel:Ou},Symbol.toStringTag,{value:"Module"}),k0=Ei(B0);var Xn,uo;function I0(){if(uo)return Xn;uo=1;var t=Object.defineProperty,e=h((p,C)=>t(p,"name",{value:C,configurable:!0}),"n"),{URL:r}=vc,n=y0(),s=b0(),i=F0(),o=O0(),{isBuiltin:a}=yc,u=["dependencies","devDependencies","optionalDependencies"],l=P0(),f=k0,g=e(p=>p.includes("@")&&p.indexOf("@")<p.lastIndexOf("."),"isEmail");Xn={warn:e(function(){},"warn"),fixRepositoryField:e(function(p){if(p.repositories&&(this.warn("repositories"),p.repository=p.repositories[0]),!p.repository)return this.warn("missingRepository");typeof p.repository=="string"&&(p.repository={type:"git",url:p.repository});var C=p.repository.url||"";if(C){var A=o.fromUrl(C);A&&(C=p.repository.url=A.getDefaultRepresentation()==="shortcut"?A.https():A.toString())}C.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",C)},"fixRepositoryField"),fixTypos:e(function(p){Object.keys(f.topLevel).forEach(function(C){Object.prototype.hasOwnProperty.call(p,C)&&this.warn("typo",C,f.topLevel[C])},this)},"fixTypos"),fixScriptsField:e(function(p){if(p.scripts){if(typeof p.scripts!="object"){this.warn("nonObjectScripts"),delete p.scripts;return}Object.keys(p.scripts).forEach(function(C){typeof p.scripts[C]!="string"?(this.warn("nonStringScript"),delete p.scripts[C]):f.script[C]&&!p.scripts[f.script[C]]&&this.warn("typo",C,f.script[C],"scripts")},this)}},"fixScriptsField"),fixFilesField:e(function(p){var C=p.files;C&&!Array.isArray(C)?(this.warn("nonArrayFiles"),delete p.files):p.files&&(p.files=p.files.filter(function(A){return!A||typeof A!="string"?(this.warn("invalidFilename",A),!1):!0},this))},"fixFilesField"),fixBinField:e(function(p){if(p.bin&&typeof p.bin=="string"){var C={},A;(A=p.name.match(/^@[^/]+[/](.*)$/))?C[A[1]]=p.bin:C[p.name]=p.bin,p.bin=C}},"fixBinField"),fixManField:e(function(p){p.man&&typeof p.man=="string"&&(p.man=[p.man])},"fixManField"),fixBundleDependenciesField:e(function(p){var C="bundledDependencies",A="bundleDependencies";p[C]&&!p[A]&&(p[A]=p[C],delete p[C]),p[A]&&!Array.isArray(p[A])?(this.warn("nonArrayBundleDependencies"),delete p[A]):p[A]&&(p[A]=p[A].filter(function(S){return!S||typeof S!="string"?(this.warn("nonStringBundleDependency",S),!1):(p.dependencies||(p.dependencies={}),Object.prototype.hasOwnProperty.call(p.dependencies,S)||(this.warn("nonDependencyBundleDependency",S),p.dependencies[S]="*"),!0)},this))},"fixBundleDependenciesField"),fixDependencies:e(function(p){D(p,this.warn),d(p),this.fixBundleDependenciesField(p),["dependencies","devDependencies"].forEach(function(C){if(C in p){if(!p[C]||typeof p[C]!="object"){this.warn("nonObjectDependencies",C),delete p[C];return}Object.keys(p[C]).forEach(function(A){var S=p[C][A];typeof S!="string"&&(this.warn("nonStringDependency",A,JSON.stringify(S)),delete p[C][A]);var L=o.fromUrl(p[C][A]);L&&(p[C][A]=L.toString())},this)}},this)},"fixDependencies"),fixModulesField:e(function(p){p.modules&&(this.warn("deprecatedModules"),delete p.modules)},"fixModulesField"),fixKeywordsField:e(function(p){typeof p.keywords=="string"&&(p.keywords=p.keywords.split(/,\s+/)),p.keywords&&!Array.isArray(p.keywords)?(delete p.keywords,this.warn("nonArrayKeywords")):p.keywords&&(p.keywords=p.keywords.filter(function(C){return typeof C!="string"||!C?(this.warn("nonStringKeyword"),!1):!0},this))},"fixKeywordsField"),fixVersionField:e(function(p,C){var A=!C;if(!p.version)return p.version="",!0;if(!n(p.version,A))throw new Error('Invalid version: "'+p.version+'"');return p.version=s(p.version,A),!0},"fixVersionField"),fixPeople:e(function(p){b(p,F),b(p,E)},"fixPeople"),fixNameField:e(function(p,C){typeof C=="boolean"?C={strict:C}:typeof C>"u"&&(C={});var A=C.strict;if(!p.name&&!A){p.name="";return}if(typeof p.name!="string")throw new Error("name field must be a string.");A||(p.name=p.name.trim()),$(p.name,A,C.allowLegacyCase),a(p.name)&&this.warn("conflictingName",p.name)},"fixNameField"),fixDescriptionField:e(function(p){p.description&&typeof p.description!="string"&&(this.warn("nonStringDescription"),delete p.description),p.readme&&!p.description&&(p.description=l(p.readme)),p.description===void 0&&delete p.description,p.description||this.warn("missingDescription")},"fixDescriptionField"),fixReadmeField:e(function(p){p.readme||(this.warn("missingReadme"),p.readme="ERROR: No README data found!")},"fixReadmeField"),fixBugsField:e(function(p){if(!p.bugs&&p.repository&&p.repository.url){var C=o.fromUrl(p.repository.url);C&&C.bugs()&&(p.bugs={url:C.bugs()})}else if(p.bugs){if(typeof p.bugs=="string")g(p.bugs)?p.bugs={email:p.bugs}:r.canParse(p.bugs)?p.bugs={url:p.bugs}:this.warn("nonEmailUrlBugsString");else{y(p.bugs,this.warn);var A=p.bugs;p.bugs={},A.url&&(r.canParse(A.url)?p.bugs.url=A.url:this.warn("nonUrlBugsUrlField")),A.email&&(typeof A.email=="string"&&g(A.email)?p.bugs.email=A.email:this.warn("nonEmailBugsEmailField"))}!p.bugs.email&&!p.bugs.url&&(delete p.bugs,this.warn("emptyNormalizedBugs"))}},"fixBugsField"),fixHomepageField:e(function(p){if(!p.homepage&&p.repository&&p.repository.url){var C=o.fromUrl(p.repository.url);C&&C.docs()&&(p.homepage=C.docs())}if(p.homepage){if(typeof p.homepage!="string")return this.warn("nonUrlHomepage"),delete p.homepage;r.canParse(p.homepage)||(p.homepage="http://"+p.homepage)}},"fixHomepageField"),fixLicenseField:e(function(p){const C=p.license||p.licence;if(!C)return this.warn("missingLicense");if(typeof C!="string"||C.length<1||C.trim()==="")return this.warn("invalidLicense");if(!i(C).validForNewPackages)return this.warn("invalidLicense")},"fixLicenseField")};function m(p){if(p.charAt(0)!=="@")return!1;var C=p.slice(1).split("/");return C.length!==2?!1:C[0]&&C[1]&&C[0]===encodeURIComponent(C[0])&&C[1]===encodeURIComponent(C[1])}h(m,"isValidScopedPackageName"),e(m,"isValidScopedPackageName");function v(p){return!p.match(/[/@\s+%:]/)&&p===encodeURIComponent(p)}h(v,"isCorrectlyEncodedName"),e(v,"isCorrectlyEncodedName");function $(p,C,A){if(p.charAt(0)==="."||!(m(p)||v(p))||C&&!A&&p!==p.toLowerCase()||p.toLowerCase()==="node_modules"||p.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(p))}h($,"ensureValidName"),e($,"ensureValidName");function b(p,C){return p.author&&(p.author=C(p.author)),["maintainers","contributors"].forEach(function(A){Array.isArray(p[A])&&(p[A]=p[A].map(C))}),p}h(b,"modifyPeople"),e(b,"modifyPeople");function F(p){if(typeof p=="string")return p;var C=p.name||"",A=p.url||p.web,S=A?" ("+A+")":"",L=p.email||p.mail,T=L?" <"+L+">":"";return C+T+S}h(F,"unParsePerson"),e(F,"unParsePerson");function E(p){if(typeof p!="string")return p;var C=p.match(/^([^(<]+)/),A=p.match(/\(([^()]+)\)/),S=p.match(/<([^<>]+)>/),L={};return C&&C[0].trim()&&(L.name=C[0].trim()),S&&(L.email=S[1]),A&&(L.url=A[1]),L}h(E,"parsePerson"),e(E,"parsePerson");function d(p){var C=p.optionalDependencies;if(C){var A=p.dependencies||{};Object.keys(C).forEach(function(S){A[S]=C[S]}),p.dependencies=A}}h(d,"addOptionalDepsToDeps"),e(d,"addOptionalDepsToDeps");function c(p,C,A){if(!p)return{};if(typeof p=="string"&&(p=p.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(p))return p;A("deprecatedArrayDependencies",C);var S={};return p.filter(function(L){return typeof L=="string"}).forEach(function(L){L=L.trim().split(/(:?[@\s><=])/);var T=L.shift(),N=L.join("");N=N.trim(),N=N.replace(/^@/,""),S[T]=N}),S}h(c,"depObjectify"),e(c,"depObjectify");function D(p,C){u.forEach(function(A){p[A]&&(p[A]=c(p[A],A,C))})}h(D,"objectifyDeps"),e(D,"objectifyDeps");function y(p,C){p&&Object.keys(p).forEach(function(A){f.bugs[A]&&(C("typo",A,f.bugs[A],"bugs"),p[f.bugs[A]]=p[A],delete p[A])})}return h(y,"bugsTypos"),e(y,"bugsTypos"),Xn}h(I0,"requireFixer");var Bu="'repositories' (plural) Not supported. Please pick one as the 'repository' field",ku="No repository field.",Iu="Probably broken git url: %s",xu="scripts must be an object",Tu="script values must be string commands",ju="Invalid 'files' member",Ru="Invalid filename in 'files' list: %s",Mu="Invalid 'bundleDependencies' list. Must be array of package names",_u="Invalid bundleDependencies member: %s",Gu="Non-dependency in bundleDependencies: %s",Uu="%s field must be an object",qu="Invalid dependency: %s %s",Ku="specifying %s as array is deprecated",Wu="modules field is deprecated",Hu="keywords should be an array of strings",Vu="keywords should be an array of strings",Yu="%s is also the name of a node core module.",zu="'description' field should be a string",Ju="No description",Xu="No README data",Qu="No license field.",Zu="Bug string field must be url, email, or {email,url}",ec="bugs.url field must be a string url. Deleted.",tc="bugs.email field must be a string email. Deleted.",rc="Normalized value of bugs field is an empty object. Deleted.",nc="homepage field must be a string url. Deleted.",sc="license should be a valid SPDX license expression",ic="%s should probably be %s.";const x0={repositories:Bu,missingRepository:ku,brokenGitUrl:Iu,nonObjectScripts:xu,nonStringScript:Tu,nonArrayFiles:ju,invalidFilename:Ru,nonArrayBundleDependencies:Mu,nonStringBundleDependency:_u,nonDependencyBundleDependency:Gu,nonObjectDependencies:Uu,nonStringDependency:qu,deprecatedArrayDependencies:Ku,deprecatedModules:Wu,nonArrayKeywords:Hu,nonStringKeyword:Vu,conflictingName:Yu,nonStringDescription:zu,missingDescription:Ju,missingReadme:Xu,missingLicense:Qu,nonEmailUrlBugsString:Zu,nonUrlBugsUrlField:ec,nonEmailBugsEmailField:tc,emptyNormalizedBugs:rc,nonUrlHomepage:nc,invalidLicense:sc,typo:ic},T0=Object.defineProperty({__proto__:null,brokenGitUrl:Iu,conflictingName:Yu,default:x0,deprecatedArrayDependencies:Ku,deprecatedModules:Wu,emptyNormalizedBugs:rc,invalidFilename:Ru,invalidLicense:sc,missingDescription:Ju,missingLicense:Qu,missingReadme:Xu,missingRepository:ku,nonArrayBundleDependencies:Mu,nonArrayFiles:ju,nonArrayKeywords:Hu,nonDependencyBundleDependency:Gu,nonEmailBugsEmailField:tc,nonEmailUrlBugsString:Zu,nonObjectDependencies:Uu,nonObjectScripts:xu,nonStringBundleDependency:_u,nonStringDependency:qu,nonStringDescription:zu,nonStringKeyword:Vu,nonStringScript:Tu,nonUrlBugsUrlField:ec,nonUrlHomepage:nc,repositories:Bu,typo:ic},Symbol.toStringTag,{value:"Module"}),j0=Ei(T0);var Qn,co;function R0(){if(co)return Qn;co=1;var t=Object.defineProperty,e=h((i,o)=>t(i,"name",{value:o,configurable:!0}),"s"),r=Ac,n=j0;Qn=h(function(){var i=Array.prototype.slice.call(arguments,0),o=i.shift();if(o==="typo")return s.apply(null,i);var a=n[o]?n[o]:o+": '%s'";return i.unshift(a),r.format.apply(null,i)},"make_warning");function s(i,o,a){return a&&(i=a+"['"+i+"']",o=a+"['"+o+"']"),r.format(n.typo,i,o)}return h(s,"makeTypoWarning"),e(s,"makeTypoWarning"),Qn}h(R0,"requireMake_warning");var Zn,lo;function M0(){if(lo)return Zn;lo=1;var t=Object.defineProperty,e=h((l,f)=>t(l,"name",{value:f,configurable:!0}),"n");Zn=a;var r=I0();a.fixer=r;var n=R0(),s=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],i=["dependencies","people","typos"],o=s.map(function(l){return u(l)+"Field"});o=o.concat(i);function a(l,f,g){f===!0&&(f=null,g=!0),g||(g=!1),(!f||l.private)&&(f=e(function(){},"warn")),l.scripts&&l.scripts.install==="node-gyp rebuild"&&!l.scripts.preinstall&&(l.gypfile=!0),r.warn=function(){f(n.apply(null,arguments))},o.forEach(function(m){r["fix"+u(m)](l,g)}),l._id=l.name+"@"+l.version}h(a,"normalize"),e(a,"normalize");function u(l){return l.charAt(0).toUpperCase()+l.slice(1)}return h(u,"ucFirst"),e(u,"ucFirst"),Zn}h(M0,"requireNormalize");var _0=M0();const G0=vu(_0);var U0=Object.defineProperty,q0=h((t,e)=>U0(t,"name",{value:e,configurable:!0}),"d$1"),K0=Object.defineProperty,W0=q0((t,e)=>K0(t,"name",{value:e,configurable:!0}),"f"),H0=Object.defineProperty,kt=W0((t,e)=>H0(t,"name",{value:e,configurable:!0}),"c");const oc=kt((t,e,r)=>{const n=he(t),s=he(e),i=s===n?".":Ec(n,s);return r.some(o=>{const a=o.startsWith("./")?o.slice(2):o,u=i.startsWith("./")?i.slice(2):i;if(a==="."&&u===".")return!0;if(a.endsWith("/**")){const l=a.slice(0,-3);return u===l||u.startsWith(`${l}/`)}if(a.endsWith("/*")){const l=a.slice(0,-2);return l===""?u!=="."&&!u.includes("/"):u.startsWith(`${l}/`)||u===l}return u===a||u.startsWith(`${a}/`)})},"isPackageInWorkspace"),ac=kt(async t=>{const e=await bo("pnpm-workspace.yaml",{cwd:he(t),type:"file"});if(!e)return;const r=await $r(e),n=Array.isArray(r.packages)?r.packages:[];if(!oc(e,t,n))return;const s={};return r.catalog&&typeof r.catalog=="object"&&(s.catalog=r.catalog),r.catalogs&&typeof r.catalogs=="object"&&(s.catalogs=r.catalogs),Object.keys(s).length>0?s:void 0},"readPnpmCatalogs"),uc=kt(t=>{const e=Ao("pnpm-workspace.yaml",{cwd:he(t),type:"file"});if(!e)return;const r=Fr(e),n=Array.isArray(r.packages)?r.packages:[];if(!oc(e,t,n))return;const s={};return r.catalog&&typeof r.catalog=="object"&&(s.catalog=r.catalog),r.catalogs&&typeof r.catalogs=="object"&&(s.catalogs=r.catalogs),Object.keys(s).length>0?s:void 0},"readPnpmCatalogsSync"),V0=kt((t,e,r)=>{if(e==="catalog:")return r.catalog?.[t];if(e.startsWith("catalog:")){const n=e.slice(8);return r.catalogs?.[n]?.[t]}},"resolveCatalogReference"),Y0=kt((t,e)=>{for(const[r,n]of Object.entries(t)){if(typeof n!="string")continue;const s=V0(r,n,e);s&&(t[r]=s)}},"resolveDependenciesCatalogReferences"),bn=kt((t,e)=>{const r=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const n of r){if(!t[n]||typeof t[n]!="object")continue;const s=t[n];Y0(s,e)}},"resolveCatalogReferences");var z0=Object.defineProperty,ee=h((t,e)=>z0(t,"name",{value:e,configurable:!0}),"l"),J0=Object.defineProperty,Y=ee((t,e)=>J0(t,"name",{value:e,configurable:!0}),"f");const X0=De(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vi=Y(t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return X0(t)},"__cjs_getBuiltinModule"),{existsSync:cc}=vi("node:fs"),{createInterface:Q0}=vi("node:readline"),{styleText:ce}=vi("node:util");var Z0=Object.defineProperty,Q=Y((t,e)=>Z0(t,"name",{value:e,configurable:!0}),"f");const we=Q(t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")},"isObject"),em=Q(t=>{if(!we(t))return!1;for(const e in t)if(Object.hasOwn(t,e))return!1;return!0},"isEmptyObject"),lc=new Set(["__proto__","prototype","constructor"]),fc=1e6,tm=Q(t=>t>="0"&&t<="9","isDigit");function ct(t){if(t==="0")return!0;if(/^[1-9]\d*$/.test(t)){const e=Number.parseInt(t,10);return e<=Number.MAX_SAFE_INTEGER&&e<=fc}return!1}h(ct,"w");ee(ct,"b");Y(ct,"p$1");Q(ct,"shouldCoerceToNumber");function bt(t,e){return lc.has(t)?!1:(t&&ct(t)?e.push(Number.parseInt(t,10)):e.push(t),!0)}h(bt,"P");ee(bt,"P");Y(bt,"y");Q(bt,"processSegment");function En(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);const e=[];let r="",n="start",s=!1,i=0;for(const o of t){if(i++,s){r+=o,s=!1;continue}if(o==="\\"){if(n==="index")throw new Error(`Invalid character '${o}' in an index at position ${i}`);if(n==="indexEnd")throw new Error(`Invalid character '${o}' after an index at position ${i}`);s=!0,n=n==="start"?"property":n;continue}switch(o){case".":{if(n==="index")throw new Error(`Invalid character '${o}' in an index at position ${i}`);if(n==="indexEnd"){n="property";break}if(!bt(r,e))return[];r="",n="property";break}case"[":{if(n==="index")throw new Error(`Invalid character '${o}' in an index at position ${i}`);if(n==="indexEnd"){n="index";break}if(n==="property"||n==="start"){if((r||n==="property")&&!bt(r,e))return[];r=""}n="index";break}case"]":{if(n==="index"){if(r==="")r=(e.pop()||"")+"[]",n="property";else{const a=Number.parseInt(r,10);!Number.isNaN(a)&&Number.isFinite(a)&&a>=0&&a<=Number.MAX_SAFE_INTEGER&&a<=fc&&r===String(a)?e.push(a):e.push(r),r="",n="indexEnd"}break}if(n==="indexEnd")throw new Error(`Invalid character '${o}' after an index at position ${i}`);r+=o;break}default:{if(n==="index"&&!tm(o))throw new Error(`Invalid character '${o}' in an index at position ${i}`);if(n==="indexEnd")throw new Error(`Invalid character '${o}' after an index at position ${i}`);n==="start"&&(n="property"),r+=o}}}switch(s&&(r+="\\"),n){case"property":{if(!bt(r,e))return[];break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}h(En,"N");ee(En,"B");Y(En,"parsePath");Q(En,"parsePath");function lt(t){if(typeof t=="string")return En(t);if(Array.isArray(t)){const e=[];for(const[r,n]of t.entries()){if(typeof n!="string"&&typeof n!="number")throw new TypeError(`Expected a string or number for path segment at index ${r}, got ${typeof n}`);if(typeof n=="number"&&!Number.isFinite(n))throw new TypeError(`Path segment at index ${r} must be a finite number, got ${n}`);if(lc.has(n))return[];typeof n=="string"&&ct(n)?e.push(Number.parseInt(n,10)):e.push(n)}return e}return[]}h(lt,"b$1");ee(lt,"k");Y(lt,"d");Q(lt,"normalizePath");function Ce(t,e,r){if(!we(t)||typeof e!="string"&&!Array.isArray(e))return r===void 0?t:r;const n=lt(e);if(n.length===0)return r;for(let s=0;s<n.length;s++){const i=n[s];if(t=t[i],t==null){if(s!==n.length-1)return r;break}}return t===void 0?r:t}h(Ce,"d");ee(Ce,"h");Y(Ce,"getProperty");Q(Ce,"getProperty");function vn(t,e,r){if(!we(t)||typeof e!="string"&&!Array.isArray(e))return t;const n=t,s=lt(e);if(s.length===0)return t;for(let i=0;i<s.length;i++){const o=s[i];if(i===s.length-1)t[o]=r;else if(!we(t[o])){const a=typeof s[i+1]=="number";t[o]=a?[]:{}}t=t[o]}return n}h(vn,"T");ee(vn,"M");Y(vn,"setProperty");Q(vn,"setProperty");function Ai(t,e){if(!we(t)||typeof e!="string"&&!Array.isArray(e))return!1;const r=lt(e);if(r.length===0)return!1;for(let n=0;n<r.length;n++){const s=r[n];if(n===r.length-1)return Object.hasOwn(t,s)?(delete t[s],!0):!1;if(t=t[s],!we(t))return!1}}h(Ai,"q");ee(Ai,"ue");Y(Ai,"deleteProperty");Q(Ai,"deleteProperty");function _e(t,e){if(!we(t)||typeof e!="string"&&!Array.isArray(e))return!1;const r=lt(e);if(r.length===0)return!1;for(const n of r){if(!we(t)||!(n in t))return!1;t=t[n]}return!0}h(_e,"m$1");ee(_e,"y");Y(_e,"hasProperty");Q(_e,"hasProperty");function pr(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return t.replaceAll(/[\\.[]/g,String.raw`\$&`)}h(pr,"E");ee(pr,"x");Y(pr,"escapePath");Q(pr,"escapePath");function An(t){const e=Object.entries(t);return Array.isArray(t)?e.map(([r,n])=>[ct(r)?Number.parseInt(r,10):r,n]):e}h(An,"D");ee(An,"R");Y(An,"m$2");Q(An,"normalizeEntries");function Cn(t,e={}){if(!Array.isArray(t))throw new TypeError(`Expected an array, got ${typeof t}`);const{preferDotForIndices:r=!1}=e,n=[];for(const[s,i]of t.entries()){if(typeof i!="string"&&typeof i!="number")throw new TypeError(`Expected a string or number for path segment at index ${s}, got ${typeof i}`);if(typeof i=="number")if(!Number.isInteger(i)||i<0){const o=pr(String(i));n.push(s===0?o:`.${o}`)}else r&&s>0?n.push(`.${i}`):n.push(`[${i}]`);else if(typeof i=="string")if(i==="")s===0||n.push(".");else if(ct(i)){const o=Number.parseInt(i,10);r&&s>0?n.push(`.${o}`):n.push(`[${o}]`)}else{const o=pr(i);n.push(s===0?o:`.${o}`)}}return n.join("")}h(Cn,"F");ee(Cn,"Y");Y(Cn,"stringifyPath");Q(Cn,"stringifyPath");function*wr(t,e=[],r=new Set){if(!we(t)||em(t)){e.length>0&&(yield Cn(e));return}if(!r.has(t)){r.add(t);for(const[n,s]of An(t))e.push(n),yield*wr(s,e,r),e.pop();r.delete(t)}}h(wr,"j$1");ee(wr,"S");Y(wr,"x");Q(wr,"deepKeysIterator");function Ci(t){return[...wr(t)]}h(Ci,"G");ee(Ci,"ge");Y(Ci,"deepKeys");Q(Ci,"deepKeys");function $i(t){const e={};if(!we(t))return e;for(const[r,n]of Object.entries(t))vn(e,r,n);return e}h($i,"K");ee($i,"de");Y($i,"unflatten");Q($i,"unflatten");var rm=Object.defineProperty,es=Y((t,e)=>rm(t,"name",{value:e,configurable:!0}),"i");const nm=es(async t=>{const{default:e=!1,message:r,transformer:n}=t,s=es(o=>{const a=ce(["cyan","bold"],"?"),u=ce(["bold"],o),l=e?`${ce(["greenBright"],"Y")}${ce(["gray"],"/n")}`:`y/${ce(["yellowBright"],"N")}`;return`${a} ${u} ${ce(["gray"],`(${l})`)}`},"formatMessage"),i=es(o=>n?n(o):o?ce(["greenBright"],"Yes"):ce(["yellowBright"],"No"),"formatAnswer");return new Promise(o=>{const a=Q0({input:process.stdin,output:process.stdout}),u=s(r);a.question(u,l=>{a.close();const f=l.trim().toLowerCase();if(f===""){o(e);return}if(f==="y"||f==="yes"){console.log(`${ce(["greenBright"],"✓")} ${i(!0)}`),o(!0);return}if(f==="n"||f==="no"){console.log(`${ce(["yellowBright"],"✗")} ${i(!1)}`),o(!1);return}console.log(`${ce(["gray"],"→")} ${i(e)}`),o(e)}),a.on("SIGINT",()=>{a.close(),console.log(`
|
|
168
168
|
${ce(["gray"],"→")} ${i(e)}`),o(e)})})},"confirm"),sm=typeof process.stdout<"u"&&!process.versions.deno&&!globalThis.window;var im=Object.defineProperty,J=Y((t,e)=>im(t,"name",{value:e,configurable:!0}),"l");const hc=/, ([^,]*)$/,Yr=new Map,pc=new Map;class om extends Error{static{h(this,"ke")}static{ee(this,"be")}static{Y(this,"M")}static{J(this,"PackageJsonValidationError")}constructor(e){super(`The following warnings were encountered while normalizing package data:
|
|
169
169
|
- ${e.join(`
|
|
170
|
-
- `)}`),this.name="PackageJsonValidationError"}}const $n=J((t,e,r=[])=>{const n=[];if(G0(t,s=>{n.push(s)},e),e&&n.length>0){const s=n.filter(i=>!r.some(o=>o instanceof RegExp?o.test(i):o===i));if(s.length>0)throw new om(s)}return t},"normalizeInput"),am=J(async t=>await $r(t),"parseYamlFile"),um=J(t=>Fr(t),"parseYamlFileSync"),cm=J(async t=>{const e=await vs(t);return Eu.parse(e)},"parseJson5File"),lm=J(t=>{const e=As(t);return Eu.parse(e)},"parseJson5FileSync"),dc=J(async(t,e)=>e?.yaml!==!1&&(t.endsWith(".yaml")||t.endsWith(".yml"))?am(t):e?.json5!==!1&&t.endsWith(".json5")?cm(t):Jr(t),"parsePackageFile"),mc=J((t,e)=>e?.yaml!==!1&&(t.endsWith(".yaml")||t.endsWith(".yml"))?um(t):e?.json5!==!1&&t.endsWith(".json5")?lm(t):Xr(t),"parsePackageFileSync"),fm=J(async(t,e={})=>{const r={type:"file"};t&&(r.cwd=t);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");let s;for(const u of n)if(s=await bo(u,r),s)break;if(!s)throw new Jo(`No such file or directory, for ${n.join(", ").replace(hc," or $1")} found.`);const i=e.cache&&typeof e.cache!="boolean"?e.cache:pc;if(e.cache&&i.has(s))return i.get(s);const o=await dc(s,e);if(e.resolveCatalogs){const u=await ac(s);u&&bn(o,u)}$n(o,e.strict??!1,e.ignoreWarnings);const a={packageJson:o,path:s};return e.cache&&i.set(s,a),a},"findPackageJson");J((t,e={})=>{const r={type:"file"};t&&(r.cwd=t);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");let s;for(const u of n)if(s=Ao(u,r),s)break;if(!s)throw new Jo(`No such file or directory, for ${n.join(", ").replace(hc," or $1")} found.`);const i=e.cache&&typeof e.cache!="boolean"?e.cache:pc;if(e.cache&&i.has(s))return i.get(s);const o=mc(s,e);if(e.resolveCatalogs){const u=uc(s);u&&bn(o,u)}$n(o,e.strict??!1,e.ignoreWarnings);const a={packageJson:o,path:s};return e.cache&&i.set(s,a),a},"findPackageJsonSync");J(async(t,e={})=>{const{cwd:r,...n}=e,s=ne(r??process.cwd());await Eh(mo(s,"package.json"),t,n)},"writePackageJson");J((t,e={})=>{const{cwd:r,...n}=e,s=ne(r??process.cwd());Oh(mo(s,"package.json"),t,n)},"writePackageJsonSync");const Gm=J((t,e)=>{const r=typeof t=="object"&&!Array.isArray(t);if(!r&&typeof t!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");let n,s=!1,i;if(r)n=structuredClone(t);else if(cc(t)){i=t;const a=e?.cache&&typeof e.cache!="boolean"?e.cache:Yr;if(e?.cache&&a.has(i))return a.get(i);n=mc(i,e),s=!0}else n=st(t);if(e?.resolveCatalogs)if(s){const a=uc(t);a&&bn(n,a)}else throw new Error("The 'resolveCatalogs' option can only be used on a file path.");$n(n,e?.strict??!1,e?.ignoreWarnings);const o=n;return s&&e?.cache&&(typeof e.cache=="boolean"?Yr:e.cache).set(i,o),o},"parsePackageJsonSync")
|
|
170
|
+
- `)}`),this.name="PackageJsonValidationError"}}const $n=J((t,e,r=[])=>{const n=[];if(G0(t,s=>{n.push(s)},e),e&&n.length>0){const s=n.filter(i=>!r.some(o=>o instanceof RegExp?o.test(i):o===i));if(s.length>0)throw new om(s)}return t},"normalizeInput"),am=J(async t=>await $r(t),"parseYamlFile"),um=J(t=>Fr(t),"parseYamlFileSync"),cm=J(async t=>{const e=await vs(t);return Eu.parse(e)},"parseJson5File"),lm=J(t=>{const e=As(t);return Eu.parse(e)},"parseJson5FileSync"),dc=J(async(t,e)=>e?.yaml!==!1&&(t.endsWith(".yaml")||t.endsWith(".yml"))?am(t):e?.json5!==!1&&t.endsWith(".json5")?cm(t):Jr(t),"parsePackageFile"),mc=J((t,e)=>e?.yaml!==!1&&(t.endsWith(".yaml")||t.endsWith(".yml"))?um(t):e?.json5!==!1&&t.endsWith(".json5")?lm(t):Xr(t),"parsePackageFileSync"),fm=J(async(t,e={})=>{const r={type:"file"};t&&(r.cwd=t);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");let s;for(const u of n)if(s=await bo(u,r),s)break;if(!s)throw new Jo(`No such file or directory, for ${n.join(", ").replace(hc," or $1")} found.`);const i=e.cache&&typeof e.cache!="boolean"?e.cache:pc;if(e.cache&&i.has(s))return i.get(s);const o=await dc(s,e);if(e.resolveCatalogs){const u=await ac(s);u&&bn(o,u)}$n(o,e.strict??!1,e.ignoreWarnings);const a={packageJson:o,path:s};return e.cache&&i.set(s,a),a},"findPackageJson");J((t,e={})=>{const r={type:"file"};t&&(r.cwd=t);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");let s;for(const u of n)if(s=Ao(u,r),s)break;if(!s)throw new Jo(`No such file or directory, for ${n.join(", ").replace(hc," or $1")} found.`);const i=e.cache&&typeof e.cache!="boolean"?e.cache:pc;if(e.cache&&i.has(s))return i.get(s);const o=mc(s,e);if(e.resolveCatalogs){const u=uc(s);u&&bn(o,u)}$n(o,e.strict??!1,e.ignoreWarnings);const a={packageJson:o,path:s};return e.cache&&i.set(s,a),a},"findPackageJsonSync");J(async(t,e={})=>{const{cwd:r,...n}=e,s=ne(r??process.cwd());await Eh(mo(s,"package.json"),t,n)},"writePackageJson");J((t,e={})=>{const{cwd:r,...n}=e,s=ne(r??process.cwd());Oh(mo(s,"package.json"),t,n)},"writePackageJsonSync");const Gm=J((t,e)=>{const r=typeof t=="object"&&!Array.isArray(t);if(!r&&typeof t!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");let n,s=!1,i;if(r)n=structuredClone(t);else if(cc(t)){i=t;const a=e?.cache&&typeof e.cache!="boolean"?e.cache:Yr;if(e?.cache&&a.has(i))return a.get(i);n=mc(i,e),s=!0}else n=st(t);if(e?.resolveCatalogs)if(s){const a=uc(t);a&&bn(n,a)}else throw new Error("The 'resolveCatalogs' option can only be used on a file path.");$n(n,e?.strict??!1,e?.ignoreWarnings);const o=n;return s&&e?.cache&&(typeof e.cache=="boolean"?Yr:e.cache).set(i,o),o},"parsePackageJsonSync"),Um=J(async(t,e)=>{const r=typeof t=="object"&&!Array.isArray(t);if(!r&&typeof t!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");let n,s=!1,i;if(r)n=structuredClone(t);else if(cc(t)){i=t;const a=e?.cache&&typeof e.cache!="boolean"?e.cache:Yr;if(e?.cache&&a.has(i))return a.get(i);n=await dc(i,e),s=!0}else n=st(t);if(e?.resolveCatalogs)if(s){const a=await ac(t);a&&bn(n,a)}else throw new Error("The 'resolveCatalogs' option can only be used on a file path.");$n(n,e?.strict??!1,e?.ignoreWarnings);const o=n;return s&&e?.cache&&(typeof e.cache=="boolean"?Yr:e.cache).set(i,o),o},"parsePackageJson");J((t,e,r)=>Ce(t,e,r),"getPackageJsonProperty");J((t,e)=>_e(t,e),"hasPackageJsonProperty");J((t,e,r)=>{const n=Ce(t,"dependencies",{}),s=Ce(t,"devDependencies",{}),i=Ce(t,"peerDependencies",{}),o={...n,...s,...r?.peerDeps===!1?{}:i};for(const a of e)if(_e(o,a))return!0;return!1},"hasPackageJsonAnyDependency");J(async(t,e,r="dependencies",n={})=>{const s=Ce(t,"dependencies",{}),i=Ce(t,"devDependencies",{}),o=Ce(t,"peerDependencies",{}),a=[],u={deps:!0,devDeps:!0,peerDeps:!1,...n};for(const l of e)u.deps&&_e(s,l)||u.devDeps&&_e(i,l)||u.peerDeps&&_e(o,l)||a.push(l);if(a.length!==0){if(process.env.CI||sm&&!process.stdout.isTTY){const l=`Skipping package installation for [${e.join(", ")}] because the process is not interactive.`;if(n.throwOnWarn)throw new Error(l);n.logger?.warn?n.logger.warn(l):console.warn(l);return}if(typeof u.confirm?.message=="function"&&(u.confirm.message=u.confirm.message(a)),u.confirm?.message===void 0){const l=`${a.length===1?"Package is":"Packages are"} required for this config: ${a.join(", ")}. Do you want to install them?`;u.confirm===void 0?u.confirm={message:l}:u.confirm.message=l}await nm(u.confirm)&&await bc(a,{...u.installPackage,cwd:u.cwd?ne(u.cwd):void 0,dev:r==="devDependencies"})}},"ensurePackages");var hm=Object.defineProperty,pm=h((t,e)=>hm(t,"name",{value:e,configurable:!0}),"b"),dm=Object.defineProperty,mm=pm((t,e)=>dm(t,"name",{value:e,configurable:!0}),"h"),gm=Object.defineProperty,ts=mm((t,e)=>gm(t,"name",{value:e,configurable:!0}),"a");let fo;const Dm=new Map,qm=ts((t,e,r,n)=>{const{ignoreSideEffectsForRoot:s,...i}=t;fo??=new Cc({...i,roots:[...i.roots??[],e],tsconfig:n?{configFile:n,references:"auto"}:void 0});const o=fo;return{name:"oxc-resolve",resolveId:{async handler(a,u,l){const{isEntry:f}=l,g=f||!u?he(a):he(u),{error:m,path:v}=await o.async(g,a);if(m){r.debug(m,{context:[{basedir:e,extensions:i.extensions,id:v}]});return}let $=ts(F=>!1,"hasModuleSideEffects");try{const{packageJson:F,path:E}=await fm(he(v),{cache:Dm}),d=he(E);if(!s||e!==d){const c=F.sideEffects;if(typeof c=="boolean")$=ts(()=>c,"hasModuleSideEffects");else if(Array.isArray(c)){const D=c.map(y=>y.includes("/")?y:`**/${y}`);$=Dc(D,void 0,{resolve:d})}}}catch(F){const E=F instanceof Error?F.message:String(F);console.debug(E,{context:[{basedir:g,caller:"Resolver",error:F,extensions:i.extensions,id:v}]})}const b=await this.resolve(v,u,{skipSelf:!0,...l});if(b)return b.external?!1:b.id!==v?b:{id:v,meta:b.meta,moduleSideEffects:$(v)}},order:"post"}}},"oxcResolvePlugin");export{As as $,Eu as B,hr as C,qm as I,Um as N,vs as a,$u as b,d0 as c,Cu as d,m0 as e,Ft as f,Au as g,g0 as h,ke as i,y0 as j,b0 as k,G0 as l,ah as m,Be as n,fm as o,Gm as p,vu as q,D0 as r};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/packem",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.81",
|
|
4
4
|
"description": "A fast and modern bundler for Node.js and TypeScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -174,9 +174,9 @@
|
|
|
174
174
|
"@clack/prompts": "1.5.0",
|
|
175
175
|
"@rollup/pluginutils": "5.4.0",
|
|
176
176
|
"@visulima/cerebro": "3.0.0-alpha.25",
|
|
177
|
-
"@visulima/packem-share": "1.0.0-alpha.
|
|
178
|
-
"@visulima/rollup-plugin-css": "1.0.0-alpha.
|
|
179
|
-
"@visulima/rollup-plugin-dts": "1.0.0-alpha.
|
|
177
|
+
"@visulima/packem-share": "1.0.0-alpha.48",
|
|
178
|
+
"@visulima/rollup-plugin-css": "1.0.0-alpha.48",
|
|
179
|
+
"@visulima/rollup-plugin-dts": "1.0.0-alpha.29",
|
|
180
180
|
"@visulima/tsconfig": "3.0.0-alpha.24",
|
|
181
181
|
"browserslist": "4.28.2",
|
|
182
182
|
"cjs-module-lexer": "2.2.0",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"@swc/core": ">=1.15.40",
|
|
196
196
|
"@tailwindcss/node": "4.3.0",
|
|
197
197
|
"@tailwindcss/oxide": "4.3.0",
|
|
198
|
-
"@visulima/packem-rollup": "1.0.0-alpha.
|
|
198
|
+
"@visulima/packem-rollup": "1.0.0-alpha.68",
|
|
199
199
|
"cssnano": ">=8.0.1",
|
|
200
200
|
"esbuild": ">=0.28.0",
|
|
201
201
|
"icss-utils": ">=5.1.0",
|