@gjsify/cli 0.64.7 → 0.64.9
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/cli.gjs.mjs +2 -2
- package/lib/utils/ship/entry-interpreter.js +5 -1
- package/package.json +20 -20
package/dist/cli.gjs.mjs
CHANGED
|
@@ -145,7 +145,7 @@ fi
|
|
|
145
145
|
`)}`:``;n.fail(N(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(C).length,Object.keys(C).join(`, `)+S))}},F.unknownArguments=function unknownArguments(S,C,I,H,W=!0){let q=t.getInternalMethods().getCommandInstance().getCommands(),Y=[],X=t.getInternalMethods().getContext();if(Object.keys(S).forEach(n=>{!Sp.includes(n)&&!Object.prototype.hasOwnProperty.call(I,n)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),n)&&!F.isValidAndSomeAliasIsNotNew(n,C)&&Y.push(n)}),W&&(X.commands.length>0||q.length>0||H)&&S._.slice(X.commands.length).forEach(t=>{q.includes(``+t)||Y.push(``+t)}),W){let n=t.getDemandedCommands()._?.max||0,C=X.commands.length+n;C<S._.length&&S._.slice(C).forEach(t=>{t=String(t),!X.commands.includes(t)&&!Y.includes(t)&&Y.push(t)})}Y.length&&n.fail(N(`Unknown argument: %s`,`Unknown arguments: %s`,Y.length,Y.map(t=>t.trim()?t:`"${t}"`).join(`, `)))},F.unknownCommands=function unknownCommands(S){let C=t.getInternalMethods().getCommandInstance().getCommands(),F=[],I=t.getInternalMethods().getContext();return(I.commands.length>0||C.length>0)&&S._.slice(I.commands.length).forEach(t=>{C.includes(``+t)||F.push(``+t)}),F.length>0?(n.fail(N(`Unknown command: %s`,`Unknown commands: %s`,F.length,F.join(`, `))),!0):!1},F.isValidAndSomeAliasIsNotNew=function isValidAndSomeAliasIsNotNew(n,S){if(!Object.prototype.hasOwnProperty.call(S,n))return!1;let C=t.parsed.newAliases;return[n,...S[n]].some(t=>!Object.prototype.hasOwnProperty.call(C,t)||!C[n])},F.limitedChoices=function limitedChoices(S){let N=t.getOptions(),F={};if(!Object.keys(N.choices).length)return;Object.keys(S).forEach(t=>{Sp.indexOf(t)===-1&&Object.prototype.hasOwnProperty.call(N.choices,t)&&[].concat(S[t]).forEach(n=>{N.choices[t].indexOf(n)===-1&&n!==void 0&&(F[t]=(F[t]||[]).concat(n))})});let I=Object.keys(F);if(!I.length)return;let H=C(`Invalid values:`);I.forEach(t=>{H+=`\n ${C(`Argument: %s, Given: %s, Choices: %s`,t,n.stringifiedValues(F[t]),n.stringifiedValues(N.choices[t]))}`}),n.fail(H)};let I={};F.implies=function implies(n,C){argsert(`<string|object> [array|number|string]`,[n,C],arguments.length),typeof n==`object`?Object.keys(n).forEach(t=>{F.implies(t,n[t])}):(t.global(n),I[n]||(I[n]=[]),Array.isArray(C)?C.forEach(t=>F.implies(n,t)):(assertNotStrictEqual(C,void 0,S),I[n].push(C)))},F.getImplied=function getImplied(){return I};function keyExists(t,n){let S=Number(n);return n=isNaN(S)?n:S,typeof n==`number`?n=t._.length>=n:n.match(/^--no-.+/)?(n=n.match(/^--no-(.+)/)[1],n=!Object.prototype.hasOwnProperty.call(t,n)):n=Object.prototype.hasOwnProperty.call(t,n),n}F.implications=function implications(t){let S=[];if(Object.keys(I).forEach(n=>{let C=n;(I[n]||[]).forEach(n=>{let N=C,F=n;N=keyExists(t,N),n=keyExists(t,n),N&&!n&&S.push(` ${C} -> ${F}`)})}),S.length){let t=`${C(`Implications failed:`)}\n`;S.forEach(n=>{t+=n}),n.fail(t)}};let H={};F.conflicts=function conflicts(n,S){argsert(`<string|object> [array|string]`,[n,S],arguments.length),typeof n==`object`?Object.keys(n).forEach(t=>{F.conflicts(t,n[t])}):(t.global(n),H[n]||(H[n]=[]),Array.isArray(S)?S.forEach(t=>F.conflicts(n,t)):H[n].push(S))},F.getConflicting=()=>H,F.conflicting=function conflictingFn(N){Object.keys(N).forEach(t=>{H[t]&&H[t].forEach(S=>{S&&N[t]!==void 0&&N[S]!==void 0&&n.fail(C(`Arguments %s and %s are mutually exclusive`,t,S))})}),t.getInternalMethods().getParserConfiguration()[`strip-dashed`]&&Object.keys(H).forEach(t=>{H[t].forEach(F=>{F&&N[S.Parser.camelCase(t)]!==void 0&&N[S.Parser.camelCase(F)]!==void 0&&n.fail(C(`Arguments %s and %s are mutually exclusive`,t,F))})})},F.recommendCommands=function recommendCommands(t,S){S=S.sort((t,n)=>n.length-t.length);let N=null,F=1/0;for(let n=0,C;(C=S[n])!==void 0;n++){let n=levenshtein(t,C);n<=3&&n<F&&(F=n,N=C)}N&&n.fail(C(`Did you mean %s?`,N))},F.reset=function reset(t){return I=objFilter(I,n=>!t[n]),H=objFilter(H,n=>!t[n]),F};let W=[];return F.freeze=function freeze(){W.push({implied:I,conflicting:H})},F.unfreeze=function unfreeze(){let t=W.pop();assertNotStrictEqual(t,void 0,S),{implied:I,conflicting:H}=t},F}var Sp,Cp=__esmMin(()=>{sp(),rp(),xp(),pp(),Sp=[`$0`,`--`,`_`]});function YargsFactory(t){return(n=[],S=t.process.cwd(),C)=>{let N=new YargsInstance(n,S,C,t);return Object.defineProperty(N,"argv",{get:()=>N.parse(),enumerable:!0}),N.help(),N.version(),N}}function isYargsInstance(t){return!!t&&typeof t.getInternalMethods==`function`}var __classPrivateFieldSet,__classPrivateFieldGet,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,YargsInstance,Um=__esmMin(()=>{_e(),fp(),rp(),Tl(),hp(),sp(),bp(),Cp(),pp(),Ol(),lp(),ip(),up(),mp(),__classPrivateFieldSet=function(t,n,S,C,N){if(C===`m`)throw TypeError(`Private method is not writable`);if(C===`a`&&!N)throw TypeError(`Private accessor was defined without a setter`);if(typeof n==`function`?t!==n||!N:!n.has(t))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return C===`a`?N.call(t,S):N?N.value=S:n.set(t,S),S},__classPrivateFieldGet=function(t,n,S,C){if(S===`a`&&!C)throw TypeError(`Private accessor was defined without a getter`);if(typeof n==`function`?t!==n||!C:!n.has(t))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return S===`m`?C:S===`a`?C.call(t):C?C.value:n.get(t)},om=Symbol(`copyDoubleDash`),sm=Symbol(`copyDoubleDash`),cm=Symbol(`deleteFromParserHintObject`),lm=Symbol(`emitWarning`),um=Symbol(`freeze`),dm=Symbol(`getDollarZero`),fm=Symbol(`getParserConfiguration`),pm=Symbol(`getUsageConfiguration`),mm=Symbol(`guessLocale`),hm=Symbol(`guessVersion`),gm=Symbol(`parsePositionalNumbers`),_m=Symbol(`pkgUp`),vm=Symbol(`populateParserHintArray`),ym=Symbol(`populateParserHintSingleValueDictionary`),bm=Symbol(`populateParserHintArrayDictionary`),xm=Symbol(`populateParserHintDictionary`),Sm=Symbol(`sanitizeKey`),Cm=Symbol(`setKey`),wm=Symbol(`unfreeze`),Tm=Symbol(`validateAsync`),Em=Symbol(`getCommandInstance`),Dm=Symbol(`getContext`),Om=Symbol(`getHasOutput`),km=Symbol(`getLoggerInstance`),Am=Symbol(`getParseContext`),jm=Symbol(`getUsageInstance`),Mm=Symbol(`getValidationInstance`),Nm=Symbol(`hasParseCallback`),Pm=Symbol(`isGlobalContext`),Fm=Symbol(`postProcess`),Im=Symbol(`rebase`),Lm=Symbol(`reset`),Rm=Symbol(`runYargsParserAndExecuteCommands`),zm=Symbol(`runValidation`),Bm=Symbol(`setHasOutput`),Vm=Symbol(`kTrackManuallySetKeys`),Hm=`en_US`,YargsInstance=class{constructor(t=[],n,S,C){this.customScriptName=!1,this.parsed=!1,wp.set(this,void 0),Tp.set(this,void 0),Ep.set(this,{commands:[],fullCommands:[]}),Dp.set(this,null),Op.set(this,null),kp.set(this,`show-hidden`),Ap.set(this,null),jp.set(this,!0),Mp.set(this,{}),Np.set(this,!0),Pp.set(this,[]),Fp.set(this,void 0),Ip.set(this,{}),Lp.set(this,!1),Rp.set(this,null),zp.set(this,!0),Bp.set(this,void 0),Vp.set(this,``),Hp.set(this,void 0),Up.set(this,void 0),Wp.set(this,{}),Gp.set(this,null),Kp.set(this,null),qp.set(this,{}),Jp.set(this,{}),Yp.set(this,void 0),Xp.set(this,!1),Zp.set(this,void 0),Qp.set(this,!1),$p.set(this,!1),em.set(this,!1),tm.set(this,void 0),nm.set(this,{}),im.set(this,null),am.set(this,void 0),__classPrivateFieldSet(this,Zp,C,`f`),__classPrivateFieldSet(this,Yp,t,`f`),__classPrivateFieldSet(this,Tp,n,`f`),__classPrivateFieldSet(this,Up,S,`f`),__classPrivateFieldSet(this,Fp,new GlobalMiddleware(this),`f`),this.$0=this[dm](),this[Lm](),__classPrivateFieldSet(this,wp,__classPrivateFieldGet(this,wp,`f`),`f`),__classPrivateFieldSet(this,tm,__classPrivateFieldGet(this,tm,`f`),`f`),__classPrivateFieldSet(this,am,__classPrivateFieldGet(this,am,`f`),`f`),__classPrivateFieldSet(this,Hp,__classPrivateFieldGet(this,Hp,`f`),`f`),__classPrivateFieldGet(this,Hp,`f`).showHiddenOpt=__classPrivateFieldGet(this,kp,`f`),__classPrivateFieldSet(this,Bp,this[sm](),`f`),__classPrivateFieldGet(this,Zp,`f`).y18n.setLocale(Hm)}addHelpOpt(t,n){return argsert(`[string|boolean] [string]`,[t,n],arguments.length),__classPrivateFieldGet(this,Rp,`f`)&&(this[cm](__classPrivateFieldGet(this,Rp,`f`)),__classPrivateFieldSet(this,Rp,null,`f`)),t===!1&&n===void 0?this:(__classPrivateFieldSet(this,Rp,typeof t==`string`?t:`help`,`f`),this.boolean(__classPrivateFieldGet(this,Rp,`f`)),this.describe(__classPrivateFieldGet(this,Rp,`f`),n||__classPrivateFieldGet(this,tm,`f`).deferY18nLookup(`Show help`)),this)}help(t,n){return this.addHelpOpt(t,n)}addShowHiddenOpt(t,n){if(argsert(`[string|boolean] [string]`,[t,n],arguments.length),t===!1&&n===void 0)return this;let S=typeof t==`string`?t:__classPrivateFieldGet(this,kp,`f`);return this.boolean(S),this.describe(S,n||__classPrivateFieldGet(this,tm,`f`).deferY18nLookup(`Show hidden options`)),__classPrivateFieldGet(this,Hp,`f`).showHiddenOpt=S,this}showHidden(t,n){return this.addShowHiddenOpt(t,n)}alias(t,n){return argsert(`<object|string|array> [string|array]`,[t,n],arguments.length),this[bm](this.alias.bind(this),`alias`,t,n),this}array(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`array`,t),this[Vm](t),this}boolean(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`boolean`,t),this[Vm](t),this}check(t,n){return argsert(`<function> [boolean]`,[t,n],arguments.length),this.middleware((n,S)=>maybeAsyncResult(()=>t(n,S.getOptions()),S=>(S?(typeof S==`string`||S instanceof Error)&&__classPrivateFieldGet(this,tm,`f`).fail(S.toString(),S):__classPrivateFieldGet(this,tm,`f`).fail(__classPrivateFieldGet(this,Zp,`f`).y18n.__(`Argument check failed: %s`,t.toString())),n),t=>(__classPrivateFieldGet(this,tm,`f`).fail(t.message?t.message:t.toString(),t),n)),!1,n),this}choices(t,n){return argsert(`<object|string|array> [string|array]`,[t,n],arguments.length),this[bm](this.choices.bind(this),`choices`,t,n),this}coerce(t,n){if(argsert(`<object|string|array> [function]`,[t,n],arguments.length),Array.isArray(t)){if(!n)throw new wl(`coerce callback must be provided`);for(let S of t)this.coerce(S,n);return this}else if(typeof t==`object`){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!n)throw new wl(`coerce callback must be provided`);let S=t;return __classPrivateFieldGet(this,Hp,`f`).key[S]=!0,__classPrivateFieldGet(this,Fp,`f`).addCoerceMiddleware((t,C)=>{let N=C.getAliases()[S]??[],F=[S,...N].filter(n=>Object.prototype.hasOwnProperty.call(t,n));return F.length===0?t:maybeAsyncResult(()=>n(t[F[0]]),n=>(F.forEach(S=>{t[S]=n}),t),t=>{throw new wl(t.message)})},S),this}conflicts(t,n){return argsert(`<string|object> [string|array]`,[t,n],arguments.length),__classPrivateFieldGet(this,am,`f`).conflicts(t,n),this}config(t=`config`,n,S){return argsert(`[object|string] [string|function] [function]`,[t,n,S],arguments.length),typeof t==`object`&&!Array.isArray(t)?(t=applyExtends(t,__classPrivateFieldGet(this,Tp,`f`),this[fm]()[`deep-merge-config`]||!1,__classPrivateFieldGet(this,Zp,`f`)),__classPrivateFieldGet(this,Hp,`f`).configObjects=(__classPrivateFieldGet(this,Hp,`f`).configObjects||[]).concat(t),this):(typeof n==`function`&&(S=n,n=void 0),this.describe(t,n||__classPrivateFieldGet(this,tm,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(t)?t:[t]).forEach(t=>{__classPrivateFieldGet(this,Hp,`f`).config[t]=S||!0}),this)}completion(t,n,S){return argsert(`[string] [string|boolean|function] [function]`,[t,n,S],arguments.length),typeof n==`function`&&(S=n,n=void 0),__classPrivateFieldSet(this,Op,t||__classPrivateFieldGet(this,Op,`f`)||`completion`,`f`),!n&&n!==!1&&(n=`generate completion script`),this.command(__classPrivateFieldGet(this,Op,`f`),n),S&&__classPrivateFieldGet(this,Dp,`f`).registerFunction(S),this}command(t,n,S,C,N,F){return argsert(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[t,n,S,C,N,F],arguments.length),__classPrivateFieldGet(this,wp,`f`).addHandler(t,n,S,C,N,F),this}commands(t,n,S,C,N,F){return this.command(t,n,S,C,N,F)}commandDir(t,n){argsert(`<string> [object]`,[t,n],arguments.length);let S=__classPrivateFieldGet(this,Up,`f`)||__classPrivateFieldGet(this,Zp,`f`).require;return __classPrivateFieldGet(this,wp,`f`).addDirectory(t,S,__classPrivateFieldGet(this,Zp,`f`).getCallerFile(),n),this}count(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`count`,t),this[Vm](t),this}default(t,n,S){return argsert(`<object|string|array> [*] [string]`,[t,n,S],arguments.length),S&&(assertSingleKey(t,__classPrivateFieldGet(this,Zp,`f`)),__classPrivateFieldGet(this,Hp,`f`).defaultDescription[t]=S),typeof n==`function`&&(assertSingleKey(t,__classPrivateFieldGet(this,Zp,`f`)),__classPrivateFieldGet(this,Hp,`f`).defaultDescription[t]||(__classPrivateFieldGet(this,Hp,`f`).defaultDescription[t]=__classPrivateFieldGet(this,tm,`f`).functionDescription(n)),n=n.call()),this[ym](this.default.bind(this),`default`,t,n),this}defaults(t,n,S){return this.default(t,n,S)}demandCommand(t=1,n,S,C){return argsert(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[t,n,S,C],arguments.length),typeof n!=`number`&&(S=n,n=1/0),this.global(`_`,!1),__classPrivateFieldGet(this,Hp,`f`).demandedCommands._={min:t,max:n,minMsg:S,maxMsg:C},this}demand(t,n,S){return Array.isArray(n)?(n.forEach(t=>{assertNotStrictEqual(S,!0,__classPrivateFieldGet(this,Zp,`f`)),this.demandOption(t,S)}),n=1/0):typeof n!=`number`&&(S=n,n=1/0),typeof t==`number`?(assertNotStrictEqual(S,!0,__classPrivateFieldGet(this,Zp,`f`)),this.demandCommand(t,n,S,S)):Array.isArray(t)?t.forEach(t=>{assertNotStrictEqual(S,!0,__classPrivateFieldGet(this,Zp,`f`)),this.demandOption(t,S)}):typeof S==`string`?this.demandOption(t,S):(S===!0||S===void 0)&&this.demandOption(t),this}demandOption(t,n){return argsert(`<object|string|array> [string]`,[t,n],arguments.length),this[ym](this.demandOption.bind(this),`demandedOptions`,t,n),this}deprecateOption(t,n){return argsert(`<string> [string|boolean]`,[t,n],arguments.length),__classPrivateFieldGet(this,Hp,`f`).deprecatedOptions[t]=n,this}describe(t,n){return argsert(`<object|string|array> [string]`,[t,n],arguments.length),this[Cm](t,!0),__classPrivateFieldGet(this,tm,`f`).describe(t,n),this}detectLocale(t){return argsert(`<boolean>`,[t],arguments.length),__classPrivateFieldSet(this,jp,t,`f`),this}env(t){return argsert(`[string|boolean]`,[t],arguments.length),t===!1?delete __classPrivateFieldGet(this,Hp,`f`).envPrefix:__classPrivateFieldGet(this,Hp,`f`).envPrefix=t||``,this}epilogue(t){return argsert(`<string>`,[t],arguments.length),__classPrivateFieldGet(this,tm,`f`).epilog(t),this}epilog(t){return this.epilogue(t)}example(t,n){return argsert(`<string|array> [string]`,[t,n],arguments.length),Array.isArray(t)?t.forEach(t=>this.example(...t)):__classPrivateFieldGet(this,tm,`f`).example(t,n),this}exit(t,n){__classPrivateFieldSet(this,Lp,!0,`f`),__classPrivateFieldSet(this,Ap,n,`f`),__classPrivateFieldGet(this,Np,`f`)&&__classPrivateFieldGet(this,Zp,`f`).process.exit(t)}exitProcess(t=!0){return argsert(`[boolean]`,[t],arguments.length),__classPrivateFieldSet(this,Np,t,`f`),this}fail(t){if(argsert(`<function|boolean>`,[t],arguments.length),typeof t==`boolean`&&t!==!1)throw new wl(`Invalid first argument. Expected function or boolean 'false'`);return __classPrivateFieldGet(this,tm,`f`).failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,n){return argsert(`<array> [function]`,[t,n],arguments.length),n?__classPrivateFieldGet(this,Dp,`f`).getCompletion(t,n):new Promise((n,S)=>{__classPrivateFieldGet(this,Dp,`f`).getCompletion(t,(t,C)=>{t?S(t):n(C)})})}getDemandedOptions(){return argsert([],0),__classPrivateFieldGet(this,Hp,`f`).demandedOptions}getDemandedCommands(){return argsert([],0),__classPrivateFieldGet(this,Hp,`f`).demandedCommands}getDeprecatedOptions(){return argsert([],0),__classPrivateFieldGet(this,Hp,`f`).deprecatedOptions}getDetectLocale(){return __classPrivateFieldGet(this,jp,`f`)}getExitProcess(){return __classPrivateFieldGet(this,Np,`f`)}getGroups(){return Object.assign({},__classPrivateFieldGet(this,Ip,`f`),__classPrivateFieldGet(this,Jp,`f`))}getHelp(){if(__classPrivateFieldSet(this,Lp,!0,`f`),!__classPrivateFieldGet(this,tm,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[Rm](__classPrivateFieldGet(this,Yp,`f`),void 0,void 0,0,!0);if(isPromise(t))return t.then(()=>__classPrivateFieldGet(this,tm,`f`).help())}let t=__classPrivateFieldGet(this,wp,`f`).runDefaultBuilderOn(this);if(isPromise(t))return t.then(()=>__classPrivateFieldGet(this,tm,`f`).help())}return Promise.resolve(__classPrivateFieldGet(this,tm,`f`).help())}getOptions(){return __classPrivateFieldGet(this,Hp,`f`)}getStrict(){return __classPrivateFieldGet(this,Qp,`f`)}getStrictCommands(){return __classPrivateFieldGet(this,$p,`f`)}getStrictOptions(){return __classPrivateFieldGet(this,em,`f`)}global(t,n){return argsert(`<string|array> [boolean]`,[t,n],arguments.length),t=[].concat(t),n===!1?t.forEach(t=>{__classPrivateFieldGet(this,Hp,`f`).local.includes(t)||__classPrivateFieldGet(this,Hp,`f`).local.push(t)}):__classPrivateFieldGet(this,Hp,`f`).local=__classPrivateFieldGet(this,Hp,`f`).local.filter(n=>t.indexOf(n)===-1),this}group(t,n){argsert(`<string|array> <string>`,[t,n],arguments.length);let S=__classPrivateFieldGet(this,Jp,`f`)[n]||__classPrivateFieldGet(this,Ip,`f`)[n];__classPrivateFieldGet(this,Jp,`f`)[n]&&delete __classPrivateFieldGet(this,Jp,`f`)[n];let C={};return __classPrivateFieldGet(this,Ip,`f`)[n]=(S||[]).concat(t).filter(t=>C[t]?!1:C[t]=!0),this}hide(t){return argsert(`<string>`,[t],arguments.length),__classPrivateFieldGet(this,Hp,`f`).hiddenOptions.push(t),this}implies(t,n){return argsert(`<string|object> [number|string|array]`,[t,n],arguments.length),__classPrivateFieldGet(this,am,`f`).implies(t,n),this}locale(t){return argsert(`[string]`,[t],arguments.length),t===void 0?(this[mm](),__classPrivateFieldGet(this,Zp,`f`).y18n.getLocale()):(__classPrivateFieldSet(this,jp,!1,`f`),__classPrivateFieldGet(this,Zp,`f`).y18n.setLocale(t),this)}middleware(t,n,S){return __classPrivateFieldGet(this,Fp,`f`).addMiddleware(t,!!n,S)}nargs(t,n){return argsert(`<string|object|array> [number]`,[t,n],arguments.length),this[ym](this.nargs.bind(this),`narg`,t,n),this}normalize(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`normalize`,t),this}number(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`number`,t),this[Vm](t),this}option(t,n){if(argsert(`<string|object> [object]`,[t,n],arguments.length),typeof t==`object`)Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof n!=`object`&&(n={}),this[Vm](t),__classPrivateFieldGet(this,im,`f`)&&(t===`version`||n?.alias===`version`)&&this[lm]([`"version" is a reserved word.`,`Please do one of the following:`,'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)",`- Use a different option key`,`https://yargs.js.org/docs/#api-reference-version`].join(`
|
|
146
146
|
`),void 0,`versionWarning`),__classPrivateFieldGet(this,Hp,`f`).key[t]=!0,n.alias&&this.alias(t,n.alias);let S=n.deprecate||n.deprecated;S&&this.deprecateOption(t,S);let C=n.demand||n.required||n.require;C&&this.demand(t,C),n.demandOption&&this.demandOption(t,typeof n.demandOption==`string`?n.demandOption:void 0),n.conflicts&&this.conflicts(t,n.conflicts),`default`in n&&this.default(t,n.default),n.implies!==void 0&&this.implies(t,n.implies),n.nargs!==void 0&&this.nargs(t,n.nargs),n.config&&this.config(t,n.configParser),n.normalize&&this.normalize(t),n.choices&&this.choices(t,n.choices),n.coerce&&this.coerce(t,n.coerce),n.group&&this.group(t,n.group),(n.boolean||n.type===`boolean`)&&(this.boolean(t),n.alias&&this.boolean(n.alias)),(n.array||n.type===`array`)&&(this.array(t),n.alias&&this.array(n.alias)),(n.number||n.type===`number`)&&(this.number(t),n.alias&&this.number(n.alias)),(n.string||n.type===`string`)&&(this.string(t),n.alias&&this.string(n.alias)),(n.count||n.type===`count`)&&this.count(t),typeof n.global==`boolean`&&this.global(t,n.global),n.defaultDescription&&(__classPrivateFieldGet(this,Hp,`f`).defaultDescription[t]=n.defaultDescription),n.skipValidation&&this.skipValidation(t);let N=n.describe||n.description||n.desc,F=__classPrivateFieldGet(this,tm,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(F,t)||typeof N==`string`)&&this.describe(t,N),n.hidden&&this.hide(t),n.requiresArg&&this.requiresArg(t)}return this}options(t,n){return this.option(t,n)}parse(t,n,S){argsert(`[string|array] [function|boolean|object] [function]`,[t,n,S],arguments.length),this[um](),t===void 0&&(t=__classPrivateFieldGet(this,Yp,`f`)),typeof n==`object`&&(__classPrivateFieldSet(this,Kp,n,`f`),n=S),typeof n==`function`&&(__classPrivateFieldSet(this,Gp,n,`f`),n=!1),n||__classPrivateFieldSet(this,Yp,t,`f`),__classPrivateFieldGet(this,Gp,`f`)&&__classPrivateFieldSet(this,Np,!1,`f`);let C=this[Rm](t,!!n),N=this.parsed;return __classPrivateFieldGet(this,Dp,`f`).setParsed(this.parsed),isPromise(C)?C.then(t=>(__classPrivateFieldGet(this,Gp,`f`)&&__classPrivateFieldGet(this,Gp,`f`).call(this,__classPrivateFieldGet(this,Ap,`f`),t,__classPrivateFieldGet(this,Vp,`f`)),t)).catch(t=>{throw __classPrivateFieldGet(this,Gp,`f`)&&__classPrivateFieldGet(this,Gp,`f`)(t,this.parsed.argv,__classPrivateFieldGet(this,Vp,`f`)),t}).finally(()=>{this[wm](),this.parsed=N}):(__classPrivateFieldGet(this,Gp,`f`)&&__classPrivateFieldGet(this,Gp,`f`).call(this,__classPrivateFieldGet(this,Ap,`f`),C,__classPrivateFieldGet(this,Vp,`f`)),this[wm](),this.parsed=N,C)}parseAsync(t,n,S){let C=this.parse(t,n,S);return isPromise(C)?C:Promise.resolve(C)}parseSync(t,n,S){let C=this.parse(t,n,S);if(isPromise(C))throw new wl(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return C}parserConfiguration(t){return argsert(`<object>`,[t],arguments.length),__classPrivateFieldSet(this,Wp,t,`f`),this}pkgConf(t,n){argsert(`<string> [string]`,[t,n],arguments.length);let S=null,C=this[_m](n||__classPrivateFieldGet(this,Tp,`f`));return C[t]&&typeof C[t]==`object`&&(S=applyExtends(C[t],n||__classPrivateFieldGet(this,Tp,`f`),this[fm]()[`deep-merge-config`]||!1,__classPrivateFieldGet(this,Zp,`f`)),__classPrivateFieldGet(this,Hp,`f`).configObjects=(__classPrivateFieldGet(this,Hp,`f`).configObjects||[]).concat(S)),this}positional(t,n){argsert(`<string> <object>`,[t,n],arguments.length);let S=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];n=objFilter(n,(t,n)=>t===`type`&&![`string`,`number`,`boolean`].includes(n)?!1:S.includes(t));let C=__classPrivateFieldGet(this,Ep,`f`).fullCommands[__classPrivateFieldGet(this,Ep,`f`).fullCommands.length-1],N=C?__classPrivateFieldGet(this,wp,`f`).cmdToParseOptions(C):{array:[],alias:{},default:{},demand:{}};return objectKeys(N).forEach(S=>{let C=N[S];Array.isArray(C)?C.indexOf(t)!==-1&&(n[S]=!0):C[t]&&!(S in n)&&(n[S]=C[t])}),this.group(t,__classPrivateFieldGet(this,tm,`f`).getPositionalGroupName()),this.option(t,n)}recommendCommands(t=!0){return argsert(`[boolean]`,[t],arguments.length),__classPrivateFieldSet(this,Xp,t,`f`),this}required(t,n,S){return this.demand(t,n,S)}require(t,n,S){return this.demand(t,n,S)}requiresArg(t){return argsert(`<array|string|object> [number]`,[t],arguments.length),typeof t==`string`&&__classPrivateFieldGet(this,Hp,`f`).narg[t]||this[ym](this.requiresArg.bind(this),`narg`,t,NaN),this}showCompletionScript(t,n){return argsert(`[string] [string]`,[t,n],arguments.length),t||=this.$0,__classPrivateFieldGet(this,Bp,`f`).log(__classPrivateFieldGet(this,Dp,`f`).generateCompletionScript(t,n||__classPrivateFieldGet(this,Op,`f`)||`completion`)),this}showHelp(t){if(argsert(`[string|function]`,[t],arguments.length),__classPrivateFieldSet(this,Lp,!0,`f`),!__classPrivateFieldGet(this,tm,`f`).hasCachedHelpMessage()){if(!this.parsed){let n=this[Rm](__classPrivateFieldGet(this,Yp,`f`),void 0,void 0,0,!0);if(isPromise(n))return n.then(()=>{__classPrivateFieldGet(this,tm,`f`).showHelp(t)}),this}let n=__classPrivateFieldGet(this,wp,`f`).runDefaultBuilderOn(this);if(isPromise(n))return n.then(()=>{__classPrivateFieldGet(this,tm,`f`).showHelp(t)}),this}return __classPrivateFieldGet(this,tm,`f`).showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,n){return argsert(`[boolean|string] [string]`,[t,n],arguments.length),__classPrivateFieldGet(this,tm,`f`).showHelpOnFail(t,n),this}showVersion(t){return argsert(`[string|function]`,[t],arguments.length),__classPrivateFieldGet(this,tm,`f`).showVersion(t),this}skipValidation(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`skipValidation`,t),this}strict(t){return argsert(`[boolean]`,[t],arguments.length),__classPrivateFieldSet(this,Qp,t!==!1,`f`),this}strictCommands(t){return argsert(`[boolean]`,[t],arguments.length),__classPrivateFieldSet(this,$p,t!==!1,`f`),this}strictOptions(t){return argsert(`[boolean]`,[t],arguments.length),__classPrivateFieldSet(this,em,t!==!1,`f`),this}string(t){return argsert(`<array|string>`,[t],arguments.length),this[vm](`string`,t),this[Vm](t),this}terminalWidth(){return argsert([],0),__classPrivateFieldGet(this,Zp,`f`).process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return argsert(`<object>`,[t],arguments.length),__classPrivateFieldSet(this,jp,!1,`f`),__classPrivateFieldGet(this,Zp,`f`).y18n.updateLocale(t),this}usage(t,n,S,C){if(argsert(`<string|null|undefined> [string|boolean] [function|object] [function]`,[t,n,S,C],arguments.length),n!==void 0){if(assertNotStrictEqual(t,null,__classPrivateFieldGet(this,Zp,`f`)),(t||``).match(/^\$0( |$)/))return this.command(t,n,S,C);throw new wl(`.usage() description must start with $0 if being used as alias for .command()`)}else return __classPrivateFieldGet(this,tm,`f`).usage(t),this}usageConfiguration(t){return argsert(`<object>`,[t],arguments.length),__classPrivateFieldSet(this,nm,t,`f`),this}version(t,n,S){let C=`version`;if(argsert(`[boolean|string] [string] [string]`,[t,n,S],arguments.length),__classPrivateFieldGet(this,im,`f`)&&(this[cm](__classPrivateFieldGet(this,im,`f`)),__classPrivateFieldGet(this,tm,`f`).version(void 0),__classPrivateFieldSet(this,im,null,`f`)),arguments.length===0)S=this[hm](),t=C;else if(arguments.length===1){if(t===!1)return this;S=t,t=C}else arguments.length===2&&(S=n,n=void 0);return __classPrivateFieldSet(this,im,typeof t==`string`?t:C,`f`),n||=__classPrivateFieldGet(this,tm,`f`).deferY18nLookup(`Show version number`),__classPrivateFieldGet(this,tm,`f`).version(S||void 0),this.boolean(__classPrivateFieldGet(this,im,`f`)),this.describe(__classPrivateFieldGet(this,im,`f`),n),this}wrap(t){return argsert(`<number|null|undefined>`,[t],arguments.length),__classPrivateFieldGet(this,tm,`f`).wrap(t),this}[(wp=new WeakMap,Tp=new WeakMap,Ep=new WeakMap,Dp=new WeakMap,Op=new WeakMap,kp=new WeakMap,Ap=new WeakMap,jp=new WeakMap,Mp=new WeakMap,Np=new WeakMap,Pp=new WeakMap,Fp=new WeakMap,Ip=new WeakMap,Lp=new WeakMap,Rp=new WeakMap,zp=new WeakMap,Bp=new WeakMap,Vp=new WeakMap,Hp=new WeakMap,Up=new WeakMap,Wp=new WeakMap,Gp=new WeakMap,Kp=new WeakMap,qp=new WeakMap,Jp=new WeakMap,Yp=new WeakMap,Xp=new WeakMap,Zp=new WeakMap,Qp=new WeakMap,$p=new WeakMap,em=new WeakMap,tm=new WeakMap,nm=new WeakMap,im=new WeakMap,am=new WeakMap,om)](t){if(!t._||!t[`--`])return t;t._.push.apply(t._,t[`--`]);try{delete t[`--`]}catch{}return t}[sm](){return{log:(...t)=>{this[Nm]()||ge.log(...t),__classPrivateFieldSet(this,Lp,!0,`f`),__classPrivateFieldGet(this,Vp,`f`).length&&__classPrivateFieldSet(this,Vp,__classPrivateFieldGet(this,Vp,`f`)+`
|
|
147
147
|
`,`f`),__classPrivateFieldSet(this,Vp,__classPrivateFieldGet(this,Vp,`f`)+t.join(` `),`f`)},error:(...t)=>{this[Nm]()||ge.error(...t),__classPrivateFieldSet(this,Lp,!0,`f`),__classPrivateFieldGet(this,Vp,`f`).length&&__classPrivateFieldSet(this,Vp,__classPrivateFieldGet(this,Vp,`f`)+`
|
|
148
|
-
`,`f`),__classPrivateFieldSet(this,Vp,__classPrivateFieldGet(this,Vp,`f`)+t.join(` `),`f`)}}}[cm](t){objectKeys(__classPrivateFieldGet(this,Hp,`f`)).forEach(n=>{if((t=>t===`configObjects`)(n))return;let S=__classPrivateFieldGet(this,Hp,`f`)[n];Array.isArray(S)?S.includes(t)&&S.splice(S.indexOf(t),1):typeof S==`object`&&delete S[t]}),delete __classPrivateFieldGet(this,tm,`f`).getDescriptions()[t]}[lm](t,n,S){__classPrivateFieldGet(this,Mp,`f`)[S]||(__classPrivateFieldGet(this,Zp,`f`).process.emitWarning(t,n),__classPrivateFieldGet(this,Mp,`f`)[S]=!0)}[um](){__classPrivateFieldGet(this,Pp,`f`).push({options:__classPrivateFieldGet(this,Hp,`f`),configObjects:__classPrivateFieldGet(this,Hp,`f`).configObjects.slice(0),exitProcess:__classPrivateFieldGet(this,Np,`f`),groups:__classPrivateFieldGet(this,Ip,`f`),strict:__classPrivateFieldGet(this,Qp,`f`),strictCommands:__classPrivateFieldGet(this,$p,`f`),strictOptions:__classPrivateFieldGet(this,em,`f`),completionCommand:__classPrivateFieldGet(this,Op,`f`),output:__classPrivateFieldGet(this,Vp,`f`),exitError:__classPrivateFieldGet(this,Ap,`f`),hasOutput:__classPrivateFieldGet(this,Lp,`f`),parsed:this.parsed,parseFn:__classPrivateFieldGet(this,Gp,`f`),parseContext:__classPrivateFieldGet(this,Kp,`f`)}),__classPrivateFieldGet(this,tm,`f`).freeze(),__classPrivateFieldGet(this,am,`f`).freeze(),__classPrivateFieldGet(this,wp,`f`).freeze(),__classPrivateFieldGet(this,Fp,`f`).freeze()}[dm](){let t=``,n;return n=/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this,Zp,`f`).process.argv()[0])?__classPrivateFieldGet(this,Zp,`f`).process.argv().slice(1,2):__classPrivateFieldGet(this,Zp,`f`).process.argv().slice(0,1),t=n.map(t=>{let n=this[Im](__classPrivateFieldGet(this,Tp,`f`),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&n.length<t.length?n:t}).join(` `).trim(),__classPrivateFieldGet(this,Zp,`f`).getEnv(`_`)&&__classPrivateFieldGet(this,Zp,`f`).getProcessArgvBin()===__classPrivateFieldGet(this,Zp,`f`).getEnv(`_`)&&(t=__classPrivateFieldGet(this,Zp,`f`).getEnv(`_`).replace(`${__classPrivateFieldGet(this,Zp,`f`).path.dirname(__classPrivateFieldGet(this,Zp,`f`).process.execPath())}/`,``)),t}[fm](){return __classPrivateFieldGet(this,Wp,`f`)}[pm](){return __classPrivateFieldGet(this,nm,`f`)}[mm](){if(!__classPrivateFieldGet(this,jp,`f`))return;let t=__classPrivateFieldGet(this,Zp,`f`).getEnv(`LC_ALL`)||__classPrivateFieldGet(this,Zp,`f`).getEnv(`LC_MESSAGES`)||__classPrivateFieldGet(this,Zp,`f`).getEnv(`LANG`)||__classPrivateFieldGet(this,Zp,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(t.replace(/[.:].*/,``))}[hm](){return this[_m]().version||`unknown`}[gm](t){let n=t[`--`]?t[`--`]:t._;for(let t=0,S;(S=n[t])!==void 0;t++)__classPrivateFieldGet(this,Zp,`f`).Parser.looksLikeNumber(S)&&Number.isSafeInteger(Math.floor(parseFloat(`${S}`)))&&(n[t]=Number(S));return t}[_m](t){let n=t||`*`;if(__classPrivateFieldGet(this,qp,`f`)[n])return __classPrivateFieldGet(this,qp,`f`)[n];let S={};try{let n=t||__classPrivateFieldGet(this,Zp,`f`).mainFilename;__classPrivateFieldGet(this,Zp,`f`).path.extname(n)&&(n=__classPrivateFieldGet(this,Zp,`f`).path.dirname(n));let C=__classPrivateFieldGet(this,Zp,`f`).findUp(n,(t,n)=>{if(n.includes(`package.json`))return`package.json`});assertNotStrictEqual(C,void 0,__classPrivateFieldGet(this,Zp,`f`)),S=JSON.parse(__classPrivateFieldGet(this,Zp,`f`).readFileSync(C,`utf8`))}catch{}return __classPrivateFieldGet(this,qp,`f`)[n]=S||{},__classPrivateFieldGet(this,qp,`f`)[n]}[vm](t,n){n=[].concat(n),n.forEach(n=>{n=this[Sm](n),__classPrivateFieldGet(this,Hp,`f`)[t].push(n)})}[ym](t,n,S,C){this[xm](t,n,S,C,(t,n,S)=>{__classPrivateFieldGet(this,Hp,`f`)[t][n]=S})}[bm](t,n,S,C){this[xm](t,n,S,C,(t,n,S)=>{__classPrivateFieldGet(this,Hp,`f`)[t][n]=(__classPrivateFieldGet(this,Hp,`f`)[t][n]||[]).concat(S)})}[xm](t,n,S,C,N){if(Array.isArray(S))S.forEach(n=>{t(n,C)});else if((t=>typeof t==`object`)(S))for(let n of objectKeys(S))t(n,S[n]);else N(n,this[Sm](S),C)}[Sm](t){return t===`__proto__`?`___proto___`:t}[Cm](t,n){return this[ym](this[Cm].bind(this),`key`,t,n),this}[wm](){var t,n,S,C,N,F,I,H,W,q,Y,X;let Z=__classPrivateFieldGet(this,Pp,`f`).pop();assertNotStrictEqual(Z,void 0,__classPrivateFieldGet(this,Zp,`f`));let te;t=this,n=this,S=this,C=this,N=this,F=this,I=this,H=this,W=this,q=this,Y=this,X=this,{options:{set value(n){__classPrivateFieldSet(t,Hp,n,`f`)}}.value,configObjects:te,exitProcess:{set value(t){__classPrivateFieldSet(n,Np,t,`f`)}}.value,groups:{set value(t){__classPrivateFieldSet(S,Ip,t,`f`)}}.value,output:{set value(t){__classPrivateFieldSet(C,Vp,t,`f`)}}.value,exitError:{set value(t){__classPrivateFieldSet(N,Ap,t,`f`)}}.value,hasOutput:{set value(t){__classPrivateFieldSet(F,Lp,t,`f`)}}.value,parsed:this.parsed,strict:{set value(t){__classPrivateFieldSet(I,Qp,t,`f`)}}.value,strictCommands:{set value(t){__classPrivateFieldSet(H,$p,t,`f`)}}.value,strictOptions:{set value(t){__classPrivateFieldSet(W,em,t,`f`)}}.value,completionCommand:{set value(t){__classPrivateFieldSet(q,Op,t,`f`)}}.value,parseFn:{set value(t){__classPrivateFieldSet(Y,Gp,t,`f`)}}.value,parseContext:{set value(t){__classPrivateFieldSet(X,Kp,t,`f`)}}.value}=Z,__classPrivateFieldGet(this,Hp,`f`).configObjects=te,__classPrivateFieldGet(this,tm,`f`).unfreeze(),__classPrivateFieldGet(this,am,`f`).unfreeze(),__classPrivateFieldGet(this,wp,`f`).unfreeze(),__classPrivateFieldGet(this,Fp,`f`).unfreeze()}[Tm](t,n){return maybeAsyncResult(n,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[Em].bind(this),getContext:this[Dm].bind(this),getHasOutput:this[Om].bind(this),getLoggerInstance:this[km].bind(this),getParseContext:this[Am].bind(this),getParserConfiguration:this[fm].bind(this),getUsageConfiguration:this[pm].bind(this),getUsageInstance:this[jm].bind(this),getValidationInstance:this[Mm].bind(this),hasParseCallback:this[Nm].bind(this),isGlobalContext:this[Pm].bind(this),postProcess:this[Fm].bind(this),reset:this[Lm].bind(this),runValidation:this[zm].bind(this),runYargsParserAndExecuteCommands:this[Rm].bind(this),setHasOutput:this[Bm].bind(this)}}[Em](){return __classPrivateFieldGet(this,wp,`f`)}[Dm](){return __classPrivateFieldGet(this,Ep,`f`)}[Om](){return __classPrivateFieldGet(this,Lp,`f`)}[km](){return __classPrivateFieldGet(this,Bp,`f`)}[Am](){return __classPrivateFieldGet(this,Kp,`f`)||{}}[jm](){return __classPrivateFieldGet(this,tm,`f`)}[Mm](){return __classPrivateFieldGet(this,am,`f`)}[Nm](){return!!__classPrivateFieldGet(this,Gp,`f`)}[Pm](){return __classPrivateFieldGet(this,zp,`f`)}[Fm](t,n,S,C){return S||isPromise(t)?t:(n||(t=this[om](t)),(this[fm]()[`parse-positional-numbers`]||this[fm]()[`parse-positional-numbers`]===void 0)&&(t=this[gm](t)),C&&(t=applyMiddleware(t,this,__classPrivateFieldGet(this,Fp,`f`).getMiddleware(),!1)),t)}[Lm](t={}){__classPrivateFieldSet(this,Hp,__classPrivateFieldGet(this,Hp,`f`)||{},`f`);let n={};n.local=__classPrivateFieldGet(this,Hp,`f`).local||[],n.configObjects=__classPrivateFieldGet(this,Hp,`f`).configObjects||[];let S={};return n.local.forEach(n=>{S[n]=!0,(t[n]||[]).forEach(t=>{S[t]=!0})}),Object.assign(__classPrivateFieldGet(this,Jp,`f`),Object.keys(__classPrivateFieldGet(this,Ip,`f`)).reduce((t,n)=>{let C=__classPrivateFieldGet(this,Ip,`f`)[n].filter(t=>!(t in S));return C.length>0&&(t[n]=C),t},{})),__classPrivateFieldSet(this,Ip,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(t=>{n[t]=(__classPrivateFieldGet(this,Hp,`f`)[t]||[]).filter(t=>!S[t])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(t=>{n[t]=objFilter(__classPrivateFieldGet(this,Hp,`f`)[t],t=>!S[t])}),n.envPrefix=__classPrivateFieldGet(this,Hp,`f`).envPrefix,__classPrivateFieldSet(this,Hp,n,`f`),__classPrivateFieldSet(this,tm,__classPrivateFieldGet(this,tm,`f`)?__classPrivateFieldGet(this,tm,`f`).reset(S):usage(this,__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldSet(this,am,__classPrivateFieldGet(this,am,`f`)?__classPrivateFieldGet(this,am,`f`).reset(S):validation(this,__classPrivateFieldGet(this,tm,`f`),__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldSet(this,wp,__classPrivateFieldGet(this,wp,`f`)?__classPrivateFieldGet(this,wp,`f`).reset():command(__classPrivateFieldGet(this,tm,`f`),__classPrivateFieldGet(this,am,`f`),__classPrivateFieldGet(this,Fp,`f`),__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldGet(this,Dp,`f`)||__classPrivateFieldSet(this,Dp,completion(this,__classPrivateFieldGet(this,tm,`f`),__classPrivateFieldGet(this,wp,`f`),__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldGet(this,Fp,`f`).reset(),__classPrivateFieldSet(this,Op,null,`f`),__classPrivateFieldSet(this,Vp,``,`f`),__classPrivateFieldSet(this,Ap,null,`f`),__classPrivateFieldSet(this,Lp,!1,`f`),this.parsed=!1,this}[Im](t,n){return __classPrivateFieldGet(this,Zp,`f`).path.relative(t,n)}[Rm](t,n,S,C=0,N=!1){let F=!!S||N;t||=__classPrivateFieldGet(this,Yp,`f`),__classPrivateFieldGet(this,Hp,`f`).__=__classPrivateFieldGet(this,Zp,`f`).y18n.__,__classPrivateFieldGet(this,Hp,`f`).configuration=this[fm]();let I=!!__classPrivateFieldGet(this,Hp,`f`).configuration[`populate--`],H=Object.assign({},__classPrivateFieldGet(this,Hp,`f`).configuration,{"populate--":!0}),W=__classPrivateFieldGet(this,Zp,`f`).Parser.detailed(t,Object.assign({},__classPrivateFieldGet(this,Hp,`f`),{configuration:{"parse-positional-numbers":!1,...H}})),q=Object.assign(W.argv,__classPrivateFieldGet(this,Kp,`f`)),Y,X=W.aliases,Z=!1,te=!1;Object.keys(q).forEach(t=>{t===__classPrivateFieldGet(this,Rp,`f`)&&q[t]?Z=!0:t===__classPrivateFieldGet(this,im,`f`)&&q[t]&&(te=!0)}),q.$0=this.$0,this.parsed=W,C===0&&__classPrivateFieldGet(this,tm,`f`).clearCachedHelpMessage();try{if(this[mm](),n)return this[Fm](q,I,!!S,!1);__classPrivateFieldGet(this,Rp,`f`)&&[__classPrivateFieldGet(this,Rp,`f`)].concat(X[__classPrivateFieldGet(this,Rp,`f`)]||[]).filter(t=>t.length>1).includes(``+q._[q._.length-1])&&(q._.pop(),Z=!0),__classPrivateFieldSet(this,zp,!1,`f`);let H=__classPrivateFieldGet(this,wp,`f`).getCommands(),ne=__classPrivateFieldGet(this,Dp,`f`)?.completionKey?[__classPrivateFieldGet(this,Dp,`f`)?.completionKey,...this.getAliases()[__classPrivateFieldGet(this,Dp,`f`)?.completionKey]??[]].some(t=>Object.prototype.hasOwnProperty.call(q,t)):!1,re=Z||ne||N;if(q._.length){if(H.length){let t;for(let n=C||0,F;q._[n]!==void 0;n++)if(F=String(q._[n]),H.includes(F)&&F!==__classPrivateFieldGet(this,Op,`f`)){let t=__classPrivateFieldGet(this,wp,`f`).runCommand(F,this,W,n+1,N,Z||te||N);return this[Fm](t,I,!!S,!1)}else if(!t&&F!==__classPrivateFieldGet(this,Op,`f`)){t=F;break}!__classPrivateFieldGet(this,wp,`f`).hasDefaultCommand()&&__classPrivateFieldGet(this,Xp,`f`)&&t&&!re&&__classPrivateFieldGet(this,am,`f`).recommendCommands(t,H)}__classPrivateFieldGet(this,Op,`f`)&&q._.includes(__classPrivateFieldGet(this,Op,`f`))&&!ne&&(__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),this.showCompletionScript(),this.exit(0))}if(__classPrivateFieldGet(this,wp,`f`).hasDefaultCommand()&&!re){let t=__classPrivateFieldGet(this,wp,`f`).runCommand(null,this,W,0,N,Z||te||N);return this[Fm](t,I,!!S,!1)}if(ne){__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),t=[].concat(t);let n=t.slice(t.indexOf(`--${__classPrivateFieldGet(this,Dp,`f`).completionKey}`)+1);return __classPrivateFieldGet(this,Dp,`f`).getCompletion(n,(t,n)=>{if(t)throw new wl(t.message);(n||[]).forEach(t=>{__classPrivateFieldGet(this,Bp,`f`).log(t)}),this.exit(0)}),this[Fm](q,!I,!!S,!1)}if(__classPrivateFieldGet(this,Lp,`f`)||(Z?(__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),F=!0,this.showHelp(t=>{__classPrivateFieldGet(this,Bp,`f`).log(t),this.exit(0)})):te&&(__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),F=!0,__classPrivateFieldGet(this,tm,`f`).showVersion(`log`),this.exit(0))),!F&&__classPrivateFieldGet(this,Hp,`f`).skipValidation.length>0&&(F=Object.keys(q).some(t=>__classPrivateFieldGet(this,Hp,`f`).skipValidation.indexOf(t)>=0&&q[t]===!0)),!F){if(W.error)throw new wl(W.error.message);if(!ne){let t=this[zm](X,{},W.error);S||(Y=applyMiddleware(q,this,__classPrivateFieldGet(this,Fp,`f`).getMiddleware(),!0)),Y=this[Tm](t,Y??q),isPromise(Y)&&!S&&(Y=Y.then(()=>applyMiddleware(q,this,__classPrivateFieldGet(this,Fp,`f`).getMiddleware(),!1)))}}}catch(t){if(t instanceof wl)__classPrivateFieldGet(this,tm,`f`).fail(t.message,t);else throw t}return this[Fm](Y??q,I,!!S,!0)}[zm](t,n,S,C){let N={...this.getDemandedOptions()};return F=>{if(S)throw new wl(S.message);__classPrivateFieldGet(this,am,`f`).nonOptionCount(F),__classPrivateFieldGet(this,am,`f`).requiredArguments(F,N);let I=!1;__classPrivateFieldGet(this,$p,`f`)&&(I=__classPrivateFieldGet(this,am,`f`).unknownCommands(F)),__classPrivateFieldGet(this,Qp,`f`)&&!I?__classPrivateFieldGet(this,am,`f`).unknownArguments(F,t,n,!!C):__classPrivateFieldGet(this,em,`f`)&&__classPrivateFieldGet(this,am,`f`).unknownArguments(F,t,{},!1,!1),__classPrivateFieldGet(this,am,`f`).limitedChoices(F),__classPrivateFieldGet(this,am,`f`).implications(F),__classPrivateFieldGet(this,am,`f`).conflicting(F)}}[Bm](){__classPrivateFieldSet(this,Lp,!0,`f`)}[Vm](t){if(typeof t==`string`)__classPrivateFieldGet(this,Hp,`f`).key[t]=!0;else for(let n of t)__classPrivateFieldGet(this,Hp,`f`).key[n]=!0}}}),Wm,Gm=__esmMin(()=>{np(),Um(),Wm=YargsFactory(tp)});function classifyCliFailure(t,n){return typeof t==`string`&&t.length>0?{kind:`usage`,message:t}:{kind:`runtime`}}var Km=__esmMin(()=>{});function buildHeaders(t,n){let S={"user-agent":`gjsify-install/0.64.7`,"accept-encoding":n.acceptEncoding??`identity`};if(n.npmrc){let C=resolveAuthForUrl(t,n.npmrc);C&&(S.authorization=C)}if(n.headers)for(let[t,C]of Object.entries(n.headers))S[t.toLowerCase()]=C;return S}function resolveAuthForUrl(t,n){let S=pathPrefixes(new URL(t));for(let t of S){let S=n.authTokens[t];if(S)return`Bearer ${S}`;let C=n.basicAuth[t];if(C)return`Basic ${btoa(`${C.username}:${C.password}`)}`}return null}function pathPrefixes(t){let n=t.pathname.split(`/`).filter(Boolean),S=[];for(let C=n.length;C>=0;C--){let N=n.slice(0,C).join(`/`);S.push(N?`//${t.host}/${N}`:`//${t.host}`)}return S}var qm=__esmMin(()=>{}),PackageNotFoundError,IntegrityError,RegistryTimeoutError,RegistryUnreachableError,Jm=__esmMin(()=>{PackageNotFoundError=class extends Error{name;url;constructor(t,n){super(`Package not found in registry: ${t} (${n})`),this.name=t,this.url=n,this.name=`PackageNotFoundError`}},IntegrityError=class extends Error{url;integrity;constructor(t,n){super(`Tarball integrity mismatch for ${t} (expected ${n})`),this.url=t,this.integrity=n,this.name=`IntegrityError`}},RegistryTimeoutError=class extends Error{url;timeoutMs;attempts;constructor(t,n,S){let C=Math.round(n/100)/10,N=Math.round(n*S/100)/10;super(`@gjsify/npm-registry: GET ${t} timed out after ${C}s × ${S} attempt(s) (total ~${N}s). This usually means the registry CDN is slow or unreachable.`),this.url=t,this.timeoutMs=n,this.attempts=S,this.name=`RegistryTimeoutError`}},RegistryUnreachableError=class extends Error{url;attempts;elapsedMs;constructor(t,n,S,C){let N=Math.round(S/100)/10,F=C instanceof Error?C.message:String(C);super(`@gjsify/npm-registry: GET ${t} failed after ${n} attempt(s) over ~${N}s: ${F}. This usually means the registry or the network dropped out.`),this.url=t,this.attempts=n,this.elapsedMs=S,this.name=`RegistryUnreachableError`,this.cause=C}}});function registryFor(t,n){if(n&&t.startsWith(`@`)){let S=t.slice(0,t.indexOf(`/`)),C=n.scopes[S];if(C)return ensureTrailingSlash$1(C)}return n?.registry?ensureTrailingSlash$1(n.registry):Ym}function parseNpmrc(t){let n={registry:Ym,scopes:{},authTokens:{},basicAuth:{}},S=t.split(/\r?\n/),C={};for(let t of S){let S=t.replace(/^\s+|\s+$/g,``);if(!S||S.startsWith(`#`)||S.startsWith(`;`))continue;let N=S.indexOf(`=`);if(N<0)continue;let F=S.slice(0,N).trim(),I=expandEnv(stripQuotes(S.slice(N+1).trim()));if(F===`registry`){n.registry=ensureTrailingSlash$1(I);continue}let H=F.match(/^(@[^:]+):registry$/);if(H){n.scopes[H[1]]=ensureTrailingSlash$1(I);continue}let W=F.match(/^\/\/(.+):_authToken$/);if(W){n.authTokens[normalizeAuthHost(W[1])]=I;continue}let q=F.match(/^\/\/(.+):username$/);if(q){(C[normalizeAuthHost(q[1])]??={}).user=I;continue}let Y=F.match(/^\/\/(.+):_password$/);if(Y){let t=base64Decode$1(I);(C[normalizeAuthHost(Y[1])]??={}).pass=t;continue}}for(let[t,S]of Object.entries(C))S.user&&S.pass!==void 0&&(n.basicAuth[t]={username:S.user,password:S.pass});return n}function normalizeAuthHost(t){return`//${t.replace(/\/+$/,``)}`}function ensureTrailingSlash$1(t){return t.endsWith(`/`)?t:t+`/`}function stripQuotes(t){return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}function expandEnv(t){return t.replace(/\$\{([A-Z0-9_]+)\}/gi,(t,n)=>globalThis.process?.env?.[n]??``)}function base64Decode$1(t){return atob(t)}var Ym,Xm=__esmMin(()=>{Ym=`https://registry.npmjs.org/`,__name$1(ensureTrailingSlash$1,`ensureTrailingSlash`),__name$1(base64Decode$1,`base64Decode`)});async function fetchWithRetry(t,n,S){let C=S.fetch??globalThis.fetch;if(!C)throw Error(`@gjsify/npm-registry: globalThis.fetch is missing`);let N=Math.max(0,S.retries??5),F=Math.max(0,S.retryDelayMs??1e3),I=Math.max(0,S.timeoutMs??3e4),H=S.retryNotFound??!1,W=Date.now(),q=0,Y,X=0;for(;;){if(n.signal?.aborted)throw signalAbortError(n.signal);let Z=I>0?new AbortController:null,te=Z===null?null:setTimeout(()=>Z.abort(Error(`@gjsify/npm-registry: per-request timeout ${I}ms`)),I),ne=composeSignals(n.signal,Z?.signal);try{let F=await C(t,{...n,signal:ne}),I=isRetryableStatus(F.status)||H&&F.status===404;if(F.ok||!I||q>=N)return S.read?await S.read(F):F;try{await F.arrayBuffer()}catch{}Y=Error(`HTTP ${F.status} ${F.statusText}`)}catch(S){let C=Z!==null&&Z.signal.aborted,F=n.signal?.aborted===!0;if(C&&!F){if(X++,q>=N)throw new RegistryTimeoutError(t,I,X);Y=S}else if(F)throw signalAbortError(n.signal);else{if(!isRetryableError(S))throw S;if(q>=N)throw new RegistryUnreachableError(t,q+1,Date.now()-W,S);Y=S}}finally{te!==null&&clearTimeout(te)}let re=Math.min(F*2**q,8e3);S.onRetry?.({attempt:q+1,error:Y,delayMs:re}),await delay$1(re,n.signal),q++}}function composeSignals(t,n){return t?n?AbortSignal.any([t,n]):t:n}function isRetryableStatus(t){return t===408||t===425||t===429||t===500||t===502||t===503||t===504||t===521||t===522||t===524||t===525}function isRetryableError(t){if(t&&typeof t==`object`&&`name`in t&&t.name===`AbortError`)return!1;if(t instanceof TypeError)return!0;if(t&&typeof t==`object`&&`name`in t){let n=t.name;if(n===`FetchError`)return!0;if(n===`AbortError`)return!1}let n=t?.cause;if(n&&typeof n==`object`&&`code`in n){let t=n.code;if(typeof t==`string`)return t===`ECONNRESET`||t===`ECONNREFUSED`||t===`ENETUNREACH`||t===`ENOTFOUND`||t===`ETIMEDOUT`||t===`EAI_AGAIN`||t===`UND_ERR_SOCKET`||t===`UND_ERR_CONNECT_TIMEOUT`}return!1}function delay$1(t,n){return t<=0?Promise.resolve():new Promise((S,C)=>{let N=setTimeout(()=>{n?.removeEventListener?.(`abort`,onAbort),S()},t),onAbort=()=>{clearTimeout(N),C(signalAbortError(n))};if(n?.aborted){clearTimeout(N),C(signalAbortError(n));return}n?.addEventListener?.(`abort`,onAbort,{once:!0})})}function signalAbortError(t){let n=t&&`reason`in t?t.reason:void 0;if(n instanceof Error)return n;let S=Error(`Aborted`);return S.name=`AbortError`,S}var Zm=__esmMin(()=>{Jm(),__name$1(delay$1,`delay`)});async function verifyIntegrity(t,n){let S=n.trim().split(/\s+/);for(let n of S){let S=n.indexOf(`-`);if(S<0)continue;let C=n.slice(0,S).toLowerCase(),N=n.slice(S+1),F=globalThis.crypto?.subtle;if(!F)throw Error(`@gjsify/npm-registry: globalThis.crypto.subtle is missing`);let I=subriToWebCryptoAlgo(C);if(!I)continue;let H=await F.digest(I,dataAsArrayBuffer(t));if(bytesToBase64(new Uint8Array(H))===N)return!0}return!1}function subriToWebCryptoAlgo(t){switch(t){case`sha1`:return`SHA-1`;case`sha256`:return`SHA-256`;case`sha384`:return`SHA-384`;case`sha512`:return`SHA-512`;default:return null}}function dataAsArrayBuffer(t){if(t.byteOffset===0&&t.byteLength===t.buffer.byteLength)return t.buffer;let n=new Uint8Array(t.byteLength);return n.set(t),n.buffer}function bytesToBase64(t){let n=``;for(let S=0;S<t.length;S++)n+=String.fromCharCode(t[S]);return btoa(n)}var Qm=__esmMin(()=>{});function assertPackument(t,n){if(!n||typeof n!=`object`)throw TypeError(`registry: ${t} packument is not an object`);let S=n;if(typeof S.name!=`string`)throw TypeError(`registry: ${t} packument missing string name`);if(!S.versions||typeof S.versions!=`object`)throw TypeError(`registry: ${t} packument missing versions map`)}function packumentUrl(t,n){let S=ensureTrailingSlash$1(n);if(t.startsWith(`@`)){let n=t.indexOf(`/`);if(n<0)throw TypeError(`Invalid scoped package name: ${t}`);let C=t.slice(0,n),N=t.slice(n+1);return`${S}${encodeURIComponent(C)}/${encodeURIComponent(N)}`}return`${S}${encodeURIComponent(t)}`}async function fetchPackumentConditional(t,n={}){let S=packumentUrl(t,n.registry??registryFor(t,n.npmrc)),C=buildHeaders(S,{...n,acceptEncoding:`gzip`});C.accept??=n.fullMetadata?`application/json`:`application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`,n.ifNoneMatch&&(C[`if-none-match`]=n.ifNoneMatch);let N=await fetchWithRetry(S,{headers:C,signal:n.signal},{fetch:n.fetch,retries:n.retries,retryDelayMs:n.retryDelayMs,timeoutMs:n.timeoutMs,onRetry:n.onRetry,read:async n=>{if(n.status===304){try{await n.arrayBuffer()}catch{}return{status:`not-modified`}}if(!n.ok)throw n.status===404||n.status===406?new PackageNotFoundError(t,S):Error(`registry GET ${S} -> ${n.status} ${n.statusText}`);return{status:`fresh`,body:await decodeJsonBody(n),etag:n.headers.get(`etag`)??void 0}}});if(N.status===`not-modified`)return{status:`not-modified`,etag:n.ifNoneMatch};let F=N.body;return assertPackument(t,F),{status:`fresh`,packument:F,etag:N.etag}}async function decodeJsonBody(t){return t.json()}async function fetchPackument(t,n={}){let S=await fetchPackumentConditional(t,n);if(!S.packument)throw Error(`registry: ${t} returned 304 Not Modified to an unconditional request`);return S.packument}var $m=__esmMin(()=>{qm(),Jm(),Xm(),Zm()});async function fetchTarball(t,n={}){let S=buildHeaders(t,{...n,acceptEncoding:`identity`});S.accept??=`application/octet-stream`;let C=await fetchWithRetry(t,{headers:S,signal:n.signal},{fetch:n.fetch,retries:n.retries,retryDelayMs:n.retryDelayMs,timeoutMs:n.timeoutMs,onRetry:n.onRetry,retryNotFound:n.retryNotFound??!0,read:async n=>{if(!n.ok)throw Error(`tarball GET ${t} -> ${n.status} ${n.statusText}`);return new Uint8Array(await n.arrayBuffer())}});if(n.integrity&&!await verifyIntegrity(C,n.integrity))throw new IntegrityError(t,n.integrity);return C}var eh=__esmMin(()=>{qm(),Jm(),Zm(),Qm()});async function whoami(t,n){let S=`${ensureTrailingSlash$1(t)}-/whoami`,C=buildHeaders(S,{npmrc:n});C.accept=`application/json`;let N=globalThis.fetch;if(!N)throw Error(`@gjsify/npm-registry: globalThis.fetch is missing`);let F=await N(S,{method:`GET`,headers:C});if(!F.ok)throw Error(`whoami GET ${S} -> ${F.status} ${F.statusText}`);let I=await F.json();if(I&&typeof I==`object`&&`username`in I){let t=I.username;if(typeof t==`string`&&t.length>0)return{username:t}}return{}}var th=__esmMin(()=>{qm(),Xm()}),nh=__esmMin(()=>{qm(),Jm(),Xm(),Qm(),$m(),eh(),th()});function escapePackageName(t){return t.replace(`/`,`%2f`)}function buildPublishHeaders(t,n){let S=buildHeaders(t,{npmrc:n.npmrc});return S[`content-type`]=`application/json`,S[`npm-command`]=`publish`,S[`npm-auth-type`]=n.otp?`legacy`:`web`,S[`user-agent`]=n.userAgent??defaultUserAgent(),n.otp&&(S[`npm-otp`]=n.otp),n.authorization&&(S.authorization=n.authorization),S}function cliVersion(){return rh===void 0&&(rh=`0.64.7`),rh}function cliPackageDir(){let t=globalThis.process?.env?.GJSIFY_CLI_PACKAGE_JSON,n;try{n=On(t||fileURLToPath(import.meta.url))}catch{return null}for(let t=0;t<12;t++){try{if(JSON.parse(readFileSync(`${n}/package.json`,`utf8`)).name===`@gjsify/cli`)return n}catch{}let t=On(n);if(t===n)break;n=t}return null}function defaultUserAgent(){let t=globalThis.process,n=t?.arch??`x64`,S=t?.platform??`linux`;return`gjsify-publish/${cliVersion()} (${S} ${n})`}var rh,ih=__esmMin(()=>{Bd(),In(),qn(),nh()}),ah,oh=__esmMin(()=>{ah=`gjsify`});function parseDeclaredChannel(t,n){if(!(t===void 0||t===``)){if(sh.includes(t))return t;throw Error(`${n}: "${String(t)}" is not a distribution channel. Known: ${sh.join(`, `)}.`)}}function channelAllowsDonations(t){return t!==void 0&&ch[t]===!0}var sh,ch,lh,uh=__esmMin(()=>{sh=[`flathub`,`web`,`microsoft-store`,`apple-app-store`],ch={flathub:!0,web:!0,"microsoft-store":!1,"apple-app-store":!1},lh=`GJSIFY_CHANNEL`}),dh=__commonJSMin(((t,n)=>{let S=(In(),__toCommonJS(xn)),C=(Rl(),__toCommonJS(Pl)),N=(Bd(),__toCommonJS(Rd)),resolveFrom=(t,n,F)=>{if(typeof t!=`string`)throw TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof t}\``);if(typeof n!=`string`)throw TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof n}\``);try{t=N.realpathSync(t)}catch(n){if(n.code===`ENOENT`)t=S.resolve(t);else if(F)return null;else throw n}let I=S.join(t,`noop.js`),resolveFileName=()=>C._resolveFilename(n,{id:I,filename:I,paths:C._nodeModulePaths(t)});if(F)try{return resolveFileName()}catch{return null}return resolveFileName()};n.exports=(t,n)=>resolveFrom(t,n),n.exports.silent=(t,n)=>resolveFrom(t,n,!0)})),fh=__commonJSMin(((t,n)=>{let callsites=()=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=(t,n)=>n;let n=Error().stack.slice(1);return Error.prepareStackTrace=t,n};n.exports=callsites,n.exports.default=callsites})),ph=__commonJSMin(((t,n)=>{let S=fh();n.exports=t=>{let n=S();if(!t)return n[2].getFileName();let C=!1;n.shift();for(let S of n){let n=S.getFileName();if(typeof n==`string`){if(n===t){C=!0;continue}if(n!==`module.js`&&C&&n!==t)return n}}}})),mh=__commonJSMin(((t,n)=>{var{__gjsifyModuleDir:S,__gjsifyModuleFile:C}=(Hl(),__toCommonJS(zl)),N=S(`import-fresh/index.js`),F=C(`import-fresh/index.js`);let I=(In(),__toCommonJS(xn)),H=dh(),W=ph();n.exports=t=>{if(typeof t!=`string`)throw TypeError(`Expected a string`);let n=W(F),S=n?I.dirname(n):N,C=H(S,t),q=Y.cache[C];if(q&&q.parent){let t=q.parent.children.length;for(;t--;)q.parent.children[t].id===C&&q.parent.children.splice(t,1)}delete Y.cache[C];let X=Y.cache[n];return X===void 0||X.require===void 0?Y(C):X.require(C)}})),hh=__commonJSMin(((t,n)=>{n.exports=function isArrayish(t){return t?t instanceof Array||Array.isArray(t)||t.length>=0&&t.splice instanceof Function:!1}})),gh=__commonJSMin(((t,n)=>{var S=(Du(),__toCommonJS(Cu)),C=hh(),N=function errorEx(t,n){(!t||t.constructor!==String)&&(n=t||{},t=Error.name);var N=function ErrorEXError(S){if(!this)return new ErrorEXError(S);S=S instanceof Error?S.message:S||this.message,Error.call(this,S),Error.captureStackTrace(this,N),this.name=t,Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,get:function(){var t=S.split(/\r?\n/g);for(var N in n)if(n.hasOwnProperty(N)){var F=n[N];`message`in F&&(t=F.message(this[N],t)||t,C(t)||(t=[t]))}return t.join(`
|
|
148
|
+
`,`f`),__classPrivateFieldSet(this,Vp,__classPrivateFieldGet(this,Vp,`f`)+t.join(` `),`f`)}}}[cm](t){objectKeys(__classPrivateFieldGet(this,Hp,`f`)).forEach(n=>{if((t=>t===`configObjects`)(n))return;let S=__classPrivateFieldGet(this,Hp,`f`)[n];Array.isArray(S)?S.includes(t)&&S.splice(S.indexOf(t),1):typeof S==`object`&&delete S[t]}),delete __classPrivateFieldGet(this,tm,`f`).getDescriptions()[t]}[lm](t,n,S){__classPrivateFieldGet(this,Mp,`f`)[S]||(__classPrivateFieldGet(this,Zp,`f`).process.emitWarning(t,n),__classPrivateFieldGet(this,Mp,`f`)[S]=!0)}[um](){__classPrivateFieldGet(this,Pp,`f`).push({options:__classPrivateFieldGet(this,Hp,`f`),configObjects:__classPrivateFieldGet(this,Hp,`f`).configObjects.slice(0),exitProcess:__classPrivateFieldGet(this,Np,`f`),groups:__classPrivateFieldGet(this,Ip,`f`),strict:__classPrivateFieldGet(this,Qp,`f`),strictCommands:__classPrivateFieldGet(this,$p,`f`),strictOptions:__classPrivateFieldGet(this,em,`f`),completionCommand:__classPrivateFieldGet(this,Op,`f`),output:__classPrivateFieldGet(this,Vp,`f`),exitError:__classPrivateFieldGet(this,Ap,`f`),hasOutput:__classPrivateFieldGet(this,Lp,`f`),parsed:this.parsed,parseFn:__classPrivateFieldGet(this,Gp,`f`),parseContext:__classPrivateFieldGet(this,Kp,`f`)}),__classPrivateFieldGet(this,tm,`f`).freeze(),__classPrivateFieldGet(this,am,`f`).freeze(),__classPrivateFieldGet(this,wp,`f`).freeze(),__classPrivateFieldGet(this,Fp,`f`).freeze()}[dm](){let t=``,n;return n=/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this,Zp,`f`).process.argv()[0])?__classPrivateFieldGet(this,Zp,`f`).process.argv().slice(1,2):__classPrivateFieldGet(this,Zp,`f`).process.argv().slice(0,1),t=n.map(t=>{let n=this[Im](__classPrivateFieldGet(this,Tp,`f`),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&n.length<t.length?n:t}).join(` `).trim(),__classPrivateFieldGet(this,Zp,`f`).getEnv(`_`)&&__classPrivateFieldGet(this,Zp,`f`).getProcessArgvBin()===__classPrivateFieldGet(this,Zp,`f`).getEnv(`_`)&&(t=__classPrivateFieldGet(this,Zp,`f`).getEnv(`_`).replace(`${__classPrivateFieldGet(this,Zp,`f`).path.dirname(__classPrivateFieldGet(this,Zp,`f`).process.execPath())}/`,``)),t}[fm](){return __classPrivateFieldGet(this,Wp,`f`)}[pm](){return __classPrivateFieldGet(this,nm,`f`)}[mm](){if(!__classPrivateFieldGet(this,jp,`f`))return;let t=__classPrivateFieldGet(this,Zp,`f`).getEnv(`LC_ALL`)||__classPrivateFieldGet(this,Zp,`f`).getEnv(`LC_MESSAGES`)||__classPrivateFieldGet(this,Zp,`f`).getEnv(`LANG`)||__classPrivateFieldGet(this,Zp,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(t.replace(/[.:].*/,``))}[hm](){return this[_m]().version||`unknown`}[gm](t){let n=t[`--`]?t[`--`]:t._;for(let t=0,S;(S=n[t])!==void 0;t++)__classPrivateFieldGet(this,Zp,`f`).Parser.looksLikeNumber(S)&&Number.isSafeInteger(Math.floor(parseFloat(`${S}`)))&&(n[t]=Number(S));return t}[_m](t){let n=t||`*`;if(__classPrivateFieldGet(this,qp,`f`)[n])return __classPrivateFieldGet(this,qp,`f`)[n];let S={};try{let n=t||__classPrivateFieldGet(this,Zp,`f`).mainFilename;__classPrivateFieldGet(this,Zp,`f`).path.extname(n)&&(n=__classPrivateFieldGet(this,Zp,`f`).path.dirname(n));let C=__classPrivateFieldGet(this,Zp,`f`).findUp(n,(t,n)=>{if(n.includes(`package.json`))return`package.json`});assertNotStrictEqual(C,void 0,__classPrivateFieldGet(this,Zp,`f`)),S=JSON.parse(__classPrivateFieldGet(this,Zp,`f`).readFileSync(C,`utf8`))}catch{}return __classPrivateFieldGet(this,qp,`f`)[n]=S||{},__classPrivateFieldGet(this,qp,`f`)[n]}[vm](t,n){n=[].concat(n),n.forEach(n=>{n=this[Sm](n),__classPrivateFieldGet(this,Hp,`f`)[t].push(n)})}[ym](t,n,S,C){this[xm](t,n,S,C,(t,n,S)=>{__classPrivateFieldGet(this,Hp,`f`)[t][n]=S})}[bm](t,n,S,C){this[xm](t,n,S,C,(t,n,S)=>{__classPrivateFieldGet(this,Hp,`f`)[t][n]=(__classPrivateFieldGet(this,Hp,`f`)[t][n]||[]).concat(S)})}[xm](t,n,S,C,N){if(Array.isArray(S))S.forEach(n=>{t(n,C)});else if((t=>typeof t==`object`)(S))for(let n of objectKeys(S))t(n,S[n]);else N(n,this[Sm](S),C)}[Sm](t){return t===`__proto__`?`___proto___`:t}[Cm](t,n){return this[ym](this[Cm].bind(this),`key`,t,n),this}[wm](){var t,n,S,C,N,F,I,H,W,q,Y,X;let Z=__classPrivateFieldGet(this,Pp,`f`).pop();assertNotStrictEqual(Z,void 0,__classPrivateFieldGet(this,Zp,`f`));let te;t=this,n=this,S=this,C=this,N=this,F=this,I=this,H=this,W=this,q=this,Y=this,X=this,{options:{set value(n){__classPrivateFieldSet(t,Hp,n,`f`)}}.value,configObjects:te,exitProcess:{set value(t){__classPrivateFieldSet(n,Np,t,`f`)}}.value,groups:{set value(t){__classPrivateFieldSet(S,Ip,t,`f`)}}.value,output:{set value(t){__classPrivateFieldSet(C,Vp,t,`f`)}}.value,exitError:{set value(t){__classPrivateFieldSet(N,Ap,t,`f`)}}.value,hasOutput:{set value(t){__classPrivateFieldSet(F,Lp,t,`f`)}}.value,parsed:this.parsed,strict:{set value(t){__classPrivateFieldSet(I,Qp,t,`f`)}}.value,strictCommands:{set value(t){__classPrivateFieldSet(H,$p,t,`f`)}}.value,strictOptions:{set value(t){__classPrivateFieldSet(W,em,t,`f`)}}.value,completionCommand:{set value(t){__classPrivateFieldSet(q,Op,t,`f`)}}.value,parseFn:{set value(t){__classPrivateFieldSet(Y,Gp,t,`f`)}}.value,parseContext:{set value(t){__classPrivateFieldSet(X,Kp,t,`f`)}}.value}=Z,__classPrivateFieldGet(this,Hp,`f`).configObjects=te,__classPrivateFieldGet(this,tm,`f`).unfreeze(),__classPrivateFieldGet(this,am,`f`).unfreeze(),__classPrivateFieldGet(this,wp,`f`).unfreeze(),__classPrivateFieldGet(this,Fp,`f`).unfreeze()}[Tm](t,n){return maybeAsyncResult(n,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[Em].bind(this),getContext:this[Dm].bind(this),getHasOutput:this[Om].bind(this),getLoggerInstance:this[km].bind(this),getParseContext:this[Am].bind(this),getParserConfiguration:this[fm].bind(this),getUsageConfiguration:this[pm].bind(this),getUsageInstance:this[jm].bind(this),getValidationInstance:this[Mm].bind(this),hasParseCallback:this[Nm].bind(this),isGlobalContext:this[Pm].bind(this),postProcess:this[Fm].bind(this),reset:this[Lm].bind(this),runValidation:this[zm].bind(this),runYargsParserAndExecuteCommands:this[Rm].bind(this),setHasOutput:this[Bm].bind(this)}}[Em](){return __classPrivateFieldGet(this,wp,`f`)}[Dm](){return __classPrivateFieldGet(this,Ep,`f`)}[Om](){return __classPrivateFieldGet(this,Lp,`f`)}[km](){return __classPrivateFieldGet(this,Bp,`f`)}[Am](){return __classPrivateFieldGet(this,Kp,`f`)||{}}[jm](){return __classPrivateFieldGet(this,tm,`f`)}[Mm](){return __classPrivateFieldGet(this,am,`f`)}[Nm](){return!!__classPrivateFieldGet(this,Gp,`f`)}[Pm](){return __classPrivateFieldGet(this,zp,`f`)}[Fm](t,n,S,C){return S||isPromise(t)?t:(n||(t=this[om](t)),(this[fm]()[`parse-positional-numbers`]||this[fm]()[`parse-positional-numbers`]===void 0)&&(t=this[gm](t)),C&&(t=applyMiddleware(t,this,__classPrivateFieldGet(this,Fp,`f`).getMiddleware(),!1)),t)}[Lm](t={}){__classPrivateFieldSet(this,Hp,__classPrivateFieldGet(this,Hp,`f`)||{},`f`);let n={};n.local=__classPrivateFieldGet(this,Hp,`f`).local||[],n.configObjects=__classPrivateFieldGet(this,Hp,`f`).configObjects||[];let S={};return n.local.forEach(n=>{S[n]=!0,(t[n]||[]).forEach(t=>{S[t]=!0})}),Object.assign(__classPrivateFieldGet(this,Jp,`f`),Object.keys(__classPrivateFieldGet(this,Ip,`f`)).reduce((t,n)=>{let C=__classPrivateFieldGet(this,Ip,`f`)[n].filter(t=>!(t in S));return C.length>0&&(t[n]=C),t},{})),__classPrivateFieldSet(this,Ip,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(t=>{n[t]=(__classPrivateFieldGet(this,Hp,`f`)[t]||[]).filter(t=>!S[t])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(t=>{n[t]=objFilter(__classPrivateFieldGet(this,Hp,`f`)[t],t=>!S[t])}),n.envPrefix=__classPrivateFieldGet(this,Hp,`f`).envPrefix,__classPrivateFieldSet(this,Hp,n,`f`),__classPrivateFieldSet(this,tm,__classPrivateFieldGet(this,tm,`f`)?__classPrivateFieldGet(this,tm,`f`).reset(S):usage(this,__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldSet(this,am,__classPrivateFieldGet(this,am,`f`)?__classPrivateFieldGet(this,am,`f`).reset(S):validation(this,__classPrivateFieldGet(this,tm,`f`),__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldSet(this,wp,__classPrivateFieldGet(this,wp,`f`)?__classPrivateFieldGet(this,wp,`f`).reset():command(__classPrivateFieldGet(this,tm,`f`),__classPrivateFieldGet(this,am,`f`),__classPrivateFieldGet(this,Fp,`f`),__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldGet(this,Dp,`f`)||__classPrivateFieldSet(this,Dp,completion(this,__classPrivateFieldGet(this,tm,`f`),__classPrivateFieldGet(this,wp,`f`),__classPrivateFieldGet(this,Zp,`f`)),`f`),__classPrivateFieldGet(this,Fp,`f`).reset(),__classPrivateFieldSet(this,Op,null,`f`),__classPrivateFieldSet(this,Vp,``,`f`),__classPrivateFieldSet(this,Ap,null,`f`),__classPrivateFieldSet(this,Lp,!1,`f`),this.parsed=!1,this}[Im](t,n){return __classPrivateFieldGet(this,Zp,`f`).path.relative(t,n)}[Rm](t,n,S,C=0,N=!1){let F=!!S||N;t||=__classPrivateFieldGet(this,Yp,`f`),__classPrivateFieldGet(this,Hp,`f`).__=__classPrivateFieldGet(this,Zp,`f`).y18n.__,__classPrivateFieldGet(this,Hp,`f`).configuration=this[fm]();let I=!!__classPrivateFieldGet(this,Hp,`f`).configuration[`populate--`],H=Object.assign({},__classPrivateFieldGet(this,Hp,`f`).configuration,{"populate--":!0}),W=__classPrivateFieldGet(this,Zp,`f`).Parser.detailed(t,Object.assign({},__classPrivateFieldGet(this,Hp,`f`),{configuration:{"parse-positional-numbers":!1,...H}})),q=Object.assign(W.argv,__classPrivateFieldGet(this,Kp,`f`)),Y,X=W.aliases,Z=!1,te=!1;Object.keys(q).forEach(t=>{t===__classPrivateFieldGet(this,Rp,`f`)&&q[t]?Z=!0:t===__classPrivateFieldGet(this,im,`f`)&&q[t]&&(te=!0)}),q.$0=this.$0,this.parsed=W,C===0&&__classPrivateFieldGet(this,tm,`f`).clearCachedHelpMessage();try{if(this[mm](),n)return this[Fm](q,I,!!S,!1);__classPrivateFieldGet(this,Rp,`f`)&&[__classPrivateFieldGet(this,Rp,`f`)].concat(X[__classPrivateFieldGet(this,Rp,`f`)]||[]).filter(t=>t.length>1).includes(``+q._[q._.length-1])&&(q._.pop(),Z=!0),__classPrivateFieldSet(this,zp,!1,`f`);let H=__classPrivateFieldGet(this,wp,`f`).getCommands(),ne=__classPrivateFieldGet(this,Dp,`f`)?.completionKey?[__classPrivateFieldGet(this,Dp,`f`)?.completionKey,...this.getAliases()[__classPrivateFieldGet(this,Dp,`f`)?.completionKey]??[]].some(t=>Object.prototype.hasOwnProperty.call(q,t)):!1,re=Z||ne||N;if(q._.length){if(H.length){let t;for(let n=C||0,F;q._[n]!==void 0;n++)if(F=String(q._[n]),H.includes(F)&&F!==__classPrivateFieldGet(this,Op,`f`)){let t=__classPrivateFieldGet(this,wp,`f`).runCommand(F,this,W,n+1,N,Z||te||N);return this[Fm](t,I,!!S,!1)}else if(!t&&F!==__classPrivateFieldGet(this,Op,`f`)){t=F;break}!__classPrivateFieldGet(this,wp,`f`).hasDefaultCommand()&&__classPrivateFieldGet(this,Xp,`f`)&&t&&!re&&__classPrivateFieldGet(this,am,`f`).recommendCommands(t,H)}__classPrivateFieldGet(this,Op,`f`)&&q._.includes(__classPrivateFieldGet(this,Op,`f`))&&!ne&&(__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),this.showCompletionScript(),this.exit(0))}if(__classPrivateFieldGet(this,wp,`f`).hasDefaultCommand()&&!re){let t=__classPrivateFieldGet(this,wp,`f`).runCommand(null,this,W,0,N,Z||te||N);return this[Fm](t,I,!!S,!1)}if(ne){__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),t=[].concat(t);let n=t.slice(t.indexOf(`--${__classPrivateFieldGet(this,Dp,`f`).completionKey}`)+1);return __classPrivateFieldGet(this,Dp,`f`).getCompletion(n,(t,n)=>{if(t)throw new wl(t.message);(n||[]).forEach(t=>{__classPrivateFieldGet(this,Bp,`f`).log(t)}),this.exit(0)}),this[Fm](q,!I,!!S,!1)}if(__classPrivateFieldGet(this,Lp,`f`)||(Z?(__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),F=!0,this.showHelp(t=>{__classPrivateFieldGet(this,Bp,`f`).log(t),this.exit(0)})):te&&(__classPrivateFieldGet(this,Np,`f`)&&setBlocking(!0),F=!0,__classPrivateFieldGet(this,tm,`f`).showVersion(`log`),this.exit(0))),!F&&__classPrivateFieldGet(this,Hp,`f`).skipValidation.length>0&&(F=Object.keys(q).some(t=>__classPrivateFieldGet(this,Hp,`f`).skipValidation.indexOf(t)>=0&&q[t]===!0)),!F){if(W.error)throw new wl(W.error.message);if(!ne){let t=this[zm](X,{},W.error);S||(Y=applyMiddleware(q,this,__classPrivateFieldGet(this,Fp,`f`).getMiddleware(),!0)),Y=this[Tm](t,Y??q),isPromise(Y)&&!S&&(Y=Y.then(()=>applyMiddleware(q,this,__classPrivateFieldGet(this,Fp,`f`).getMiddleware(),!1)))}}}catch(t){if(t instanceof wl)__classPrivateFieldGet(this,tm,`f`).fail(t.message,t);else throw t}return this[Fm](Y??q,I,!!S,!0)}[zm](t,n,S,C){let N={...this.getDemandedOptions()};return F=>{if(S)throw new wl(S.message);__classPrivateFieldGet(this,am,`f`).nonOptionCount(F),__classPrivateFieldGet(this,am,`f`).requiredArguments(F,N);let I=!1;__classPrivateFieldGet(this,$p,`f`)&&(I=__classPrivateFieldGet(this,am,`f`).unknownCommands(F)),__classPrivateFieldGet(this,Qp,`f`)&&!I?__classPrivateFieldGet(this,am,`f`).unknownArguments(F,t,n,!!C):__classPrivateFieldGet(this,em,`f`)&&__classPrivateFieldGet(this,am,`f`).unknownArguments(F,t,{},!1,!1),__classPrivateFieldGet(this,am,`f`).limitedChoices(F),__classPrivateFieldGet(this,am,`f`).implications(F),__classPrivateFieldGet(this,am,`f`).conflicting(F)}}[Bm](){__classPrivateFieldSet(this,Lp,!0,`f`)}[Vm](t){if(typeof t==`string`)__classPrivateFieldGet(this,Hp,`f`).key[t]=!0;else for(let n of t)__classPrivateFieldGet(this,Hp,`f`).key[n]=!0}}}),Wm,Gm=__esmMin(()=>{np(),Um(),Wm=YargsFactory(tp)});function classifyCliFailure(t,n){return typeof t==`string`&&t.length>0?{kind:`usage`,message:t}:{kind:`runtime`}}var Km=__esmMin(()=>{});function buildHeaders(t,n){let S={"user-agent":`gjsify-install/0.64.9`,"accept-encoding":n.acceptEncoding??`identity`};if(n.npmrc){let C=resolveAuthForUrl(t,n.npmrc);C&&(S.authorization=C)}if(n.headers)for(let[t,C]of Object.entries(n.headers))S[t.toLowerCase()]=C;return S}function resolveAuthForUrl(t,n){let S=pathPrefixes(new URL(t));for(let t of S){let S=n.authTokens[t];if(S)return`Bearer ${S}`;let C=n.basicAuth[t];if(C)return`Basic ${btoa(`${C.username}:${C.password}`)}`}return null}function pathPrefixes(t){let n=t.pathname.split(`/`).filter(Boolean),S=[];for(let C=n.length;C>=0;C--){let N=n.slice(0,C).join(`/`);S.push(N?`//${t.host}/${N}`:`//${t.host}`)}return S}var qm=__esmMin(()=>{}),PackageNotFoundError,IntegrityError,RegistryTimeoutError,RegistryUnreachableError,Jm=__esmMin(()=>{PackageNotFoundError=class extends Error{name;url;constructor(t,n){super(`Package not found in registry: ${t} (${n})`),this.name=t,this.url=n,this.name=`PackageNotFoundError`}},IntegrityError=class extends Error{url;integrity;constructor(t,n){super(`Tarball integrity mismatch for ${t} (expected ${n})`),this.url=t,this.integrity=n,this.name=`IntegrityError`}},RegistryTimeoutError=class extends Error{url;timeoutMs;attempts;constructor(t,n,S){let C=Math.round(n/100)/10,N=Math.round(n*S/100)/10;super(`@gjsify/npm-registry: GET ${t} timed out after ${C}s × ${S} attempt(s) (total ~${N}s). This usually means the registry CDN is slow or unreachable.`),this.url=t,this.timeoutMs=n,this.attempts=S,this.name=`RegistryTimeoutError`}},RegistryUnreachableError=class extends Error{url;attempts;elapsedMs;constructor(t,n,S,C){let N=Math.round(S/100)/10,F=C instanceof Error?C.message:String(C);super(`@gjsify/npm-registry: GET ${t} failed after ${n} attempt(s) over ~${N}s: ${F}. This usually means the registry or the network dropped out.`),this.url=t,this.attempts=n,this.elapsedMs=S,this.name=`RegistryUnreachableError`,this.cause=C}}});function registryFor(t,n){if(n&&t.startsWith(`@`)){let S=t.slice(0,t.indexOf(`/`)),C=n.scopes[S];if(C)return ensureTrailingSlash$1(C)}return n?.registry?ensureTrailingSlash$1(n.registry):Ym}function parseNpmrc(t){let n={registry:Ym,scopes:{},authTokens:{},basicAuth:{}},S=t.split(/\r?\n/),C={};for(let t of S){let S=t.replace(/^\s+|\s+$/g,``);if(!S||S.startsWith(`#`)||S.startsWith(`;`))continue;let N=S.indexOf(`=`);if(N<0)continue;let F=S.slice(0,N).trim(),I=expandEnv(stripQuotes(S.slice(N+1).trim()));if(F===`registry`){n.registry=ensureTrailingSlash$1(I);continue}let H=F.match(/^(@[^:]+):registry$/);if(H){n.scopes[H[1]]=ensureTrailingSlash$1(I);continue}let W=F.match(/^\/\/(.+):_authToken$/);if(W){n.authTokens[normalizeAuthHost(W[1])]=I;continue}let q=F.match(/^\/\/(.+):username$/);if(q){(C[normalizeAuthHost(q[1])]??={}).user=I;continue}let Y=F.match(/^\/\/(.+):_password$/);if(Y){let t=base64Decode$1(I);(C[normalizeAuthHost(Y[1])]??={}).pass=t;continue}}for(let[t,S]of Object.entries(C))S.user&&S.pass!==void 0&&(n.basicAuth[t]={username:S.user,password:S.pass});return n}function normalizeAuthHost(t){return`//${t.replace(/\/+$/,``)}`}function ensureTrailingSlash$1(t){return t.endsWith(`/`)?t:t+`/`}function stripQuotes(t){return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}function expandEnv(t){return t.replace(/\$\{([A-Z0-9_]+)\}/gi,(t,n)=>globalThis.process?.env?.[n]??``)}function base64Decode$1(t){return atob(t)}var Ym,Xm=__esmMin(()=>{Ym=`https://registry.npmjs.org/`,__name$1(ensureTrailingSlash$1,`ensureTrailingSlash`),__name$1(base64Decode$1,`base64Decode`)});async function fetchWithRetry(t,n,S){let C=S.fetch??globalThis.fetch;if(!C)throw Error(`@gjsify/npm-registry: globalThis.fetch is missing`);let N=Math.max(0,S.retries??5),F=Math.max(0,S.retryDelayMs??1e3),I=Math.max(0,S.timeoutMs??3e4),H=S.retryNotFound??!1,W=Date.now(),q=0,Y,X=0;for(;;){if(n.signal?.aborted)throw signalAbortError(n.signal);let Z=I>0?new AbortController:null,te=Z===null?null:setTimeout(()=>Z.abort(Error(`@gjsify/npm-registry: per-request timeout ${I}ms`)),I),ne=composeSignals(n.signal,Z?.signal);try{let F=await C(t,{...n,signal:ne}),I=isRetryableStatus(F.status)||H&&F.status===404;if(F.ok||!I||q>=N)return S.read?await S.read(F):F;try{await F.arrayBuffer()}catch{}Y=Error(`HTTP ${F.status} ${F.statusText}`)}catch(S){let C=Z!==null&&Z.signal.aborted,F=n.signal?.aborted===!0;if(C&&!F){if(X++,q>=N)throw new RegistryTimeoutError(t,I,X);Y=S}else if(F)throw signalAbortError(n.signal);else{if(!isRetryableError(S))throw S;if(q>=N)throw new RegistryUnreachableError(t,q+1,Date.now()-W,S);Y=S}}finally{te!==null&&clearTimeout(te)}let re=Math.min(F*2**q,8e3);S.onRetry?.({attempt:q+1,error:Y,delayMs:re}),await delay$1(re,n.signal),q++}}function composeSignals(t,n){return t?n?AbortSignal.any([t,n]):t:n}function isRetryableStatus(t){return t===408||t===425||t===429||t===500||t===502||t===503||t===504||t===521||t===522||t===524||t===525}function isRetryableError(t){if(t&&typeof t==`object`&&`name`in t&&t.name===`AbortError`)return!1;if(t instanceof TypeError)return!0;if(t&&typeof t==`object`&&`name`in t){let n=t.name;if(n===`FetchError`)return!0;if(n===`AbortError`)return!1}let n=t?.cause;if(n&&typeof n==`object`&&`code`in n){let t=n.code;if(typeof t==`string`)return t===`ECONNRESET`||t===`ECONNREFUSED`||t===`ENETUNREACH`||t===`ENOTFOUND`||t===`ETIMEDOUT`||t===`EAI_AGAIN`||t===`UND_ERR_SOCKET`||t===`UND_ERR_CONNECT_TIMEOUT`}return!1}function delay$1(t,n){return t<=0?Promise.resolve():new Promise((S,C)=>{let N=setTimeout(()=>{n?.removeEventListener?.(`abort`,onAbort),S()},t),onAbort=()=>{clearTimeout(N),C(signalAbortError(n))};if(n?.aborted){clearTimeout(N),C(signalAbortError(n));return}n?.addEventListener?.(`abort`,onAbort,{once:!0})})}function signalAbortError(t){let n=t&&`reason`in t?t.reason:void 0;if(n instanceof Error)return n;let S=Error(`Aborted`);return S.name=`AbortError`,S}var Zm=__esmMin(()=>{Jm(),__name$1(delay$1,`delay`)});async function verifyIntegrity(t,n){let S=n.trim().split(/\s+/);for(let n of S){let S=n.indexOf(`-`);if(S<0)continue;let C=n.slice(0,S).toLowerCase(),N=n.slice(S+1),F=globalThis.crypto?.subtle;if(!F)throw Error(`@gjsify/npm-registry: globalThis.crypto.subtle is missing`);let I=subriToWebCryptoAlgo(C);if(!I)continue;let H=await F.digest(I,dataAsArrayBuffer(t));if(bytesToBase64(new Uint8Array(H))===N)return!0}return!1}function subriToWebCryptoAlgo(t){switch(t){case`sha1`:return`SHA-1`;case`sha256`:return`SHA-256`;case`sha384`:return`SHA-384`;case`sha512`:return`SHA-512`;default:return null}}function dataAsArrayBuffer(t){if(t.byteOffset===0&&t.byteLength===t.buffer.byteLength)return t.buffer;let n=new Uint8Array(t.byteLength);return n.set(t),n.buffer}function bytesToBase64(t){let n=``;for(let S=0;S<t.length;S++)n+=String.fromCharCode(t[S]);return btoa(n)}var Qm=__esmMin(()=>{});function assertPackument(t,n){if(!n||typeof n!=`object`)throw TypeError(`registry: ${t} packument is not an object`);let S=n;if(typeof S.name!=`string`)throw TypeError(`registry: ${t} packument missing string name`);if(!S.versions||typeof S.versions!=`object`)throw TypeError(`registry: ${t} packument missing versions map`)}function packumentUrl(t,n){let S=ensureTrailingSlash$1(n);if(t.startsWith(`@`)){let n=t.indexOf(`/`);if(n<0)throw TypeError(`Invalid scoped package name: ${t}`);let C=t.slice(0,n),N=t.slice(n+1);return`${S}${encodeURIComponent(C)}/${encodeURIComponent(N)}`}return`${S}${encodeURIComponent(t)}`}async function fetchPackumentConditional(t,n={}){let S=packumentUrl(t,n.registry??registryFor(t,n.npmrc)),C=buildHeaders(S,{...n,acceptEncoding:`gzip`});C.accept??=n.fullMetadata?`application/json`:`application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`,n.ifNoneMatch&&(C[`if-none-match`]=n.ifNoneMatch);let N=await fetchWithRetry(S,{headers:C,signal:n.signal},{fetch:n.fetch,retries:n.retries,retryDelayMs:n.retryDelayMs,timeoutMs:n.timeoutMs,onRetry:n.onRetry,read:async n=>{if(n.status===304){try{await n.arrayBuffer()}catch{}return{status:`not-modified`}}if(!n.ok)throw n.status===404||n.status===406?new PackageNotFoundError(t,S):Error(`registry GET ${S} -> ${n.status} ${n.statusText}`);return{status:`fresh`,body:await decodeJsonBody(n),etag:n.headers.get(`etag`)??void 0}}});if(N.status===`not-modified`)return{status:`not-modified`,etag:n.ifNoneMatch};let F=N.body;return assertPackument(t,F),{status:`fresh`,packument:F,etag:N.etag}}async function decodeJsonBody(t){return t.json()}async function fetchPackument(t,n={}){let S=await fetchPackumentConditional(t,n);if(!S.packument)throw Error(`registry: ${t} returned 304 Not Modified to an unconditional request`);return S.packument}var $m=__esmMin(()=>{qm(),Jm(),Xm(),Zm()});async function fetchTarball(t,n={}){let S=buildHeaders(t,{...n,acceptEncoding:`identity`});S.accept??=`application/octet-stream`;let C=await fetchWithRetry(t,{headers:S,signal:n.signal},{fetch:n.fetch,retries:n.retries,retryDelayMs:n.retryDelayMs,timeoutMs:n.timeoutMs,onRetry:n.onRetry,retryNotFound:n.retryNotFound??!0,read:async n=>{if(!n.ok)throw Error(`tarball GET ${t} -> ${n.status} ${n.statusText}`);return new Uint8Array(await n.arrayBuffer())}});if(n.integrity&&!await verifyIntegrity(C,n.integrity))throw new IntegrityError(t,n.integrity);return C}var eh=__esmMin(()=>{qm(),Jm(),Zm(),Qm()});async function whoami(t,n){let S=`${ensureTrailingSlash$1(t)}-/whoami`,C=buildHeaders(S,{npmrc:n});C.accept=`application/json`;let N=globalThis.fetch;if(!N)throw Error(`@gjsify/npm-registry: globalThis.fetch is missing`);let F=await N(S,{method:`GET`,headers:C});if(!F.ok)throw Error(`whoami GET ${S} -> ${F.status} ${F.statusText}`);let I=await F.json();if(I&&typeof I==`object`&&`username`in I){let t=I.username;if(typeof t==`string`&&t.length>0)return{username:t}}return{}}var th=__esmMin(()=>{qm(),Xm()}),nh=__esmMin(()=>{qm(),Jm(),Xm(),Qm(),$m(),eh(),th()});function escapePackageName(t){return t.replace(`/`,`%2f`)}function buildPublishHeaders(t,n){let S=buildHeaders(t,{npmrc:n.npmrc});return S[`content-type`]=`application/json`,S[`npm-command`]=`publish`,S[`npm-auth-type`]=n.otp?`legacy`:`web`,S[`user-agent`]=n.userAgent??defaultUserAgent(),n.otp&&(S[`npm-otp`]=n.otp),n.authorization&&(S.authorization=n.authorization),S}function cliVersion(){return rh===void 0&&(rh=`0.64.9`),rh}function cliPackageDir(){let t=globalThis.process?.env?.GJSIFY_CLI_PACKAGE_JSON,n;try{n=On(t||fileURLToPath(import.meta.url))}catch{return null}for(let t=0;t<12;t++){try{if(JSON.parse(readFileSync(`${n}/package.json`,`utf8`)).name===`@gjsify/cli`)return n}catch{}let t=On(n);if(t===n)break;n=t}return null}function defaultUserAgent(){let t=globalThis.process,n=t?.arch??`x64`,S=t?.platform??`linux`;return`gjsify-publish/${cliVersion()} (${S} ${n})`}var rh,ih=__esmMin(()=>{Bd(),In(),qn(),nh()}),ah,oh=__esmMin(()=>{ah=`gjsify`});function parseDeclaredChannel(t,n){if(!(t===void 0||t===``)){if(sh.includes(t))return t;throw Error(`${n}: "${String(t)}" is not a distribution channel. Known: ${sh.join(`, `)}.`)}}function channelAllowsDonations(t){return t!==void 0&&ch[t]===!0}var sh,ch,lh,uh=__esmMin(()=>{sh=[`flathub`,`web`,`microsoft-store`,`apple-app-store`],ch={flathub:!0,web:!0,"microsoft-store":!1,"apple-app-store":!1},lh=`GJSIFY_CHANNEL`}),dh=__commonJSMin(((t,n)=>{let S=(In(),__toCommonJS(xn)),C=(Rl(),__toCommonJS(Pl)),N=(Bd(),__toCommonJS(Rd)),resolveFrom=(t,n,F)=>{if(typeof t!=`string`)throw TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof t}\``);if(typeof n!=`string`)throw TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof n}\``);try{t=N.realpathSync(t)}catch(n){if(n.code===`ENOENT`)t=S.resolve(t);else if(F)return null;else throw n}let I=S.join(t,`noop.js`),resolveFileName=()=>C._resolveFilename(n,{id:I,filename:I,paths:C._nodeModulePaths(t)});if(F)try{return resolveFileName()}catch{return null}return resolveFileName()};n.exports=(t,n)=>resolveFrom(t,n),n.exports.silent=(t,n)=>resolveFrom(t,n,!0)})),fh=__commonJSMin(((t,n)=>{let callsites=()=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=(t,n)=>n;let n=Error().stack.slice(1);return Error.prepareStackTrace=t,n};n.exports=callsites,n.exports.default=callsites})),ph=__commonJSMin(((t,n)=>{let S=fh();n.exports=t=>{let n=S();if(!t)return n[2].getFileName();let C=!1;n.shift();for(let S of n){let n=S.getFileName();if(typeof n==`string`){if(n===t){C=!0;continue}if(n!==`module.js`&&C&&n!==t)return n}}}})),mh=__commonJSMin(((t,n)=>{var{__gjsifyModuleDir:S,__gjsifyModuleFile:C}=(Hl(),__toCommonJS(zl)),N=S(`import-fresh/index.js`),F=C(`import-fresh/index.js`);let I=(In(),__toCommonJS(xn)),H=dh(),W=ph();n.exports=t=>{if(typeof t!=`string`)throw TypeError(`Expected a string`);let n=W(F),S=n?I.dirname(n):N,C=H(S,t),q=Y.cache[C];if(q&&q.parent){let t=q.parent.children.length;for(;t--;)q.parent.children[t].id===C&&q.parent.children.splice(t,1)}delete Y.cache[C];let X=Y.cache[n];return X===void 0||X.require===void 0?Y(C):X.require(C)}})),hh=__commonJSMin(((t,n)=>{n.exports=function isArrayish(t){return t?t instanceof Array||Array.isArray(t)||t.length>=0&&t.splice instanceof Function:!1}})),gh=__commonJSMin(((t,n)=>{var S=(Du(),__toCommonJS(Cu)),C=hh(),N=function errorEx(t,n){(!t||t.constructor!==String)&&(n=t||{},t=Error.name);var N=function ErrorEXError(S){if(!this)return new ErrorEXError(S);S=S instanceof Error?S.message:S||this.message,Error.call(this,S),Error.captureStackTrace(this,N),this.name=t,Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,get:function(){var t=S.split(/\r?\n/g);for(var N in n)if(n.hasOwnProperty(N)){var F=n[N];`message`in F&&(t=F.message(this[N],t)||t,C(t)||(t=[t]))}return t.join(`
|
|
149
149
|
`)},set:function(t){S=t}});var F=null,I=Object.getOwnPropertyDescriptor(this,`stack`),H=I.get,W=I.value;delete I.value,delete I.writable,I.set=function(t){F=t},I.get=function(){var t=(F||(H?H.call(this):W)).split(/\r?\n+/g);F||(t[0]=this.name+`: `+this.message);var S=1;for(var C in n)if(n.hasOwnProperty(C)){var N=n[C];if(`line`in N){var I=N.line(this[C]);I&&t.splice(S++,0,` `+I)}`stack`in N&&N.stack(this[C],t)}return t.join(`
|
|
150
150
|
`)},Object.defineProperty(this,"stack",I)};return Object.setPrototypeOf?(Object.setPrototypeOf(N.prototype,Error.prototype),Object.setPrototypeOf(N,Error)):S.inherits(N,Error),N};N.append=function(t,n){return{message:function(S,C){return S||=n,S&&(C[0]+=` `+t.replace(`%s`,S.toString())),C}}},N.line=function(t,n){return{line:function(S){return S||=n,S?t.replace(`%s`,S.toString()):null}}},n.exports=N})),vh=__commonJSMin(((t,n)=>{let hexify=t=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return`0x`+(n.length%2?`0`:``)+n},parseError=(t,n,S)=>{if(!n)return{message:t.message+` while parsing empty string`,position:0};let C=t.message.match(/^Unexpected token (.) .*position\s+(\d+)/i),N=C?+C[2]:t.message.match(/^Unexpected end of JSON.*/i)?n.length-1:null,F=C?t.message.replace(/^Unexpected token ./,`Unexpected token ${JSON.stringify(C[1])} (${hexify(C[1])})`):t.message;if(N!=null){let t=N<=S?0:N-S,C=N+S>=n.length?n.length:N+S,I=(t===0?``:`...`)+n.slice(t,C)+(C===n.length?``:`...`);return{message:F+` while parsing ${n===I?``:`near `}${JSON.stringify(I)}`,position:N}}else return{message:F+` while parsing '${n.slice(0,S*2)}'`,position:0}};var JSONParseError=class extends SyntaxError{constructor(t,n,S,C){S||=20;let N=parseError(t,n,S);super(N.message),Object.assign(this,N),this.code=`EJSONPARSE`,this.systemError=t,Error.captureStackTrace(this,C||this.constructor)}get name(){return this.constructor.name}set name(t){}get[Symbol.toStringTag](){return this.constructor.name}};let S=Symbol.for(`indent`),C=Symbol.for(`newline`),N=/^\s*[{\[]((?:\r?\n)+)([\s\t]*)/,F=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,parseJson=(t,n,I)=>{let H=stripBOM(t);I||=20;try{let[,t=`
|
|
151
151
|
`,I=` `]=H.match(F)||H.match(N)||[,``,``],W=JSON.parse(H,n);return W&&typeof W==`object`&&(W[C]=t,W[S]=I),W}catch(n){if(typeof t!=`string`&&!Buffer.isBuffer(t)){let S=Array.isArray(t)&&t.length===0;throw Object.assign(TypeError(`Cannot parse ${S?`an empty array`:String(t)}`),{code:`EJSONPARSE`,systemError:n})}throw new JSONParseError(n,H,I,parseJson)}},stripBOM=t=>String(t).replace(/^\uFEFF/,``);n.exports=parseJson,parseJson.JSONParseError=JSONParseError,parseJson.noExceptions=(t,n)=>{try{return JSON.parse(stripBOM(t),n)}catch{}}})),yh=__commonJSMin((t=>{t.__esModule=!0,t.LinesAndColumns=void 0;var n=`
|
|
@@ -1158,7 +1158,7 @@ A misplaced catalogue installs and then shows nothing, which reads exactly like
|
|
|
1158
1158
|
TRUNCATED, so the artifact would carry a version that is not the one it was built from. Set \`gjsify.ship.version\`.`);return`${S}.${C}.${N}`}function msiIdentifier(t,n,S=``){let C=createHash(`sha1`).update(new TextEncoder().encode(n)).digest(`hex`).slice(0,12),N=n.replace(/[^A-Za-z0-9_.]/g,`_`),F=72-t.length-2-C.length-S.length;return`${t}_${N.length>F?N.slice(N.length-F):N}_${C}${S}`}function assertNameIsAddressable(t,n){if(t===`.`||t===`..`||t.length===0||LH.test(t))throw Error(`gjsify ship: the payload holds "${n}", and Windows Installer cannot address the path segment "${t}". A \`FileName\` or \`DefaultDir\` cell reserves < > : " / \\ | ? * and ; (its own list separator), and
|
|
1159
1159
|
\`.\` and \`..\` are not names. The \`.msi\` would build and install the file somewhere else, or not at all.`);if(t.length>255)throw Error(`gjsify ship: the payload holds "${n}", whose segment "${t.slice(0,40)}…" is ${t.length} characters. Windows Installer's \`FileName\` column is 255.`)}function directoryTree(t){let n={path:``,name:``,children:new Map,files:[]};for(let S of[...t].sort((t,n)=>t.path<n.path?-1:+(t.path>n.path))){let t=S.path.split(`/`),C=t.pop();if(C===void 0)throw Error(`gjsify ship: the payload holds an empty path.`);let N=n;for(let n of t){assertNameIsAddressable(n,S.path);let t=N.children.get(n)??{path:N.path===``?n:`${N.path}/${n}`,name:n,children:new Map,files:[]};N.children.set(n,t),N=t}assertNameIsAddressable(C,S.path),N.files.push(S)}return n}function renderWxs(t){let{settings:n,programDirName:S,archLabel:C}=t,N=C!==`x86`,F=msiProductVersion(n.version),I=n.maintainer.replace(/\s*<[^>]*>\s*$/,``).trim()||n.maintainer,H=windowsGuiLauncherPath(n),W=new Map,claim=(t,n)=>{let S=W.get(t);if(S!==void 0)throw Error(`gjsify ship: the MSI identifier "${t}" would be shared by ${S} and ${n}. Two rows cannot carry one id — one would silently replace the other.`);return W.set(t,n),t},q=claim(msiIdentifier(`i`,H,`.exe`),`the launcher icon`),Y=[],X=[],Z=!1,te,emitDir=(t,S)=>{for(let C of t.files){let t=claim(msiIdentifier(`c`,C.path),C.path),F=claim(msiIdentifier(`f`,C.path),C.path);X.push(t);let I=msiComponentGuid(n,C.path),W=xmlEscape(hn.basename(C.path));Y.push(`${S}<Component Id="${t}" Guid="${I}" Win64="${N?`yes`:`no`}">`),C.path===H?(Z=!0,te=C.source,Y.push(`${S} <File Id="${F}" Name="${W}" Source="${xmlEscape(C.source)}" KeyPath="yes">`),Y.push(`${S} <Shortcut Id="${claim(`s_startmenu`,`the Start-Menu shortcut`)}" Directory="ProgramMenuFolder" Name="${xmlEscape(n.name)}" WorkingDirectory="INSTALLDIR" Description="${xmlEscape(n.summary)}" Icon="${q}" IconIndex="0" Advertise="yes" />`),Y.push(`${S} </File>`)):Y.push(`${S} <File Id="${F}" Name="${W}" Source="${xmlEscape(C.source)}" KeyPath="yes" />`),Y.push(`${S}</Component>`)}for(let n of[...t.children.values()].sort((t,n)=>t.name<n.name?-1:1)){let t=claim(msiIdentifier(`d`,n.path),`the directory ${n.path}`);Y.push(`${S}<Directory Id="${t}" Name="${xmlEscape(n.name)}">`),emitDir(n,`${S} `),Y.push(`${S}</Directory>`)}};if(emitDir(directoryTree(t.files),` `),X.length===0)throw Error("gjsify ship: the windows payload is empty, so there is nothing for an `.msi` to install.");if(!Z||te===void 0)throw Error(`gjsify ship: the windows payload carries no "${H}" at the root of the program directory, so the installer would have nothing to point a Start-Menu shortcut at — an application a user installs and
|
|
1160
1160
|
cannot start. \`windows-dir\` puts the launcher there; a payload without one is a stage assembled for another layout.`);let ne=n.homepage===void 0?[]:[` <Property Id="ARPURLINFOABOUT" Value="${xmlEscape(n.homepage)}" />`];return[`<?xml version="1.0" encoding="utf-8"?>`,"<!-- Generated by `gjsify ship` (ADR 0024 stage 5). Do not edit; edit utils/ship/msi.ts. -->",`<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">`,` <Product Id="${msiProductCode(n,C)}" Name="${xmlEscape(n.name)}" Language="1033" Version="${F}" Manufacturer="${xmlEscape(I)}" UpgradeCode="${msiUpgradeCode(n)}">`,` <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Manufacturer="${xmlEscape(I)}" Description="${xmlEscape(n.summary)}" />`,` <MajorUpgrade DowngradeErrorMessage="A newer version of ${xmlEscape(n.name)} is already installed." />`,` <Media Id="1" Cabinet="app.cab" EmbedCab="yes" />`,` <Icon Id="${q}" SourceFile="${xmlEscape(te)}" />`,` <Property Id="ARPPRODUCTICON" Value="${q}" />`,...ne,` <Directory Id="TARGETDIR" Name="SourceDir">`,` <Directory Id="ProgramFiles64Folder">`,` <Directory Id="INSTALLDIR" Name="${xmlEscape(S)}">`,...Y,` </Directory>`,` </Directory>`,` <Directory Id="ProgramMenuFolder" />`,` </Directory>`,` <Feature Id="Main" Title="${xmlEscape(n.name)}" Level="1">`,...X.map(t=>` <ComponentRef Id="${t}" />`),` </Feature>`,` </Product>`,`</Wix>`,``].join(`
|
|
1161
|
-
`)}function msiBackendFor(t){if(t===`linux`)return`wixl`;if(t===`win32`)return`wix3`;throw Error(`gjsify ship: no MSI compiler is wired for ${t}. \`wixl\` (msitools) is used on linux and WiX v3 on win32; assembly is not host-bound, so \`gjsify ship windows --stage\` here and \`gjsify ship --from-stage <dir> --target msi\` there is the way across.`)}async function buildMsi(t){let n=msiBackendFor(t.host??process.platform);mkdirSync(t.workDir,{recursive:!0});let S=$(t.workDir,`${t.settings.binaryName}.wxs`);if(writeFileSync(S,renderWxs(t)),n===`wixl`)return await run(`wixl`,[`-a`,t.archLabel,`-o`,t.target,S],t),S;let C=$(t.workDir,`obj`);return rmSync(C,{recursive:!0,force:!0,maxRetries:5}),mkdirSync(C,{recursive:!0}),await run(`candle.exe`,[`-nologo`,`-arch`,t.archLabel,`-out`,`${C}\\`,S],t),await run(`light.exe`,[`-nologo`,`-out`,t.target,$(C,`${t.settings.binaryName}.wixobj`)],t),S}async function run(t,n,S){S.verbose&&ge.log(`[gjsify ship] ${t} ${n.join(` `)}`);let C=await spawnToCompletion(t,[...n],{completion:`return`,cwd:S.workDir,stdio:`inherit`,notFound:()=>Error(`gjsify ship: ${t} not found. It is the MSI compiler for this host — Fedora: \`sudo dnf install msitools\`, Debian/Ubuntu: \`sudo apt install msitools\`, Windows: WiX Toolset v3.14 with its \`bin\` directory on PATH.`)});if(C.code!==0)throw Error(`gjsify ship: ${t} failed with ${describeExit(C)}.`)}var IH,LH,RH,zH=__esmMin(()=>{_e(),el(),Bd(),In(),U_(),_V(),PV(),IH=`7b3a1f6e-0c4d-4a2b-9e51-3d8c6f2a0b14`,LH=/[<>:"/\\|?*;]/,RH=`root`});function getCrcTable(){if(KH!==null)return KH;let t=new Uint32Array(256);for(let n=0;n<256;n++){let S=n;for(let t=0;t<8;t++)S=S&1?3988292384^S>>>1:S>>>1;t[n]=S>>>0}return KH=t,t}function crc32(t){let n=getCrcTable(),S=4294967295;for(let C=0;C<t.length;C++)S=n[(S^t[C])&255]^S>>>8;return(S^4294967295)>>>0}function dosDateTime(t){let n=new Date(Math.max(t,315532800)*1e3);return{date:(n.getUTCFullYear()-1980&127)<<9|n.getUTCMonth()+1<<5|n.getUTCDate(),time:n.getUTCHours()<<11|n.getUTCMinutes()<<5|Math.floor(n.getUTCSeconds()/2)}}function buildZip(t,n){let S=[...t].sort((t,n)=>t.path<n.path?-1:+(t.path>n.path)),{date:C,time:N}=dosDateTime(n),F=new TextEncoder;if(S.length>65535)throw Error(`gjsify ship: this archive would hold ${S.length} entries and a non-ZIP64 central directory records the count in 16 bits, so it would silently wrap. Nothing here writes ZIP64 yet; the payload has to shrink, or this writer has to grow the ZIP64 records.`);let I=new Writer,H=new Writer,W=0;for(let t of S){let n=F.encode(t.path),S=crc32(t.data),q=t.data.byteLength,Y=I.offset;if(Y>4294967295||q>4294967295)throw Error(`gjsify ship: ${t.path} would push this archive past 4 GiB, which a non-ZIP64 header records in 32 bits and therefore truncates. Nothing here writes ZIP64 yet.`);I.u32(BH),I.u16(GH),I.u16(2048),I.u16(UH),I.u16(N),I.u16(C),I.u32(S),I.u32(q),I.u32(q),I.u16(n.byteLength),I.u16(0),I.bytes(n),I.bytes(t.data),H.u32(VH),H.u16(WH),H.u16(GH),H.u16(2048),H.u16(UH),H.u16(N),H.u16(C),H.u32(S),H.u32(q),H.u32(q),H.u16(n.byteLength),H.u16(0),H.u16(0),H.u16(0),H.u16(0),H.u32(((32768|t.mode&4095)>>>0)*65536),H.u32(Y),H.bytes(n),W+=1}let q=H.finish(),Y=new Writer;Y.bytes(I.finish());let X=Y.offset;return Y.bytes(q),Y.u32(HH),Y.u16(0),Y.u16(0),Y.u16(W),Y.u16(W),Y.u32(q.byteLength),Y.u32(X),Y.u16(0),Y.finish()}function zipEntriesFromPayload(t,n=``){let S=n===``?``:`${n}/`;return t.map(t=>({path:`${S}${t.path}`,mode:t.mode,data:t.data}))}var BH,VH,HH,UH,WH,GH,KH,Writer,qH=__esmMin(()=>{BH=67324752,VH=33639248,HH=101010256,UH=0,WH=788,GH=20,KH=null,Writer=class{parts=[];length=0;get offset(){return this.length}u16(t){this.push(new Uint8Array([t&255,t>>>8&255]))}u32(t){this.push(new Uint8Array([t&255,t>>>8&255,t>>>16&255,t>>>24&255]))}bytes(t){this.push(t)}push(t){this.parts.push(t),this.length+=t.byteLength}finish(){let t=new Uint8Array(this.length),n=0;for(let S of this.parts)t.set(S,n),n+=S.byteLength;return t}}});function entryEvidence(t){let n=new Set,S=new Set;return walkModuleAst(t,t=>{let C=importedSpecifier(t);C!==null&&(C.startsWith(`gi://`)||JH.has(C)?n.add(C):C.startsWith(`node:`)&&S.add(C))}),{gi:[...n].sort(),node:[...S].sort()}}function assertEntryRunsUnder(t){let n=entryEvidence(t.source),S=t.interpreter===`node`?n.gi:n.node;if(S.length===0)return;let C=t.interpreter===`node`?`gjs`:`node`,N=t.interpreter===`gjs`?`GJS's loader refuses it: ImportError, "Unsupported URI scheme for importing: node"`:S.some(t=>t.startsWith(`gi://`))?`node's ESM loader refuses it: ERR_UNSUPPORTED_ESM_URL_SCHEME, "Only URLs with a scheme in: file, data, and node are supported by the default ESM loader"`:`node's ESM loader refuses it: ERR_MODULE_NOT_FOUND — a GJS built-in is not a package`,F=S.slice(0,3).join(`, `),I=S.length>3?`, and ${S.length-3} more`:``;throw Error(`gjsify ship: this target execs \`${t.interpreter}\` (\`${t.appKey}\`), and the entry it would ship — ${t.entry} (\`${t.bundleKey}\`) — imports ${F}${I}.\n ${N}, before a line of application code runs.\n The artifact would be built, reported as built, and fail at launch on every machine.
|
|
1161
|
+
`)}function msiBackendFor(t){if(t===`linux`)return`wixl`;if(t===`win32`)return`wix3`;throw Error(`gjsify ship: no MSI compiler is wired for ${t}. \`wixl\` (msitools) is used on linux and WiX v3 on win32; assembly is not host-bound, so \`gjsify ship windows --stage\` here and \`gjsify ship --from-stage <dir> --target msi\` there is the way across.`)}async function buildMsi(t){let n=msiBackendFor(t.host??process.platform);mkdirSync(t.workDir,{recursive:!0});let S=$(t.workDir,`${t.settings.binaryName}.wxs`);if(writeFileSync(S,renderWxs(t)),n===`wixl`)return await run(`wixl`,[`-a`,t.archLabel,`-o`,t.target,S],t),S;let C=$(t.workDir,`obj`);return rmSync(C,{recursive:!0,force:!0,maxRetries:5}),mkdirSync(C,{recursive:!0}),await run(`candle.exe`,[`-nologo`,`-arch`,t.archLabel,`-out`,`${C}\\`,S],t),await run(`light.exe`,[`-nologo`,`-out`,t.target,$(C,`${t.settings.binaryName}.wixobj`)],t),S}async function run(t,n,S){S.verbose&&ge.log(`[gjsify ship] ${t} ${n.join(` `)}`);let C=await spawnToCompletion(t,[...n],{completion:`return`,cwd:S.workDir,stdio:`inherit`,notFound:()=>Error(`gjsify ship: ${t} not found. It is the MSI compiler for this host — Fedora: \`sudo dnf install msitools\`, Debian/Ubuntu: \`sudo apt install msitools\`, Windows: WiX Toolset v3.14 with its \`bin\` directory on PATH.`)});if(C.code!==0)throw Error(`gjsify ship: ${t} failed with ${describeExit(C)}.`)}var IH,LH,RH,zH=__esmMin(()=>{_e(),el(),Bd(),In(),U_(),_V(),PV(),IH=`7b3a1f6e-0c4d-4a2b-9e51-3d8c6f2a0b14`,LH=/[<>:"/\\|?*;]/,RH=`root`});function getCrcTable(){if(KH!==null)return KH;let t=new Uint32Array(256);for(let n=0;n<256;n++){let S=n;for(let t=0;t<8;t++)S=S&1?3988292384^S>>>1:S>>>1;t[n]=S>>>0}return KH=t,t}function crc32(t){let n=getCrcTable(),S=4294967295;for(let C=0;C<t.length;C++)S=n[(S^t[C])&255]^S>>>8;return(S^4294967295)>>>0}function dosDateTime(t){let n=new Date(Math.max(t,315532800)*1e3);return{date:(n.getUTCFullYear()-1980&127)<<9|n.getUTCMonth()+1<<5|n.getUTCDate(),time:n.getUTCHours()<<11|n.getUTCMinutes()<<5|Math.floor(n.getUTCSeconds()/2)}}function buildZip(t,n){let S=[...t].sort((t,n)=>t.path<n.path?-1:+(t.path>n.path)),{date:C,time:N}=dosDateTime(n),F=new TextEncoder;if(S.length>65535)throw Error(`gjsify ship: this archive would hold ${S.length} entries and a non-ZIP64 central directory records the count in 16 bits, so it would silently wrap. Nothing here writes ZIP64 yet; the payload has to shrink, or this writer has to grow the ZIP64 records.`);let I=new Writer,H=new Writer,W=0;for(let t of S){let n=F.encode(t.path),S=crc32(t.data),q=t.data.byteLength,Y=I.offset;if(Y>4294967295||q>4294967295)throw Error(`gjsify ship: ${t.path} would push this archive past 4 GiB, which a non-ZIP64 header records in 32 bits and therefore truncates. Nothing here writes ZIP64 yet.`);I.u32(BH),I.u16(GH),I.u16(2048),I.u16(UH),I.u16(N),I.u16(C),I.u32(S),I.u32(q),I.u32(q),I.u16(n.byteLength),I.u16(0),I.bytes(n),I.bytes(t.data),H.u32(VH),H.u16(WH),H.u16(GH),H.u16(2048),H.u16(UH),H.u16(N),H.u16(C),H.u32(S),H.u32(q),H.u32(q),H.u16(n.byteLength),H.u16(0),H.u16(0),H.u16(0),H.u16(0),H.u32(((32768|t.mode&4095)>>>0)*65536),H.u32(Y),H.bytes(n),W+=1}let q=H.finish(),Y=new Writer;Y.bytes(I.finish());let X=Y.offset;return Y.bytes(q),Y.u32(HH),Y.u16(0),Y.u16(0),Y.u16(W),Y.u16(W),Y.u32(q.byteLength),Y.u32(X),Y.u16(0),Y.finish()}function zipEntriesFromPayload(t,n=``){let S=n===``?``:`${n}/`;return t.map(t=>({path:`${S}${t.path}`,mode:t.mode,data:t.data}))}var BH,VH,HH,UH,WH,GH,KH,Writer,qH=__esmMin(()=>{BH=67324752,VH=33639248,HH=101010256,UH=0,WH=788,GH=20,KH=null,Writer=class{parts=[];length=0;get offset(){return this.length}u16(t){this.push(new Uint8Array([t&255,t>>>8&255]))}u32(t){this.push(new Uint8Array([t&255,t>>>8&255,t>>>16&255,t>>>24&255]))}bytes(t){this.push(t)}push(t){this.parts.push(t),this.length+=t.byteLength}finish(){let t=new Uint8Array(this.length),n=0;for(let S of this.parts)t.set(S,n),n+=S.byteLength;return t}}});function entryEvidence(t){let n=new Set,S=new Set;return walkModuleAst(t,t=>{let C=importedSpecifier(t);C!==null&&(C.startsWith(`gi://`)||JH.has(C)?n.add(C):C.startsWith(`node:`)&&t.type!==`ImportExpression`&&S.add(C))}),{gi:[...n].sort(),node:[...S].sort()}}function assertEntryRunsUnder(t){let n=entryEvidence(t.source),S=t.interpreter===`node`?n.gi:n.node;if(S.length===0)return;let C=t.interpreter===`node`?`gjs`:`node`,N=t.interpreter===`gjs`?`GJS's loader refuses it: ImportError, "Unsupported URI scheme for importing: node"`:S.some(t=>t.startsWith(`gi://`))?`node's ESM loader refuses it: ERR_UNSUPPORTED_ESM_URL_SCHEME, "Only URLs with a scheme in: file, data, and node are supported by the default ESM loader"`:`node's ESM loader refuses it: ERR_MODULE_NOT_FOUND — a GJS built-in is not a package`,F=S.slice(0,3).join(`, `),I=S.length>3?`, and ${S.length-3} more`:``;throw Error(`gjsify ship: this target execs \`${t.interpreter}\` (\`${t.appKey}\`), and the entry it would ship — ${t.entry} (\`${t.bundleKey}\`) — imports ${F}${I}.\n ${N}, before a line of application code runs.\n The artifact would be built, reported as built, and fail at launch on every machine.
|
|
1162
1162
|
Either ship this target the \`--app ${t.interpreter}\` build of the app — \`gjsify.ship.bundle.${t.layoutOs}\` selects the entry per target, the way \`gjsify.ship.app.${t.layoutOs}\` selects the runtime —\n or set \`gjsify.ship.app.${t.layoutOs}\` to "${C}" if this bundle is the one that should ship.`)}var JH,YH=__esmMin(()=>{pI(),JH=new Set([`system`,`gettext`])});function base64Encode(t){let n=``,S=32768;for(let C=0;C<t.length;C+=S)n+=String.fromCharCode(...t.subarray(C,C+S));return btoa(n)}function base64Decode(t){let n=atob(t),S=new Uint8Array(n.length);for(let t=0;t<n.length;t++)S[t]=n.charCodeAt(t);return S}var XH=__esmMin(()=>{});function toPackSettings(t){return{binaryName:t.binaryName,appId:t.appId,name:t.name,version:t.version,release:t.release,maintainer:t.maintainer,summary:t.summary,description:t.description,license:t.license,...t.homepage===void 0?{}:{homepage:t.homepage},section:t.section,group:t.group,extraDepends:t.extraDepends,typelibPackages:t.typelibPackages,app:t.app,minGjsVersion:t.minGjsVersion,minNodeVersion:t.minNodeVersion,flatpak:t.flatpak}}function stageManifestPath(t){return $(t,ZH)}function formatTarget(t){return`${t.os}-${t.arch}`}function writeStageManifest(t){let n={};for(let S of t.formats)n[S.id]=(t.overlay.get(S.id)??[]).map(t=>{if(t.source.kind===`text`)return{path:t.path,mode:t.mode,text:t.source.text};if(t.source.kind===`bytes`)return{path:t.path,mode:t.mode,base64:base64Encode(t.source.data)};throw Error(`gjsify ship: internal error — the ${S.id} overlay entry ${t.path} is a file reference, and a stage manifest may only carry rendered bytes. Render it in \`planOverlay\` instead.`)});let S={schema:6,tool:{name:`@gjsify/cli`,version:cliVersion()},target:{os:t.settings.layoutOs,arch:t.settings.arch},formats:t.formats.map(t=>t.id),mtime:t.mtime,namespaces:[...t.namespaces],optionalNamespaces:[...t.optionalNamespaces??[]],settings:toPackSettings(t.settings),staged:t.staged.map(n=>({path:n.path,mode:n.mode,bytes:statSync($(t.stageDir,n.path.split(`/`).join(Nn))).size})),overlay:n};return writeFileSync(stageManifestPath(t.stageDir),`${JSON.stringify(S,null,2)}\n`),S}function readStageManifest(t){let n=stageManifestPath(t);if(!existsSync(n))throw Error(`gjsify ship: ${t} has no ${ZH}, so it is not a stage this command can pack. A stage is produced by \`gjsify ship --stage\`, which writes that file at the stage root beside the payload. If you pointed --from-stage at a project's \`ship/\` directory, point it at \`ship/stage/\` instead.`);let S;try{S=JSON.parse(readFileSync(n,`utf-8`))}catch(t){throw Error(`gjsify ship: ${n} is not readable JSON (${t.message}). Re-run the \`--stage\` phase; a truncated manifest means the stage transfer was truncated too.`)}if(typeof S!=`object`||!S||Array.isArray(S))throw Error(`gjsify ship: ${n} is not a JSON object. Re-run the \`--stage\` phase.`);let C=S,N=C.schema;if(typeof N!=`number`||!Number.isInteger(N))throw Error(`gjsify ship: ${n} has no integer \`schema\` field, so it was not written by \`gjsify ship --stage\`. Re-run the \`--stage\` phase.`);if(N>6)throw Error(`gjsify ship: ${n} declares schema ${N} and this gjsify understands 6. The stage was assembled by a newer gjsify: upgrade this one (\`gjsify self-update\`), or re-run the \`--stage\` phase with this version. A manifest from the future is refused rather than partially read, because an unknown field could be the one that decides a file's mode.`);if(N<6)throw Error(`gjsify ship: ${n} declares schema ${N} and this gjsify understands 6. Re-run the \`--stage\` phase with this gjsify. A stage is a short-lived intermediate between two jobs of one run, not an archive, so no migration is kept for it.`);let at=t=>`${n} → ${t}`,F=record(C.tool,at(`tool`)),I=record(C.target,at(`target`)),H={schema:N,tool:{name:expectString(F.name,at(`tool.name`)),version:expectString(F.version,at(`tool.version`))},target:{os:expectLayoutOs(expectString(I.os,at(`target.os`)),at(`target.os`)),arch:expectString(I.arch,at(`target.arch`))},formats:expectArray(C.formats,at(`formats`)).map((t,n)=>{let S=expectString(t,at(`formats[${n}]`));if(!NH.includes(S))throw Error(`gjsify ship: ${at(`formats[${n}]`)} is "${S}", which this gjsify does not know. Known formats: ${NH.join(`, `)}.`);return S}),mtime:expectInteger(C.mtime,at(`mtime`)),namespaces:expectArray(C.namespaces,at(`namespaces`)).map((t,n)=>expectString(t,at(`namespaces[${n}]`))),...C.optionalNamespaces===void 0?{}:{optionalNamespaces:expectArray(C.optionalNamespaces,at(`optionalNamespaces`)).map((t,n)=>expectString(t,at(`optionalNamespaces[${n}]`)))},settings:readPackSettings(record(C.settings,at(`settings`)),at(`settings`)),staged:expectArray(C.staged,at(`staged`)).map((t,n)=>{let S=record(t,at(`staged[${n}]`));return{path:expectString(S.path,at(`staged[${n}].path`)),mode:expectInteger(S.mode,at(`staged[${n}].mode`)),bytes:expectInteger(S.bytes,at(`staged[${n}].bytes`))}}),overlay:{}};if(H.staged.length===0)throw Error(`gjsify ship: ${at(`staged`)} is empty, so this stage describes no payload. A stage always carries at least the launcher its plan named. Re-run the \`--stage\` phase; a stage that lost its plan cannot be packed into anything but an empty package.`);let W=record(C.overlay,at(`overlay`));for(let t of H.formats)H.overlay[t]=expectArray(W[t],at(`overlay.${t}`)).map((n,S)=>{let C=record(n,at(`overlay.${t}[${S}]`)),N=at(`overlay.${t}[${S}]`);if(C.text===void 0==(C.base64===void 0))throw Error(`gjsify ship: ${N} must carry exactly one of \`text\` and \`base64\`. An overlay entry is either rendered text or rendered bytes; an entry with neither would pack an empty file at a path the format requires content at.`);return{path:expectString(C.path,at(`overlay.${t}[${S}].path`)),mode:expectInteger(C.mode,at(`overlay.${t}[${S}].mode`)),...C.text===void 0?{base64:expectString(C.base64,at(`overlay.${t}[${S}].base64`))}:{text:expectString(C.text,at(`overlay.${t}[${S}].text`))}}});return H}function expectLayoutOs(t,n){try{return layoutForOs(t).os}catch{let S=hV.map(t=>mV[t].os).join(`, `);throw Error(`gjsify ship: ${n} is "${t}", which is not a layout this gjsify can pack. It carries the \`process.platform\` spelling and only that — ${S}, so \`win32\` and never \`windows\`. A stage holds exactly one OS's layout and every path in it has that OS's shape, so there is nothing to pack here. Re-run the \`--stage\` phase.`)}}function overlayFiles(t,n){return(t.overlay[n]??[]).map(t=>({path:t.path,mode:t.mode,source:t.base64===void 0?{kind:`text`,text:t.text??``}:{kind:`bytes`,data:base64Decode(t.base64)}}))}function assertExpectedTarget(t,n){if(n===void 0)return;let S=formatTarget(t.target);if(n!==S)throw Error(`gjsify ship: --expect-target ${n} but this stage was assembled for ${S}. The stage records the target its \`--arch\` resolved to at stage time, so this is a stage from another matrix leg: download the artifact belonging to ${n}, or drop --expect-target if packing this one is what you meant.`)}function assertFormatsStaged(t,n){let S=n.filter(n=>!t.formats.includes(n.id)).map(t=>t.id);if(S.length!==0)throw Error(`gjsify ship: this stage was assembled for ${t.formats.length===0?`no format at all`:t.formats.join(`, `)}, and --target names ${S.join(`, `)}. Phase one renders each format's overlay — rpm wants the licence at \`share/licenses/<pkg>/LICENSE\`, deb wants a machine-readable copyright at \`share/doc/<pkg>/copyright\` — so a format the stage never saw would pack without it, and Debian Policy § 12.5 makes that a broken package. Re-run \`gjsify ship --stage --target ${[...t.formats,...S].join(`,`)}\` on the assembling host.`)}function resolveStageMtime(t,n=process.env){let S=n.SOURCE_DATE_EPOCH;return S===void 0||Number(S)===t.mtime?{mtime:t.mtime,warnings:[]}:{mtime:t.mtime,warnings:[`SOURCE_DATE_EPOCH is ${S} here and this stage was stamped ${t.mtime}. The stage's stamp wins, because changing it would make this artifact differ from the same stage packed on the assembling host. Set the same value in both jobs, or set it in neither.`]}}function warnOnToolSkew(t){let n=cliVersion();return t.tool.version===n?[]:[`this stage was assembled by ${t.tool.name} ${t.tool.version} and is being packed by ${n}. Both phases run the same packer, so a version difference can change the artifact's bytes. Pin both jobs to one gjsify version.`]}function readPackSettings(t,n){let field=t=>`${n}.${t}`,S=record(t.extraDepends,field(`extraDepends`)),C=record(t.typelibPackages,field(`typelibPackages`));return{binaryName:expectString(t.binaryName,field(`binaryName`)),appId:expectString(t.appId,field(`appId`)),name:expectString(t.name,field(`name`)),version:expectString(t.version,field(`version`)),release:expectString(t.release,field(`release`)),maintainer:expectString(t.maintainer,field(`maintainer`)),summary:expectString(t.summary,field(`summary`)),description:expectArray(t.description,field(`description`)).map((t,n)=>expectString(t,field(`description[${n}]`))),license:expectString(t.license,field(`license`)),...t.homepage===void 0?{}:{homepage:expectString(t.homepage,field(`homepage`))},section:expectString(t.section,field(`section`)),group:expectString(t.group,field(`group`)),extraDepends:{deb:expectArray(S.deb??[],field(`extraDepends.deb`)).map((t,n)=>expectString(t,field(`extraDepends.deb[${n}]`))),rpm:expectArray(S.rpm??[],field(`extraDepends.rpm`)).map((t,n)=>expectString(t,field(`extraDepends.rpm[${n}]`)))},typelibPackages:Object.fromEntries(Object.entries(C).map(([t,n])=>{let S=record(n,field(`typelibPackages.${t}`));return[t,{deb:expectString(S.deb,field(`typelibPackages.${t}.deb`)),rpm:expectString(S.rpm,field(`typelibPackages.${t}.rpm`))}]})),app:expectApp(t.app,field(`app`)),minGjsVersion:expectString(t.minGjsVersion,field(`minGjsVersion`)),minNodeVersion:expectString(t.minNodeVersion,field(`minNodeVersion`)),flatpak:readFlatpakSettings(record(t.flatpak,field(`flatpak`)),field(`flatpak`))}}function readFlatpakSettings(t,n){let field=t=>`${n}.${t}`,strings=(t,n)=>expectArray(t,field(n)).map((t,S)=>expectString(t,field(`${n}[${S}]`)));return{runtime:expectString(t.runtime,field(`runtime`)),runtimeVersion:expectString(t.runtimeVersion,field(`runtimeVersion`)),sdk:expectString(t.sdk,field(`sdk`)),branch:expectString(t.branch,field(`branch`)),sdkExtensions:strings(t.sdkExtensions,`sdkExtensions`),appendPath:strings(t.appendPath,`appendPath`),finishArgs:strings(t.finishArgs,`finishArgs`),cleanup:strings(t.cleanup,`cleanup`)}}function record(t,n){if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`gjsify ship: ${n} must be an object. Re-run the \`--stage\` phase.`);return t}function expectArray(t,n){if(!Array.isArray(t))throw Error(`gjsify ship: ${n} must be an array. Re-run the \`--stage\` phase.`);return t}function expectApp(t,n){if(t===`gjs`||t===`node`)return t;throw Error(`gjsify ship: ${n} must be "gjs" or "node", got ${JSON.stringify(t)}.`)}function expectString(t,n){if(typeof t!=`string`)throw Error(`gjsify ship: ${n} must be a string. Re-run the \`--stage\` phase.`);return t}function expectInteger(t,n){if(typeof t!=`number`||!Number.isInteger(t)||t<0)throw Error(`gjsify ship: ${n} must be a non-negative integer. Re-run the \`--stage\` phase. (Modes are decimal here — JSON has no octal literal, so 0o755 is written 493.)`);return t}var ZH,QH=__esmMin(()=>{Bd(),In(),XH(),ih(),FH(),_V(),ZH=`.gjsify-ship-stage.json`});function writeStage(t,n){for(let t of n)if(t.path===`.gjsify-ship-stage.json`)throw Error(`gjsify ship: a payload file may not be called \`${ZH}\` — that name belongs to the stage manifest, which sits at the stage root beside the payload and carries what the packing host needs (ADR 0024 § A2). Rename the \`gjsify.ship.extraFiles\` destination.`);rmSync(t,{recursive:!0,force:!0,maxRetries:5}),mkdirSync(t,{recursive:!0});for(let S of n){let n=$(t,S.path.split(`/`).join(Nn));mkdirSync(On(n),{recursive:!0});let C;switch(S.source.kind){case`text`:C=new TextEncoder().encode(S.source.text);break;case`file`:C=new Uint8Array(readFileSync(S.source.path));break;case`bytes`:C=S.source.data;break;default:{let t=S.source;throw Error(`gjsify ship: no writer for the "${JSON.stringify(t)}" source kind.`)}}writeFileSync(n,C),chmodSync(n,S.mode)}}function readStage(t,n){let S=new Map(n.map(t=>[t.path,t])),C=new Map;for(let n of t)for(let t of listFilesRecursive(n)){if(t===`.gjsify-ship-stage.json`)continue;let N=S.get(t);if(N===void 0)throw Error(`gjsify ship: ${$(n,t.split(`/`).join(Nn))} is in the stage and not in its manifest, so nothing knows what mode to give it. Every payload file takes its mode from the plan, never from the filesystem, so a file that arrived some other way would be packed 0644 — unrunnable if it is a program. Remove it, or add it through \`gjsify.ship.extraFiles\` and re-run the \`--stage\` phase.`);let F=new Uint8Array(readFileSync($(n,t.split(`/`).join(Nn))));if(N.bytes!==void 0&&N.bytes!==F.byteLength)throw Error(`gjsify ship: ${t} is ${F.byteLength} bytes in the stage and ${N.bytes} in its manifest. The stage arrived truncated or was edited after it was assembled. Re-upload it, or re-run the \`--stage\` phase.`);C.set(t,{path:t,mode:N.mode,data:F})}let N=n.filter(t=>!C.has(t.path)).map(t=>t.path);if(N.length>0)throw Error(`gjsify ship: the stage manifest lists ${N.length} file(s) the stage does not contain: ${N.slice(0,5).join(`, `)}${N.length>5?`, …`:``}. A payload has to be complete before it is packed — both formats would pack the rest without complaint and install a package that cannot start. Re-run the \`--stage\` phase, and check that whatever moved the stage between hosts copied every file (an artifact upload that drops empty files or dotfiles is the usual cause).`);return[...C.values()].sort((t,n)=>t.path<n.path?-1:+(t.path>n.path))}function writePayload(t,n,S){let C=S===``?``:`${S}/`;rmSync(t,{recursive:!0,force:!0,maxRetries:5}),mkdirSync(t,{recursive:!0});for(let N of n){if(!N.path.startsWith(C))throw Error(`gjsify ship: ${N.path} is outside ${S||`the artifact`}, which this artifact IS — so there is nowhere inside it for the file to go. A payload file that escaped the bundle would ship beside it, unsigned and unfound.`);let n=$(t,N.path.slice(C.length).split(`/`).join(Nn));mkdirSync(On(n),{recursive:!0}),writeFileSync(n,N.data),chmodSync(n,N.mode)}}function directorySize(t){let n=0;for(let S of listFilesRecursive(t))n+=statSync($(t,S.split(`/`).join(Nn))).size;return n}var $H=__esmMin(()=>{Bd(),In(),JV(),QH()});function resolveSignPlan(t){let n=eU[t.layoutOs];if(n===void 0){if(t.flag!==void 0)throw Error(`gjsify ship: --sign has nothing to sign in the ${t.layoutOs} layout. A .deb and an .rpm carry no per-file signature — the artifact is signed as a whole by the repository that serves it (\`debsigs\`, \`rpmsign\`), with that repository's key and not with a build-time identity. Drop --sign, or assemble the darwin or windows layout.`);return{kind:`unsupported`}}let S=t.config?.[t.layoutOs]?.identity,[C,N]=t.flag===void 0?[S,`config`]:[t.flag,`flag`];return C===void 0||C===``?{kind:`skip`,message:`${C===``?`an empty identity was ${N===`flag`?`passed to --sign`:`set in \`${n.configKey}\``}`:`no identity was given`} — skipping ${n.tool}. An unsigned artifact is the default path and a legitimate deliverable (ADR 0024 § A13). Pass \`--sign <identity>\` or set \`${n.configKey}\` to sign; \`--sign -\` signs ad-hoc and needs no developer identity.`}:{kind:`sign`,identity:C,signer:n,source:N}}function assertHostCanSign(t){let n=process.platform;if(!t.signOn.includes(n))throw Error(`gjsify ship: signing the ${t.layoutOs} layout needs ${t.tool}, which runs on ${t.signOn.join(`, `)} and this host is ${n}. Assembly is not host-bound — \`gjsify ship <os> --stage\` here, then \`gjsify ship --from-stage <dir> --sign <identity>\` on a host that has both the tool and the identity (ADR 0024 § A1, § A14).`);if(!isOnPath(t.tool))throw Error(`gjsify ship: --sign was given and \`${t.tool}\` is not on PATH, so nothing can make the signature — ${t.installHint}. Dropping --sign produces an unsigned artifact, which is a legitimate output (ADR 0024 § A13); silently producing one while --sign was asked for is not.`)}function partitionSignedFileSet(t){let n=new Set(t.planned),S=new Set(t.arrived),C=[...S].filter(t=>!n.has(t)).sort(),N=t.sealPrefix;return{sealed:N===void 0?[]:C.filter(t=>t.startsWith(N)),unexpected:N===void 0?C:C.filter(t=>!t.startsWith(N)),removed:[...n].filter(t=>!S.has(t)).sort()}}async function signPayload(t){let{payload:n,signer:S,workDir:C}=t;writePayload(C,n,``);let N=t.identity===`-`,F,I=S.entitlements(N);I.length>0&&(mkdirSync(On(t.entitlementsPath),{recursive:!0}),writeFileSync(t.entitlementsPath,renderEntitlements(I)),F=t.entitlementsPath);let run=async(n,I)=>{let H=S.args({identity:t.identity,file:n,adhoc:N,...F?{entitlements:F}:{}});t.verbose&&t.log(`${S.tool} ${H.join(` `)}`);let W=await spawnToCompletion(S.tool,H,{completion:`return`,cwd:C,stdio:`inherit`,notFound:()=>Error(`gjsify ship: \`${S.tool}\` is not on PATH — ${S.installHint}.`)});if(W.code!==0)throw Error(`gjsify ship: ${S.tool} failed on ${I} with ${describeExit(W)}. Nothing is packed from a payload whose signature failed: an artifact that is half signed installs and is refused at first launch, which is worse than not shipping.`)},H=n.filter(t=>classifyBinary(t.data)===S.signs);if(H.length===0&&!S.sealsBundle)return t.log(`nothing in this payload is a ${S.signs===`macho`?`Mach-O`:`PE`} image, so ${S.tool} signed 0 file(s). The artifact carries no signature.`),[...n];for(let t of H)await run($(C,t.path.split(`/`).join(Nn)),t.path);let W;if(S.sealsBundle){if(t.bundleRoot===``)throw Error(`gjsify ship: the ${S.layoutOs} signer seals a bundle and this layout has no root to seal. \`Layout.root\` is what names the artifact directory; a signer that sealed the whole stage would sign the payload of every other format beside it.`);W=S.sealAddPrefix(t.bundleRoot),await run($(C,t.bundleRoot.split(`/`).join(Nn)),`${t.bundleRoot} (bundle seal)`)}let q=partitionSignedFileSet({arrived:listFilesRecursive(C),planned:n.map(t=>t.path),...W===void 0?{}:{sealPrefix:W}});if(q.unexpected.length>0||q.removed.length>0)throw Error(`gjsify ship: ${S.tool} changed the payload's file set — ${q.unexpected.length} added (${q.unexpected.slice(0,3).join(`, `)||`—`}), ${q.removed.length} removed (${q.removed.slice(0,3).join(`, `)||`—`}). Signing is a mutation of the files that are already in the payload (ADR 0024 § A4), plus exactly the seal's own directory${W===void 0?``:` (\`${W}\`)`}.`);let Y=q.sealed;t.log(`${S.tool} signed ${H.length} of ${n.length} payload file(s) as ${N?"ad-hoc (`-`)":`\`${t.identity}\``}${W===void 0?``:` and sealed ${t.bundleRoot} (${Y.length} seal file(s))`} — ${S.gap}.`);let read=t=>new Uint8Array(readFileSync($(C,t.split(`/`).join(Nn))));return[...n.map(t=>({path:t.path,mode:t.mode,data:read(t.path)})),...Y.map(t=>({path:t,mode:420,data:read(t)}))].sort((t,n)=>t.path<n.path?-1:+(t.path>n.path))}function resolveNotaryPlan(t){let n=tU[t.layoutOs];if(n===void 0){if(t.flag!==void 0)throw Error(`gjsify ship: --notarize has no meaning in the ${t.layoutOs} layout. Notarisation is Apple's pre-clearance of a signed artifact and nothing else asks for it — Windows SmartScreen accrues reputation per file hash instead (ADR 0024 § A5).`);return{kind:`unsupported`}}if(t.flag===void 0||t.flag===``)return{kind:`skip`,message:`no notarisation credential was given — skipping ${n.tool} notarytool. Pass \`--notarize <keychain-profile>\`, naming a profile a prior \`notarytool store-credentials\` put in this host's keychain.`};if(t.sign.kind!==`sign`)throw Error("gjsify ship: --notarize was given without an identity to sign with. Notarisation is a check ON a signature, so submitting an unsigned artifact has nothing to clear. Pass `--sign <identity>` as well, or drop --notarize.");return{kind:`notarize`,credential:t.flag,notary:n}}async function notarizeArtifact(t){let{notary:n,credential:S}=t.plan,C=process.platform;if(!n.notarizeOn.includes(C))throw Error(`gjsify ship: notarising the ${n.layoutOs} layout needs ${n.tool}, which runs on ${n.notarizeOn.join(`, `)} and this host is ${C}.`);let N=n.args(S,t.artifact);t.verbose&&t.log(`${n.tool} ${N.join(` `)}`);let F=await spawnToCompletion(n.tool,N,{completion:`return`,stdio:`inherit`,notFound:()=>Error(`gjsify ship: \`${n.tool}\` is not on PATH — ${n.installHint}.`)});if(F.code!==0)throw Error(`gjsify ship: ${n.tool} notarytool failed with ${describeExit(F)}.`);t.log(`${n.tool} notarytool accepted ${t.artifact}.`)}async function stapleArtifact(t){let n=[`stapler`,`staple`,t.artifact];t.verbose&&t.log(`${t.notary.tool} ${n.join(` `)}`);let S=await spawnToCompletion(t.notary.tool,n,{completion:`return`,stdio:`inherit`,notFound:()=>Error(`gjsify ship: \`${t.notary.tool}\` is not on PATH — ${t.notary.installHint}.`)});if(S.code!==0)throw Error(`gjsify ship: ${t.notary.tool} stapler failed with ${describeExit(S)}. The artifact is notarised and NOT stapled, which means every launch asks Gatekeeper to check online — and fails closed on a machine with no network. Re-run the finish phase; \`stapler\` requires internet access and the ticket may not have propagated yet.`);t.log(`${t.notary.tool} stapler attached the ticket to ${t.artifact}.`)}var eU,tU,nU=__esmMin(()=>{Bd(),In(),bF(),U_(),JV(),MV(),dV(),$H(),eU={darwin:{layoutOs:`darwin`,tool:`codesign`,signOn:[`darwin`],installHint:"install the Xcode Command Line Tools (`xcode-select --install`) on a macOS host",signs:`macho`,args:({identity:t,file:n,entitlements:S,adhoc:C})=>[`--force`,`--sign`,t,`--options`,`runtime`,...S===void 0?[]:[`--entitlements`,S],...C?[]:[`--timestamp`],n],entitlements:t=>[`com.apple.security.cs.allow-jit`,`com.apple.security.cs.allow-unsigned-executable-memory`,`com.apple.security.cs.disable-executable-page-protection`,`com.apple.security.cs.allow-dyld-environment-variables`,...t?[`com.apple.security.cs.disable-library-validation`]:[]],sealsBundle:!0,sealAddPrefix:t=>`${t}/Contents/_CodeSignature/`,configKey:`gjsify.ship.sign.darwin.identity`,gap:"the images are signed and the bundle is sealed, and the seal survives both the `.zip` and the `.dmg` round trip; § A16 stands measured in ONE direction only — library validation refuses an ad-hoc-signed dylib, so the ad-hoc identity grants `disable-library-validation` while a named one does not, and no run in this repository has ever held the named one"},win32:{layoutOs:`win32`,tool:`signtool`,signOn:[`win32`],installHint:"install the Windows SDK (signtool.exe ships in its `bin/<version>/x64` directory)",signs:`pe`,args:({identity:t,file:n})=>[`sign`,`/n`,t,`/fd`,`sha256`,n],entitlements:()=>[],sealsBundle:!1,sealAddPrefix:()=>``,configKey:`gjsify.ship.sign.win32.identity`,gap:`no timestamp countersignature is requested, so the signature expires with the certificate (UNVERIFIED: no run in this repository has ever invoked signtool)`}},tU={darwin:{layoutOs:`darwin`,tool:`xcrun`,notarizeOn:[`darwin`],installHint:"install the Xcode Command Line Tools (`xcode-select --install`) on a macOS host",args:(t,n)=>[`notarytool`,`submit`,`--keychain-profile`,t,`--wait`,n]}}});function stagedFontDir(t,n){return`${t}/${hn.basename(kB.fonts)}/${n}`}function shellQuote(t){return`'${t.replace(/'/g,`'\\''`)}'`}function cmdQuote(t){let n=/["%!\r\n]/.exec(t);if(n!==null)throw Error(`gjsify ship: \`gjsify.ship.execArgs\` contains ${JSON.stringify(t)}, and cmd.exe has no way to pass ${JSON.stringify(n[0])} through a Windows launcher literally — \`%\` expands at parse time and \`"\` ends the quoted run. Move the value into the app (it can read it from its own config) or drop the character.`);return`"${t}"`}function renderLauncher(t,n,S,C={}){switch(S.name){case`linux`:return renderPrefixLauncher(t,n,S);case`darwin`:return renderAppBundleLauncher(t,n,S,C);case`windows`:return renderWindowsLauncher(t,n,S,C);default:{let t=S.name;throw Error(`gjsify ship: no launcher is wired for the "${String(t)}" layout.`)}}}function renderPrefixLauncher(t,n,S){let C=S.dirs(t),N=[`#!/bin/sh`,"# Generated by `gjsify ship` — do not edit.",`set -e`,`self=$(readlink -f "$0")`,`prefix=$(dirname "$(dirname "$self")")`,`XDG_DATA_DIRS="$prefix/${C.data}:\${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"`,`export XDG_DATA_DIRS`];if(t.typelibFiles.length>0){let t=`"$prefix"/${C.native}`;for(let n of[`GI_TYPELIB_PATH`,`LD_LIBRARY_PATH`])N.push(`${n}=${t}\${${n}:+:$${n}}`,`export ${n}`)}else if(Object.values(t.formatFiles).some(t=>t.typelibFiles.length>0)){let t=`"$prefix"/${C.native}`;N.push(`if [ -d ${t} ]; then`);for(let n of[`GI_TYPELIB_PATH`,`LD_LIBRARY_PATH`])N.push(` ${n}=${t}\${${n}:+:$${n}}`,` export ${n}`);N.push(`fi`)}return t.localeFiles.length>0&&N.push(`GJSIFY_LOCALE_DIR="$prefix"/${C.data}/locale`,`export GJSIFY_LOCALE_DIR`),t.fontFiles.length>0&&N.push(`GJSIFY_FONT_DIR="$prefix"/${stagedFontDir(C.data,t.appId)}`,`export GJSIFY_FONT_DIR`),N.push(`exec ${execLine(S,`"$prefix"/${C.bundle}/${n}`,t)} "$@"`,``),N.join(`
|
|
1163
1163
|
`)}function renderAppBundleLauncher(t,n,S,C){let N=`${S.root(t)}/Contents`,F=S.dirs(t),under=t=>hn.relative(N,t),beside=t=>hn.relative(F.launcher,t),I=[`#!/bin/sh`,"# Generated by `gjsify ship` — do not edit.",`set -e`,`here=$(cd -- "$(dirname -- "$0")" && pwd)`,`contents=$(dirname -- "$here")`,`XDG_DATA_DIRS="$contents/${under(F.data)}"\${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}`,`export XDG_DATA_DIRS`];C.gtkRuntimeDir!==void 0&&I.push(`GJSIFY_GTK_RUNTIME="$contents/${under(C.gtkRuntimeDir)}"`,`export GJSIFY_GTK_RUNTIME`),C.nodeGiAddon!==void 0&&I.push(`NODE_GI_NATIVE="$contents/${under(C.nodeGiAddon)}"`,`export NODE_GI_NATIVE`),t.typelibFiles.length>0&&(I.push(`GI_TYPELIB_PATH="$contents/${under(F.native)}"\${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}`,`export GI_TYPELIB_PATH`),I.push(`GJSIFY_GI_LIBRARY_PATH="$contents/${under(F.native)}"\${GJSIFY_GI_LIBRARY_PATH:+:$GJSIFY_GI_LIBRARY_PATH}`,`export GJSIFY_GI_LIBRARY_PATH`)),t.localeFiles.length>0&&I.push(`GJSIFY_LOCALE_DIR="$contents/${under(F.data)}/locale"`,`export GJSIFY_LOCALE_DIR`),t.fontFiles.length>0&&I.push(`GJSIFY_FONT_DIR="$contents/${stagedFontDir(under(F.data),t.appId)}"`,`export GJSIFY_FONT_DIR`);let H=C.interpreter===void 0?void 0:`"$here/${beside(C.interpreter)}"`;return I.push(`exec ${execLine(S,`"$contents/${under(F.bundle)}/${n}"`,t,H)} "$@"`,``),I.join(`
|
|
1164
1164
|
`)}function renderWindowsLauncher(t,n,S,C){let N=S.dirs(t),at=t=>`%HERE%${windowsPath(t)}`,F=[`@echo off`,`rem Generated by "gjsify ship" - do not edit.`,`setlocal`,`set "HERE=%~dp0"`,prependVar(`XDG_DATA_DIRS`,at(N.data))];C.gtkRuntimeDir!==void 0&&F.push(`set "GJSIFY_GTK_RUNTIME=${at(C.gtkRuntimeDir)}"`),C.nodeGiAddon!==void 0&&F.push(`set "NODE_GI_NATIVE=${at(C.nodeGiAddon)}"`),t.typelibFiles.length>0&&F.push(prependVar(`GI_TYPELIB_PATH`,at(N.native)),prependVar(`PATH`,at(N.native))),t.localeFiles.length>0&&F.push(`set "GJSIFY_LOCALE_DIR=${at(N.data)}\\locale"`),t.fontFiles.length>0&&F.push(`set "GJSIFY_FONT_DIR=${at(stagedFontDir(N.data,t.appId))}"`);let I=C.interpreter===void 0?void 0:`"${at(C.interpreter)}"`;return F.push(`${execLine(S,`"${at(N.bundle)}\\${windowsPath(n)}"`,t,I)} %*`,``),F.join(`\r
|
|
@@ -65,7 +65,11 @@ export function entryEvidence(source) {
|
|
|
65
65
|
return;
|
|
66
66
|
if (specifier.startsWith('gi://') || GJS_BUILTINS.has(specifier))
|
|
67
67
|
gi.add(specifier);
|
|
68
|
-
|
|
68
|
+
// A dynamic `import('node:…')` is a reading under which the bundle works: npm
|
|
69
|
+
// libraries feature-detect with it (node-llama-cpp's `try { await
|
|
70
|
+
// import('node:sea') }` behind `process.env.SNAP`), and it is refused only
|
|
71
|
+
// if reached. A static one is refused at load, whatever the control flow.
|
|
72
|
+
else if (specifier.startsWith('node:') && astNode.type !== 'ImportExpression')
|
|
69
73
|
node.add(specifier);
|
|
70
74
|
});
|
|
71
75
|
return { gi: [...gi].sort(), node: [...node].sort() };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/cli",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.9",
|
|
4
4
|
"description": "CLI for Gjsify",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -142,22 +142,22 @@
|
|
|
142
142
|
"cli"
|
|
143
143
|
],
|
|
144
144
|
"dependencies": {
|
|
145
|
-
"@gjsify/blueprint": "^0.64.
|
|
146
|
-
"@gjsify/buffer": "^0.64.
|
|
147
|
-
"@gjsify/create-app": "^0.64.
|
|
148
|
-
"@gjsify/node-globals": "^0.64.
|
|
149
|
-
"@gjsify/node-polyfills": "^0.64.
|
|
150
|
-
"@gjsify/npm-registry": "^0.64.
|
|
151
|
-
"@gjsify/resolve-npm": "^0.64.
|
|
152
|
-
"@gjsify/rolldown-plugin-gjsify": "^0.64.
|
|
153
|
-
"@gjsify/vite-plugin-blueprint": "^0.64.
|
|
154
|
-
"@gjsify/rolldown-plugin-pnp": "^0.64.
|
|
155
|
-
"@gjsify/semver": "^0.64.
|
|
156
|
-
"@gjsify/tar": "^0.64.
|
|
157
|
-
"@gjsify/tsc": "^0.64.
|
|
158
|
-
"@gjsify/utils": "^0.64.
|
|
159
|
-
"@gjsify/web-polyfills": "^0.64.
|
|
160
|
-
"@gjsify/workspace": "^0.64.
|
|
145
|
+
"@gjsify/blueprint": "^0.64.9",
|
|
146
|
+
"@gjsify/buffer": "^0.64.9",
|
|
147
|
+
"@gjsify/create-app": "^0.64.9",
|
|
148
|
+
"@gjsify/node-globals": "^0.64.9",
|
|
149
|
+
"@gjsify/node-polyfills": "^0.64.9",
|
|
150
|
+
"@gjsify/npm-registry": "^0.64.9",
|
|
151
|
+
"@gjsify/resolve-npm": "^0.64.9",
|
|
152
|
+
"@gjsify/rolldown-plugin-gjsify": "^0.64.9",
|
|
153
|
+
"@gjsify/vite-plugin-blueprint": "^0.64.9",
|
|
154
|
+
"@gjsify/rolldown-plugin-pnp": "^0.64.9",
|
|
155
|
+
"@gjsify/semver": "^0.64.9",
|
|
156
|
+
"@gjsify/tar": "^0.64.9",
|
|
157
|
+
"@gjsify/tsc": "^0.64.9",
|
|
158
|
+
"@gjsify/utils": "^0.64.9",
|
|
159
|
+
"@gjsify/web-polyfills": "^0.64.9",
|
|
160
|
+
"@gjsify/workspace": "^0.64.9",
|
|
161
161
|
"acorn": "^8.17.0",
|
|
162
162
|
"cosmiconfig": "^9.0.2",
|
|
163
163
|
"get-tsconfig": "^4.14.0",
|
|
@@ -166,13 +166,13 @@
|
|
|
166
166
|
"yargs": "^18.0.0"
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|
|
169
|
-
"@gjsify/unit": "^0.64.
|
|
169
|
+
"@gjsify/unit": "^0.64.9",
|
|
170
170
|
"@types/yargs": "^17.0.35",
|
|
171
171
|
"typescript": "^6.0.3"
|
|
172
172
|
},
|
|
173
173
|
"peerDependencies": {
|
|
174
|
-
"@gjsify/oxfmt-native": "^0.64.
|
|
175
|
-
"@gjsify/rolldown-native": "^0.64.
|
|
174
|
+
"@gjsify/oxfmt-native": "^0.64.9",
|
|
175
|
+
"@gjsify/rolldown-native": "^0.64.9"
|
|
176
176
|
},
|
|
177
177
|
"peerDependenciesMeta": {
|
|
178
178
|
"@gjsify/oxfmt-native": {
|