@gjsify/cli 0.16.7 → 0.16.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 +1 -1
- package/lib/commands/run.js +15 -2
- package/package.json +17 -17
package/dist/cli.gjs.mjs
CHANGED
|
@@ -744,7 +744,7 @@ function load() {
|
|
|
744
744
|
`+F),await chmod$1(a,493),S&&ke.debug(`[gjsify] --shebang: wrote ${N} + chmod 0o755 to ${a}`)}async applyBrowserHtml(n,a,S){let C=$o(a),N=htmlOutPathFor(C),F=emitBrowserHtml({htmlSource:n.htmlSource,scriptTag:n.scriptTag,scriptSrc:n.scriptSrc,jsOutPath:C,outHtmlPath:N});await mkdir$1(as(N),{recursive:!0}),await writeFile$1(N,F),S&&ke.debug(`[gjsify] --app browser: wrote ${N}`)}async loadPluginViaGjsBundle(n,a,S){let C=await this.bundlePluginForGjs(n,a,S);try{return await import(pathToFileURL(C).href)}catch(n){throw Error(`gjsify config: failed to import the GJS bundle for plugin "${a}" (bundled to ${C}). (${n.message})`)}}async bundlePluginForGjs(n,a,S){try{return await BuildAction.bundleFileForGjsCached(n,{cacheSubdir:`plugins`,label:a,verbose:S,noCacheEnv:`GJSIFY_NO_PLUGIN_CACHE`})}catch(n){throw Error(`gjsify config: failed to bundle plugin "${a}" for GJS (needed because GJS can't import packages that use exports-map subpaths directly). (${n.message})`)}}static async bundleFileForGjsCached(n,a){let S=process.cwd(),C=ns(S,`node_modules`,`.cache`,`gjsify`,a.cacheSubdir),N=ns(C,`${a.label.replace(/[^a-zA-Z0-9._-]/g,`_`)}-${shortHash(n)}.mjs`);return!(a.noCacheEnv&&isTruthyEnv(process.env[a.noCacheEnv]))&&await isBundleFresh(N,n,S)?(a.verbose&&ke.debug(`[gjsify] reusing cached GJS bundle ${N}`),N):(a.verbose&&ke.debug(`[gjsify] bundling ${n} for GJS → ${N}`),await mkdir$1(C,{recursive:!0}),await new BuildAction({verbose:a.verbose,bundler:{input:n,output:{file:N},...a.define?{transform:{define:a.define}}:{}}}).buildApp(`gjs`,{preserveDefaultExport:!0}),N)}async buildApp(n=`gjs`,a={}){let{verbose:S,typescript:C,exclude:N,library:F,aliases:I,excludeGlobals:H}=this.configData,W=normalizeBundlerOptions(this.configData),K=null;if(n===`browser`){let n=detectHtmlEntry(W.input);if(n){let a=await readFile$1(n,`utf-8`),{moduleEntry:S,scriptTag:C,scriptSrc:N}=parseHtmlEntry(n,a);W.input=S,K={htmlSource:a,scriptTag:C,scriptSrc:N}}}let q=W.output?.format??(W.output?.file?.endsWith(`.cjs`)?`cjs`:`esm`),Y=q===`iife`?`esm`:q,X=W.output?.file,te=W.output?.dir;if(!X&&!te&&(F?.main||F?.module)){let n=Y===`cjs`?F.main??F.module:F.module??F.main;if(n&&isUnsafeDefaultOutput(n))throw Error(`gjsify build: refusing to default --outfile to ${n} (would overwrite a TypeScript source file). Pass --outfile/--outdir explicitly, or set "gjsify.bundler.output.file" in package.json.`);X=n}if(K&&!X)throw Error(`gjsify build: an .html entry needs an explicit --outfile (e.g. --outfile dist-app/app.js); the emitted index.html is written beside it.`);let{consoleShim:ne,globals:re}=this.configData,ie=Array.isArray(W.external)?W.external:void 0,ae=typeof W.output?.banner==`string`?W.output.banner:void 0,oe={debug:S,app:n,format:Y,exclude:N,reflection:C?.reflection,consoleShim:ne,...I?{aliases:I}:{},...a.preserveDefaultExport?{preserveDefaultExport:!0}:{}},{autoMode:Z,extras:se}=this.parseGlobalsValue(re),ce=await buildPnpPlugin(),le=ce?[ce]:[],ue=textLoaderPlugin({loaders:this.configData.loaders}),de=ue?[ue]:[];if(W.plugins?.length){let n=await resolveUserPlugins(W.plugins,process.cwd(),isGjs()?{loadModule:(n,a)=>this.loadPluginViaGjsBundle(n,a,S)}:{});de.push(...n)}if(n===`gjs`&&Z){let gjsifyPluginFactory=async n=>{let a=await gjsifyPlugin({input:W.input,output:{file:X,dir:te},userExternal:ie,userBanner:ae,userAliases:I,shebang:this.configData.shebang},n);return{options:a.options,plugins:a.plugins}},{injectPath:n}=await detectAutoGlobals({input:W.input,plugins:[...le,...de],external:W.external,transform:W.transform,format:Y},oe,gjsifyPluginFactory,S,{extraGlobalsList:se,excludeGlobals:H,cwd:process.cwd()},bundleToChunks);oe.autoGlobalsInject=n}else if(n===`node`&&Z){let gjsifyPluginFactory=async n=>{let a=await gjsifyPlugin({input:W.input,output:{file:X,dir:te},userExternal:ie,userBanner:ae,userAliases:I,shebang:this.configData.shebang},n);return{options:a.options,plugins:a.plugins}};await detectNodeGiGlobals({input:W.input,plugins:[...le,...de],external:W.external,transform:W.transform,format:Y},oe,gjsifyPluginFactory,bundleToChunks)&&(oe.nodeGiGlobalsInject=!0)}else se&&(oe.autoGlobalsInject=await this.resolveGlobalsInject(n,se,S));let fe=await gjsifyPlugin({input:W.input,output:{file:X,dir:te},userExternal:ie,userBanner:ae,userAliases:I,shebang:this.configData.shebang},oe),pe={...mergeBundlerOptions(fe.options,W),plugins:[...le,...de,...fe.plugins]};if(a.watch)return await this.runWatchLoop(pe,n,X,S),[];let me=await runBundle(pe);return(n===`gjs`||n===`node`)&&this.configData.shebang&&await this.applyShebang(n,X,S),n===`browser`&&K&&X&&await this.applyBrowserHtml(K,X,S),[me]}async runWatchLoop(n,a,S,C){let N=await runWatch(n),F=new Promise(n=>{N.on(`close`,()=>n())}),I=!1,shutdown=async()=>{if(!I){I=!0,ke.log(`
|
|
745
745
|
[gjsify build --watch] stopping watcher…`);try{await N.close()}catch(n){ke.error(`[gjsify build --watch] watcher close error:`,n)}}};process.on(`SIGINT`,shutdown),process.on(`SIGTERM`,shutdown),N.on(`event`,async n=>{switch(n.code){case`START`:C&&ke.log(`[gjsify build --watch] rebuild start`);break;case`BUNDLE_START`:ke.log(`[gjsify build --watch] building…`);break;case`BUNDLE_END`:ke.log(`[gjsify build --watch] built in ${n.duration}ms`);try{(a===`gjs`||a===`node`)&&this.configData.shebang&&await this.applyShebang(a,S,C)}finally{await n.result.close()}break;case`END`:ke.log(`[gjsify build --watch] waiting for changes…`);break;case`ERROR`:ke.error(`[gjsify build --watch] build failed:`,n.error?.message??n.error),C&&n.error?.stack&&ke.error(n.error.stack);try{await n.result.close()}catch{}break}}),C&&N.on(`change`,(n,a)=>{ke.log(`[gjsify build --watch] ${a.event}: ${n}`)}),await F}async start(n={app:`gjs`}){if(n.library){if(n.watch)throw Error(`gjsify build: --watch is not supported with --library (library mode would emit watcher rebuilds for every produced format; use --app gjs|node|browser instead).`);return await this.buildLibrary()}return await this.buildApp(n.app,{watch:n.watch})}}});function isModuleResolutionFailure(n){let a=n instanceof Error?n.message:String(n);return/Unsupported URI scheme|\bnode:|Cannot find (module|package)|Module not found|ERR_MODULE_NOT_FOUND|Failed to resolve/i.test(a)}async function loadConfigViaGjsBundle(n,a){let S;try{let{BuildAction:C}=await Promise.resolve().then(()=>(aj(),tj));S=await C.bundleFileForGjsCached(n,{cacheSubdir:`config`,label:os(n),verbose:a,noCacheEnv:`GJSIFY_NO_CONFIG_CACHE`,define:{"import.meta.url":JSON.stringify(pathToFileURL(n).href)}})}catch(a){throw Error(`gjsify: failed to bundle the config ${n} for the GJS CLI. Fixes: run the build under Node (\`npx gjsify …\`), keep the config to plain values / \`process.env\`, or move settings into \`package.json#gjsify\`. (${a.message})`)}try{let n=await import(pathToFileURL(S).href);return n.default??n}catch(a){throw Error(`gjsify: bundled the config ${n} for GJS but could not import the result (${S}). (${a.message})`)}}function defaultSearchPlaces(n){return[`package.json`,`.${n}rc`,`.${n}rc.json`,`.${n}rc.yaml`,`.${n}rc.yml`,`.${n}rc.js`,`.${n}rc.ts`,`.${n}rc.mjs`,`.${n}rc.cjs`,`${n}.config.js`,`${n}.config.ts`,`${n}.config.mjs`,`${n}.config.cjs`]}function merge(n,...a){for(let S of a)if(S)for(let a of Object.keys(S)){let C=n[a],N=S[a];N!==void 0&&(isPlainObject(C)&&isPlainObject(N)?merge(C,N):n[a]=N)}return n}function isPlainObject(n){return typeof n==`object`&&!!n&&!Array.isArray(n)&&Object.getPrototypeOf(n)===Object.prototype}function readDottedPath(n,a){if(!a.includes(`.`))return n[a];let S=n;for(let n of a.split(`.`)){if(typeof S!=`object`||!S)return;S=S[n]}return S}var oj,gjsConfigLoader,sj,Config,cj=__esmMin(()=>{Ae(),ef(),oj=am(),ps(),mn(),om(),mh(),Pg(),gjsConfigLoader=async n=>{try{let a=await import(pathToFileURL(n).href);return a.default??a}catch(a){if(!isModuleResolutionFailure(a))throw a;return loadConfigViaGjsBundle(n,!!process.env.GJSIFY_DEBUG)}},sj=isGjs()?{".js":gjsConfigLoader,".mjs":gjsConfigLoader,".cjs":gjsConfigLoader}:{},Config=class{loadOptions={};constructor(n={}){Object.keys(n).length&&(this.loadOptions=n)}async load(n){let a=await(0,oj.cosmiconfig)($d,{...this.loadOptions,searchPlaces:(this.loadOptions.searchPlaces??defaultSearchPlaces(`gjsify`)).filter(n=>n!==`package.json`),loaders:{...sj,...this.loadOptions.loaders}}).search(n),S={};try{let a=await this.readPackageJSON(n);isPlainObject(a?.gjsify)&&merge(S,a.gjsify)}catch{}return a?.config&&isPlainObject(a.config)&&merge(S,a.config),S.bundler||={},S.library||={},S.typescript||={},{config:S,filepath:a?.filepath??``,isEmpty:!a&&Object.keys(S).length===3}}async readPackageJSON(n){return n=await resolvePackageJSON(n),await readPackageJSON(n)}async readTSConfig(n){return Og(n)?.config||{}}async forBuild(n){let a=await this.load(process.cwd()),S={...a.config},C=a.filepath||process.cwd(),N=await this.readPackageJSON(C),F=await this.readTSConfig(C);if(F.reflection||=n.reflection,S.verbose=n.verbose||!1,S.exclude=n.exclude||[],n.consoleShim!==void 0&&(S.consoleShim=n.consoleShim),n.globals!==void 0&&(S.globals=n.globals),S.globals??=`auto`,n.shebang!==void 0&&(S.shebang=n.shebang),n.excludeGlobals){let a=(Array.isArray(n.excludeGlobals)?n.excludeGlobals.join(`,`):String(n.excludeGlobals)).split(`,`).map(n=>n.trim()).filter(Boolean);a.length&&(S.excludeGlobals=[...S.excludeGlobals??[],...a])}merge(S.library??={},N,S.library),merge(S.typescript??={},F,S.typescript);let parseKvPairs=(n,a)=>{let S={};for(let C of n){let n=C.indexOf(`=`);if(n===-1)throw Error(`Invalid --${a} value '${C}'. Expected KEY=VALUE.`);let N=C.slice(0,n).trim(),F=C.slice(n+1);if(!N)throw Error(`Invalid --${a} value '${C}'. Empty key.`);S[N]=F}return S},I=parseKvPairs(n.define??[],`define`),H=parseKvPairs(n.alias??[],`alias`);Object.keys(H).length&&(S.aliases={...S.aliases,...H});let W={};if(S.defineFromPackageJson)for(let[n,a]of Object.entries(S.defineFromPackageJson)){if(!a||typeof a.field!=`string`||!a.field)throw Error(`gjsify config: defineFromPackageJson["${n}"] is missing a "field" string`);let S=readDottedPath(N,a.field);W[n]=S===void 0?`undefined`:JSON.stringify(S)}let K={};if(S.defineFromEnv)for(let[n,a]of Object.entries(S.defineFromEnv)){if(!a||typeof a.env!=`string`||!a.env)throw Error(`gjsify config: defineFromEnv["${n}"] is missing an "env" string`);let S=process.env[a.env],C=S===void 0?a.default:S;K[n]=C===void 0?`undefined`:JSON.stringify(C)}let q=S.bundler??={},Y=q.output??={},X=q.transform??={};return n.entryPoints?.length&&(q.input=n.entryPoints),q.input||=[`src/index.ts`],n.outfile!==void 0&&(Y.file=n.outfile),n.outdir!==void 0&&(Y.dir=n.outdir),n.format!==void 0&&(Y.format=n.format),n.minify!==void 0&&(Y.minify=n.minify),Y.minify===void 0&&(Y.minify=!0),Y.minify===!0&&(Y.keepNames=!0),n.logLevel&&(q.logLevel={silent:`silent`,error:`warn`,warning:`warn`,warn:`warn`,info:`info`,debug:`debug`,verbose:`debug`}[n.logLevel]??`warn`),n.external?.length&&(q.external=[...Array.isArray(q.external)?q.external:[],...n.external]),(Object.keys(I).length||Object.keys(W).length||Object.keys(K).length)&&(X.define={...X.define,...W,...K,...I}),S.verbose&&ke.debug(`configData`,S),S}}}),lj,uj=__esmMin(()=>{cj(),aj(),lj={command:`build [entryPoints..]`,description:`Build and bundle your Gjs project`,builder:n=>n.option(`entry-points`,{description:`The entry points you want to bundle. Defaults to bundler.input from package.json#gjsify or .gjsifyrc.js, falling back to src/index.ts when neither is set.`,array:!0,type:`string`,normalize:!0,defaultDescription:`src/index.ts (fallback)`,coerce:n=>[...new Set(n)]}).option(`exclude`,{description:`An array of glob patterns to exclude entry-points and aliases`,array:!0,type:`string`,normalize:!0,default:[]}).option(`verbose`,{description:`Switch on the verbose mode`,type:`boolean`,normalize:!0,default:!1}).option(`app`,{description:`Use this if you want to build an application, the platform node is usually only used for tests`,type:`string`,choices:[`gjs`,`node`,`browser`,`nativescript`],normalize:!0,default:`gjs`}).option(`format`,{description:`Override the default output format`,type:`string`,choices:[`iife`,`esm`,`cjs`],normalize:!0}).option(`minify`,{description:`Minify the bundled output. Defaults to true; use --no-minify to emit pretty-printed code (e.g. for debugging or readable bundle review).`,type:`boolean`,normalize:!0,defaultDescription:`true`}).option(`library`,{description:`Use this if you want to build a library for Gjsify`,type:`boolean`,normalize:!0,default:!1}).option(`outfile`,{alias:`o`,description:`Sets the output file name for the build operation. If no outfile is specified, the outfile will be parsed from the package.json. Only used if application mode is active`,type:`string`,normalize:!0}).option(`outdir`,{alias:`d`,description:`Sets the output directory for the build operation. If no outdir is specified, the outdir will be parsed from the package.json. Only used if library mode is active`,type:`string`,normalize:!0}).option(`reflection`,{alias:`r`,description:`Enables TypeScript types on runtime using Deepkit's type compiler`,type:`boolean`,normalize:!0,default:!1}).option(`log-level`,{description:`The log level can be changed to prevent esbuild from printing warning and/or error messages to the terminal`,type:`string`,choices:[`silent`,`error`,`warning`,`info`,`debug`,`verbose`],normalize:!0,default:`warning`}).option(`console-shim`,{description:`Inject a console shim into GJS builds for clean output without the GLib prefix and with working ANSI colors. Use --no-console-shim to disable. Only applies to GJS app builds.`,type:`boolean`,normalize:!0,default:!0}).option(`globals`,{description:"Comma-separated list of global identifiers, 'auto' (default) to detect automatically from the bundled output, or 'none' to disable. The 'auto' token may be combined with explicit identifiers/groups (e.g. 'auto,dom') for cases where the detector cannot statically see a global because it's accessed via indirection. Each identifier is mapped to the corresponding `@gjsify/<pkg>/register` module and injected into the bundle. See the CLI Reference docs for the full list of known identifiers. Only applies to GJS app builds.",type:`string`,normalize:!0}).option(`shebang`,{description:"Prepend a target-appropriate shebang to the output and mark it executable (chmod 755): `#!/usr/bin/env -S gjs -m` for --app gjs, `#!/usr/bin/env node` for --app node. Applies to GJS and Node app builds with a single --outfile. Default: false (use --shebang to enable, or set `shebang: true` in `.gjsifyrc.js`).",type:`boolean`,normalize:!0}).option(`external`,{description:"Module names that should NOT be bundled — EXACT package names only, matched literally on both bundler engines (no globs). Repeat the flag or pass a comma-separated list (e.g. --external typedoc,prettier). Appended to the per-app built-in externals; register subpaths (`<pkg>/register[/…]`) are always force-inlined for --app gjs regardless of this flag.",array:!0,type:`string`,default:[],coerce:n=>n.flatMap(n=>n.split(`,`).map(n=>n.trim()).filter(Boolean))}).option(`define`,{description:`Substitute compile-time constants. Each entry is KEY=VALUE where VALUE is a JS expression (string literals must be quoted: --define VERSION='"1.2.3"'). Repeat the flag or pass comma-separated. See https://esbuild.github.io/api/#define`,array:!0,type:`string`,default:[]}).option(`alias`,{description:`Map module specifiers at bundle time. Each entry is FROM=TO (e.g. --alias typedoc=@gjsify/empty). Layered on top of the built-in alias map. Useful for stubbing heavy deps the test scenario never executes.`,array:!0,type:`string`,default:[],coerce:n=>n.flatMap(n=>n.split(`,`).map(n=>n.trim()).filter(Boolean))}).option(`exclude-globals`,{description:`Comma-separated global identifiers to remove from auto-detection results. Use for false positives from dead browser-compat code whose polyfills require unavailable native libraries (e.g. --exclude-globals fetch,XMLHttpRequest).`,type:`string`,normalize:!0}).option(`watch`,{alias:`w`,description:"Watch source files and rebuild on change. Logs each rebuild with duration; clean SIGINT shutdown. Only valid with --app gjs|node|browser (rejected with --library). Requires the npm `rolldown` engine — run under Node, not the GJS-bundled CLI.",type:`boolean`,normalize:!0,default:!1}),handler:async n=>{await new ij(await new Config().forBuild(n)).start({library:n.library,app:n.app,watch:n.watch})}}});function nodeArchToLinuxArch(n){return{x64:`x86_64`,arm64:`aarch64`,arm:`armv7`,ia32:`i686`}[n]??n}function readPackageJson$3(n){try{return JSON.parse(readFileSync(n,`utf-8`))}catch{return null}}function scanNodeModules(n,a){let S=[];if(!existsSync(n))return S;let C;try{C=readdirSync(n)}catch{return S}for(let N of C)if(!N.startsWith(`.`))if(N.startsWith(`@`)){let C=ns(n,N),F;try{F=readdirSync(C)}catch{continue}for(let n of F){let F=checkPackage(ns(C,n),`${N}/${n}`,a);F&&S.push(F)}}else{let C=checkPackage(ns(n,N),N,a);C&&S.push(C)}return S}function checkPackage(n,a,S){let C=readPackageJson$3(ns(n,`package.json`));if(!C)return null;let N=C.gjsify;if(!N||typeof N!=`object`)return null;let F=N.prebuilds;if(typeof F!=`string`)return null;let I=ns(n,F,`linux-${S}`);return existsSync(I)?{name:a,prebuildsDir:I}:null}function detectNativePackages(n){let a=nodeArchToLinuxArch(process.arch),S=[],C=new Set,N=$o(n);for(;;){let n=ns(N,`node_modules`);if(existsSync(n))for(let N of scanNodeModules(n,a))C.has(N.name)||(C.add(N.name),S.push(N));let F=$o(N,`..`);if(F===N)break;N=F}return S}function buildNativeEnv(n){let a=n.map(n=>n.prebuildsDir),S=process.env.LD_LIBRARY_PATH??``,C=process.env.GI_TYPELIB_PATH??``;return{LD_LIBRARY_PATH:[...a,...S?[S]:[]].join(`:`),GI_TYPELIB_PATH:[...a,...C?[C]:[]].join(`:`)}}var dj=__esmMin(()=>{Zc(),ps(),__name$1(readPackageJson$3,`readPackageJson`)}),fj=__exportAll$3({computeNativeEnvForBundle:()=>computeNativeEnvForBundle,runGjsBundle:()=>runGjsBundle});function computeNativeEnvForBundle(n,a=process.cwd()){let S=$o(n),C=detectNativePackages(a),N=detectNativePackages(as(S)),F=new Set(C.map(n=>n.name)),I=buildNativeEnv([...C,...N.filter(n=>!F.has(n.name))]);return{env:I,envPrefix:Object.entries(I).filter(([,n])=>n!==void 0&&n!==``).map(([n,a])=>`${n}=${a}`).join(` `)}}async function runGjsBundle(n,a=[],S={}){let{env:C,envPrefix:N}=computeNativeEnvForBundle(n),F={...process.env,...C},I=[`-m`,n,...a],H=[`gjs`,...I.map(n=>n.includes(` `)?`"${n}"`:n)].join(` `);ke.error(`$ ${N?`${N} `:``}${H}`);let W=spawn(`gjs`,I,{env:F,stdio:`inherit`});await new Promise((n,a)=>{W.on(`close`,S=>{S===0?n():a(Error(`gjs exited with code ${S}`))}),W.on(`error`,a)}).catch(n=>{ke.error(n.message),process.exit(1)}),S.exitOnSuccess&&process.exit(0)}var pj=__esmMin(()=>{Ae(),oC(),ps(),dj()});async function buildTestBundle(n,a,S,C){let N=await new Config().forBuild({entryPoints:[n],outfile:a,app:S,verbose:C??!1,logLevel:`warning`,exclude:[]});N.library={...N.library},N.bundler={...N.bundler,input:[n],output:{...N.bundler?.output,file:a}},await new ij(N).start({app:S,library:!1})}async function runTestBundle(n,a){if(a===`gjs`){await runGjsBundle(n);return}await new Promise((a,S)=>{let C=spawn(`node`,[n],{stdio:`inherit`});C.on(`error`,S),C.on(`exit`,n=>{n===0?a():S(Error(`node exited with code ${n}`))})})}function isFresh(n,a){if(!existsSync(n))return!1;let S=statSync(n).mtimeMs,C=as(a);try{return S>=newestMtimeUnder(existsSync(C)?C:a)}catch{return!1}}function newestMtimeUnder(n){let a=statSync(n);if(a.isFile())return a.mtimeMs;let S=a.mtimeMs;for(let a of readdirSync(n,{withFileTypes:!0})){if(a.name===`node_modules`||a.name===`dist`||a.name===`lib`||a.name.startsWith(`.`))continue;let C=newestMtimeUnder(ns(n,a.name));C>S&&(S=C)}return S}var mj,hj=__esmMin(()=>{Ae(),Zc(),ps(),oC(),cj(),aj(),pj(),mj={command:`test`,description:"Build + run the package’s `src/test.mts` suite on GJS and Node and aggregate the results. Replaces the per-package `build:test:{gjs,node}` + `test:{gjs,node}` script boilerplate.",builder:n=>n.option(`runtime`,{description:`Target runtime. Default: both.`,type:`string`,choices:[`gjs`,`node`,`all`],default:`all`}).option(`entry`,{description:"Path to the test entry. Default: `src/test.mts` (or `gjsify.test.entry`).",type:`string`,normalize:!0}).option(`outdir`,{description:"Output directory for the built test bundles. Default: `dist/`.",type:`string`,normalize:!0}).option(`rebuild`,{description:`Always rebuild the test bundles, even when they look up-to-date.`,type:`boolean`,default:!1}).option(`build`,{description:`Build before running. Default: true (use --no-build to skip when bundles already exist).`,type:`boolean`,default:!0}).option(`verbose`,{description:`Print resolved entry/outdir + per-step timing.`,type:`boolean`,default:!1}),handler:async n=>{let a=process.cwd(),S=(await new Config().forBuild({}).catch(()=>({}))).test??{},C=$o(a,n.entry??S.entry??`src/test.mts`),N=$o(a,n.outdir??S.outdir??`dist`);existsSync(C)||(ke.error(`[gjsify test] no test entry at ${rs(a,C)} — add an \`src/test.mts\` that aggregates your \`@gjsify/unit\` suites, or set \`gjsify.test.entry\` in package.json.`),process.exit(1));let F=n.runtime===`gjs`?[`gjs`]:n.runtime===`node`?[`node`]:S.runtimes&&S.runtimes.length>0?S.runtimes:[`gjs`,`node`],I=[];for(let S of F){let F=ns(N,`test.${S}.mjs`);if(n.build!==!1)if(n.rebuild||!isFresh(F,C)){let N=Date.now();n.verbose&&ke.log(`[gjsify test] building → ${rs(a,F)} (—app ${S})`);try{await buildTestBundle(C,F,S,n.verbose),n.verbose&&ke.log(`[gjsify test] built ${S} in ${Date.now()-N}ms`)}catch(n){ke.error(`[gjsify test] build failed for ${S}:`,n.message),I.push({runtime:S,ok:!1,durationMs:0,error:`build failed`});continue}}else n.verbose&&ke.log(`[gjsify test] ${S}: bundle is up-to-date — skipping build (use --rebuild to force)`);else if(!existsSync(F)){ke.error(`[gjsify test] --no-build but ${rs(a,F)} doesn't exist. Build first or drop --no-build.`),I.push({runtime:S,ok:!1,durationMs:0,error:`no bundle`});continue}let H=Date.now();try{await runTestBundle(F,S),I.push({runtime:S,ok:!0,durationMs:Date.now()-H})}catch(n){I.push({runtime:S,ok:!1,durationMs:Date.now()-H,error:n.message})}}let H=I.map(n=>`${n.ok?`✅`:`❌`} ${n.runtime} (${n.durationMs}ms)${n.error?` — ${n.error}`:``}`).join(` `);ke.log(`[gjsify test] ${H}`),I.some(n=>!n.ok)&&process.exit(1),process.exit(0)}}});function readPackageJson$2(n){if(!existsSync(n))return null;let a=readFileSync(n,`utf-8`);try{return JSON.parse(a)}catch(a){throw Error(`gjsify install: ${n} is not valid JSON: ${a.message}`)}}function writePackageJson(n,a){let S=sortKnownDepFields(a);writeFileSync(n,JSON.stringify(S,null,2)+`
|
|
746
746
|
`,`utf-8`)}function parseSpec$2(n){if(n.startsWith(`@`)){let a=n.indexOf(`/`);if(a===-1)return{name:n};let S=n.indexOf(`@`,a+1);return S===-1?{name:n}:{name:n.slice(0,S),range:n.slice(S+1)}}let a=n.indexOf(`@`);return a===-1?{name:n}:{name:n.slice(0,a),range:n.slice(a+1)}}function projectSpecsFromPackageJson(n){let a=[];for(let S of[`dependencies`,`devDependencies`,`optionalDependencies`]){let C=n[S];if(C)for(let[n,S]of Object.entries(C))typeof S==`string`&&(/^(workspace|link|file|portal|git\+|https?):/.test(S)||a.push(`${n}@${S}`))}return a}function addDependencyEntry(n,a,S,C){n[C]===void 0&&(n[C]={}),n[C][a]=S}function defaultRangeFromVersion(n){return`^${n}`}function sortKnownDepFields(n){let a={...n};for(let n of[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`]){let S=a[n];S&&(a[n]=Object.fromEntries(Object.entries(S).sort(([n],[a])=>n<a?-1:+(n>a))))}return a}var gj=__esmMin(()=>{Zc(),__name$1(readPackageJson$2,`readPackageJson`),__name$1(parseSpec$2,`parseSpec`)});function looksLikeFile(n){if(n.startsWith(`./`)||n.startsWith(`../`)||n.startsWith(`/`)||n.includes(`/`)||n.includes(`\\`)||/\.(c?js|mjs|cjs|gjs)$/.test(n))return!0;try{return statSync(n).isFile()}catch{return!1}}async function runScriptInWorkspace(n,a,S){let C=findWorkspaceRoot(process.cwd())??process.cwd(),N;try{N=discoverWorkspaces(C)}catch(n){return ke.error(`gjsify run: could not read workspaces at ${C}: ${n.message}`),process.exit(1)}let F=N.find(a=>a.name===n||a.relativeLocation===n||os(a.location)===n);if(!F){let a=N.map(n=>n.relativeLocation).join(`, `)||`<none>`;return ke.error(`gjsify run: no workspace "${n}" under ${C} (available: ${a})`),process.exit(1)}await runScript(a,S,F.location)}async function runScript(n,a,S=process.cwd()){let C=ns(S,`package.json`),N=readPackageJson$2(C);if(!N)return ke.error(`gjsify run: no package.json in ${S}`),process.exit(1);let F=N.scripts??{},I=F[n];if(typeof I!=`string`){let a=Object.keys(F).join(`, `)||`<none>`;return ke.error(`gjsify run: no script "${n}" in ${C} (available: ${a})`),process.exit(1)}let H=findWorkspaceRoot(S),W=[ns(S,`node_modules`,`.bin`)];H&&H!==S&&W.push(ns(H,`node_modules`,`.bin`)),process.env.GJSIFY_SHIM_DIR&&W.unshift(process.env.GJSIFY_SHIM_DIR);let K=process.env.FORCE_COLOR!==void 0||process.env.NO_COLOR!==void 0?{}:{FORCE_COLOR:`1`},q={...process.env,...K,PATH:[...W,process.env.PATH??``].filter(Boolean).join(ds),npm_lifecycle_event:n,npm_package_name:N.name??``,npm_package_version:N.version??``},Y=isGjs()?gjsifyInProcessArgv(I,a):null;if(Y){process.env.PATH=q.PATH,process.env.npm_lifecycle_event=q.npm_lifecycle_event,process.env.npm_package_name=q.npm_package_name,process.env.npm_package_version=q.npm_package_version,q.FORCE_COLOR!==void 0&&(process.env.FORCE_COLOR=q.FORCE_COLOR);try{let{runCli:n}=await Promise.resolve().then(()=>(aF(),iF));await n(Y)}catch(n){ke.error(n.message),process.exit(1)}process.exit(process.exitCode==null?0:Number(process.exitCode));return}let X=a.length>0?`${I} ${a.map(shellEscape).join(` `)}`:I;await new Promise((a,C)=>{let N=spawn(X,[],{cwd:S,env:q,stdio:`inherit`,shell:!0});N.on(`close`,S=>{S===0?a():C(Error(`script "${n}" exited with code ${S}`))}),N.on(`error`,C)}).catch(n=>{ke.error(n.message),process.exit(1)}),process.exit(0)}function shellEscape(n){return/^[a-zA-Z0-9_\-./=:@,]+$/.test(n)?n:`'${n.replace(/'/g,`'\\''`)}'`}function gjsifyInProcessArgv(n,a){let S=tokenizeSimpleCommand(n);return!S||S.length<2||S[0]!==`gjsify`?null:[...S.slice(1),...a]}function tokenizeSimpleCommand(n){let a=[],S=``,C=!1,N=null;for(let F=0;F<n.length;F++){let I=n[F];if(N===`'`){I===`'`?N=null:S+=I;continue}if(N===`"`){if(I===`"`)N=null;else if(I===`\\`&&(n[F+1]===`"`||n[F+1]===`\\`))S+=n[++F];else if(I===`$`||I==="`")return null;else S+=I;continue}if(I===`'`||I===`"`){N=I,C=!0;continue}if(I===` `||I===` `){C&&=(a.push(S),S=``,!1);continue}if(`|&;<>\`$()\\
|
|
747
|
-
\r*?{}[]~#!`.includes(I))return null;S+=I,C=!0}return N?null:(C&&a.push(S),a)}var _j,vj=__esmMin(()=>{Ae(),Zc(),ps(),oC(),pj(),gj(),Ig(),Fg(),om(),_j={command:`run <target> [args..]`,description:"Run a script from package.json (yarn-run-style) or a GJS bundle file. If <target> resolves to a file on disk (or has a path-like prefix), it is launched via gjs with LD_LIBRARY_PATH + GI_TYPELIB_PATH set for native packages. Otherwise it is looked up in the current package.json `scripts`.",builder:n=>n.positional(`target`,{description:"Either a script name (looked up in package.json `scripts`) or a path to a GJS bundle (e.g. dist/gjs.js).",type:`string`,demandOption:!0}).positional(`args`,{description:`Extra arguments passed through to the script / gjs.`,type:`string`,array:!0,default:[]}).option(`workspace`,{alias:`w`,type:`string`,description:"Run <target> as a script in the named workspace (by name or path), like `npm run <script> -w <name>`."}).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0}),handler:async n=>{let a=n.target,S=n.args??[],C=(n[`--`]??[]).filter(n=>typeof n==`string`),N=[...S,...C];if(typeof n.workspace==`string`&&n.workspace.length>0){await runScriptInWorkspace(n.workspace,a,N);return}let F=readPackageJson$2(ns(process.cwd(),`package.json`));if(!(F?.scripts&&typeof F.scripts[a]==`string`)&&looksLikeFile(a)){await runGjsBundle($o(a),N,{exitOnSuccess:!0});return}await runScript(a,N)}}}),yj,bj=__esmMin(()=>{Ae(),ps(),dj(),yj={command:`info [file]`,description:`Show native gjsify packages detected in node_modules and the env vars needed to run a GJS bundle directly with gjs.`,builder:n=>n.positional(`file`,{description:`Optional: the GJS bundle path to include in the example command (e.g. dist/gjs.js)`,type:`string`,normalize:!0}).option(`export`,{description:`Output only shell export statements suitable for eval (eval $(gjsify info --export))`,type:`boolean`,default:!1}),handler:async n=>{let a=process.cwd(),S=n.file?$o(n.file):null,C=detectNativePackages(a),{LD_LIBRARY_PATH:N,GI_TYPELIB_PATH:F}=buildNativeEnv(C);if(n.export){ke.log(`export LD_LIBRARY_PATH="${N}"`),ke.log(`export GI_TYPELIB_PATH="${F}"`);return}if(C.length===0){ke.log(`No native gjsify packages detected in node_modules.`),ke.log(`Native packages declare "gjsify": { "prebuilds": "<dir>" } in their package.json.`);return}ke.log(`Native packages detected:`);for(let n of C)ke.log(` ${n.name} → ${n.prebuildsDir}`);ke.log(``),ke.log(`To run your app directly with gjs, set:`),ke.log(` export LD_LIBRARY_PATH="${N}"`),ke.log(` export GI_TYPELIB_PATH="${F}"`),S?ke.log(` gjs -m ${S}`):ke.log(` gjs -m <your-bundle.js>`),ke.log(``),ke.log(`Or use gjsify run to handle this automatically:`),S?ke.log(` gjsify run ${n.file}`):ke.log(` gjsify run <your-bundle.js>`)}}});function tryExecFile(n,a){try{return execFileSync(n,a,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()}catch{return null}}function checkBinary(n,a,S,C,N,F,I){let H=tryExecFile(S,C);return H===null?{id:n,name:a,found:!1,severity:N,requiredBy:I}:{id:n,name:a,found:!0,version:F?F(H):H.split(`
|
|
747
|
+
\r*?{}[]~#!`.includes(I))return null;S+=I,C=!0}return N?null:(C&&a.push(S),a)}var _j,vj=__esmMin(()=>{Ae(),Zc(),ps(),oC(),pj(),gj(),Ig(),Fg(),om(),_j={command:`run <target> [args..]`,description:"Run a script from package.json (yarn-run-style) or a GJS bundle file. If <target> resolves to a file on disk (or has a path-like prefix), it is launched via gjs with LD_LIBRARY_PATH + GI_TYPELIB_PATH set for native packages. Otherwise it is looked up in the current package.json `scripts`.",builder:n=>n.positional(`target`,{description:"Either a script name (looked up in package.json `scripts`) or a path to a GJS bundle (e.g. dist/gjs.js).",type:`string`,demandOption:!0}).positional(`args`,{description:`Extra arguments passed through to the script / gjs.`,type:`string`,array:!0,default:[]}).option(`workspace`,{alias:`w`,type:`string`,description:"Run <target> as a script in the named workspace (by name or path), like `npm run <script> -w <name>`."}).version(!1).help(!1).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0}),handler:async n=>{let a=n.target,S=n.args??[],C=(n[`--`]??[]).filter(n=>typeof n==`string`),N=[...S,...C];if(typeof n.workspace==`string`&&n.workspace.length>0){await runScriptInWorkspace(n.workspace,a,N);return}let F=readPackageJson$2(ns(process.cwd(),`package.json`));if(!(F?.scripts&&typeof F.scripts[a]==`string`)&&looksLikeFile(a)){await runGjsBundle($o(a),N,{exitOnSuccess:!0});return}await runScript(a,N)}}}),yj,bj=__esmMin(()=>{Ae(),ps(),dj(),yj={command:`info [file]`,description:`Show native gjsify packages detected in node_modules and the env vars needed to run a GJS bundle directly with gjs.`,builder:n=>n.positional(`file`,{description:`Optional: the GJS bundle path to include in the example command (e.g. dist/gjs.js)`,type:`string`,normalize:!0}).option(`export`,{description:`Output only shell export statements suitable for eval (eval $(gjsify info --export))`,type:`boolean`,default:!1}),handler:async n=>{let a=process.cwd(),S=n.file?$o(n.file):null,C=detectNativePackages(a),{LD_LIBRARY_PATH:N,GI_TYPELIB_PATH:F}=buildNativeEnv(C);if(n.export){ke.log(`export LD_LIBRARY_PATH="${N}"`),ke.log(`export GI_TYPELIB_PATH="${F}"`);return}if(C.length===0){ke.log(`No native gjsify packages detected in node_modules.`),ke.log(`Native packages declare "gjsify": { "prebuilds": "<dir>" } in their package.json.`);return}ke.log(`Native packages detected:`);for(let n of C)ke.log(` ${n.name} → ${n.prebuildsDir}`);ke.log(``),ke.log(`To run your app directly with gjs, set:`),ke.log(` export LD_LIBRARY_PATH="${N}"`),ke.log(` export GI_TYPELIB_PATH="${F}"`),S?ke.log(` gjs -m ${S}`):ke.log(` gjs -m <your-bundle.js>`),ke.log(``),ke.log(`Or use gjsify run to handle this automatically:`),S?ke.log(` gjsify run ${n.file}`):ke.log(` gjsify run <your-bundle.js>`)}}});function tryExecFile(n,a){try{return execFileSync(n,a,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()}catch{return null}}function checkBinary(n,a,S,C,N,F,I){let H=tryExecFile(S,C);return H===null?{id:n,name:a,found:!1,severity:N,requiredBy:I}:{id:n,name:a,found:!0,version:F?F(H):H.split(`
|
|
748
748
|
`)[0]??H,severity:N,requiredBy:I}}function checkPkgConfig(n,a,S,C,N){let F=tryExecFile(`pkg-config`,[`--modversion`,S]);return F===null?{id:n,name:a,found:!1,severity:C,requiredBy:N}:{id:n,name:a,found:!0,version:F.split(`
|
|
749
749
|
`)[0],severity:C,requiredBy:N}}function checkNpmPackage(n,a,S,C,N,F){try{return createRequire(pathToFileURL(ns(C,`_check_.js`)).href).resolve(S),{id:n,name:a,found:!0,severity:N,requiredBy:F}}catch{}try{return createRequire(import.meta.url).resolve(S),{id:n,name:a,found:!0,severity:N,requiredBy:F}}catch{return{id:n,name:a,found:!1,severity:N,requiredBy:F}}}function detectPackageManager$2(){for(let n of[`apt`,`dnf`,`pacman`,`zypper`,`apk`])if(tryExecFile(`which`,[n])!==null)return n;return`unknown`}function findProjectRoot(n){let a=$o(n);for(;;){if(existsSync(ns(a,`package.json`)))return a;let n=$o(a,`..`);if(n===a)return null;a=n}}function discoverGjsifyPackages(n){let a=findProjectRoot(n);if(!a)return null;let S=ns(a,`node_modules`,`@gjsify`);if(!existsSync(S))return new Set;let C=ns(a,`package.json`),N={};try{N=JSON.parse(readFileSync(C,`utf-8`))}catch{}let F={...N.dependencies,...N.devDependencies},I=new Set;try{for(let n of readdirSync(S,{withFileTypes:!0}))(n.isDirectory()||n.isSymbolicLink())&&I.add(`@gjsify/${n.name}`)}catch{}for(let n of Object.keys(F))n.startsWith(`@gjsify/`)&&I.add(n);return I}function computeNeededOptionalDeps(n){let a=discoverGjsifyPackages(n);if(a===null)return null;let S=new Set;for(let n of a){let a=Sj[n];if(a)for(let n of a)S.add(n)}return S}function runAllChecks(n){let a=computeNeededOptionalDeps(n);return[...runMinimalChecks(),...runRequiredChecks(n),...runOptionalChecks(a,n)]}function runMinimalChecks(){let n=[];return n.push({id:`nodejs`,name:`Node.js`,found:!0,version:process.version,severity:`required`}),n.push(checkBinary(`gjs`,`GJS`,`gjs`,[`--version`],`required`,n=>n.replace(/^GJS\s+/i,``).split(`
|
|
750
750
|
`)[0]??n)),n}function checkGwebgl(n){return checkNpmPackage(`gwebgl`,`gwebgl (@gjsify/webgl)`,`@gjsify/webgl`,n,`optional`,[`@gjsify/webgl`])}function runRequiredChecks(n){let a=[];return a.push(checkBinary(`blueprint-compiler`,`Blueprint Compiler`,`blueprint-compiler`,[`--version`],`required`)),a.push(checkBinary(`pkg-config`,`pkg-config`,`pkg-config`,[`--version`],`required`)),a.push(checkBinary(`meson`,`Meson`,`meson`,[`--version`],`required`)),a.push(checkPkgConfig(`gtk4`,`GTK4`,`gtk4`,`required`)),a.push(checkPkgConfig(`libadwaita`,`libadwaita`,`libadwaita-1`,`required`)),a.push(checkPkgConfig(`libsoup3`,`libsoup3`,`libsoup-3.0`,`required`)),a.push(checkPkgConfig(`gobject-introspection`,`GObject Introspection`,`gobject-introspection-1.0`,`required`)),a}function runOptionalChecks(n,a){let S=[];for(let[a,C]of Object.entries(xj)){if(n!==null&&!n.has(a))continue;let N=Object.entries(Sj).filter(([,n])=>n.includes(a)).map(([n])=>n);S.push(checkPkgConfig(C.id,C.name,C.pkgName,`optional`,N))}return(n===null||n.has(`gwebgl`))&&S.push(checkGwebgl(a)),S}function buildInstallCommand(n,a){if(n===`unknown`)return null;let S=Cj[n],C=[],N=[];for(let n of a){if(n.id===`gwebgl`){N.push(`@gjsify/webgl`);continue}if(n.id===`nodejs`)continue;let a=S[n.id];a&&C.push(a)}let F=[];return C.length>0&&F.push(`${wj[n]} ${C.join(` `)}`),N.length>0&&F.push(`npm install ${N.join(` `)}`),F.length>0?F.join(`
|
package/lib/commands/run.js
CHANGED
|
@@ -46,6 +46,18 @@ export const runCommand = {
|
|
|
46
46
|
type: 'string',
|
|
47
47
|
description: 'Run <target> as a script in the named workspace (by name or path), like `npm run <script> -w <name>`.',
|
|
48
48
|
})
|
|
49
|
+
// Pass-through runner: the TARGET owns its whole flag namespace, so
|
|
50
|
+
// disable gjsify's own `--version` / `--help` for THIS command. Without
|
|
51
|
+
// this, `gjsify run <target> --help` / `--version` are KNOWN options →
|
|
52
|
+
// yargs prints the gjsify CLI's help/version instead of forwarding them
|
|
53
|
+
// to the target (e.g. `gjsify run start --version` printed gjsify's
|
|
54
|
+
// version, not the run script's). Disabled → they become "unknown" and
|
|
55
|
+
// `unknown-options-as-args` (below) routes them into `[args..]` → child.
|
|
56
|
+
// Same pattern as the `tsc` pass-through command. (`gjsify run --help`
|
|
57
|
+
// with no target now errors "target required" rather than showing this
|
|
58
|
+
// command's help — the accepted pass-through trade-off, as with `tsc`.)
|
|
59
|
+
.version(false)
|
|
60
|
+
.help(false)
|
|
49
61
|
.parserConfiguration({
|
|
50
62
|
// Preserve `--` as args['--'] so callers can write
|
|
51
63
|
// gjsify run ./server.mjs -- --port 8080
|
|
@@ -58,8 +70,9 @@ export const runCommand = {
|
|
|
58
70
|
// Without this, the top-level `.strict()` (cli-app.ts) rejects
|
|
59
71
|
// --port/--year as "unknown arguments" before they reach the
|
|
60
72
|
// target. Treating unknown options as positional args routes
|
|
61
|
-
// them into the `[args..]` positional (then to the child).
|
|
62
|
-
//
|
|
73
|
+
// them into the `[args..]` positional (then to the child). With
|
|
74
|
+
// `.version(false).help(false)` above, `--help` / `--version`
|
|
75
|
+
// are unknown too, so they forward to the target like any flag.
|
|
63
76
|
'unknown-options-as-args': true,
|
|
64
77
|
}),
|
|
65
78
|
handler: async (args) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.9",
|
|
4
4
|
"description": "CLI for Gjsify",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -122,19 +122,19 @@
|
|
|
122
122
|
"cli"
|
|
123
123
|
],
|
|
124
124
|
"dependencies": {
|
|
125
|
-
"@gjsify/buffer": "^0.16.
|
|
126
|
-
"@gjsify/create-app": "^0.16.
|
|
127
|
-
"@gjsify/node-globals": "^0.16.
|
|
128
|
-
"@gjsify/node-polyfills": "^0.16.
|
|
129
|
-
"@gjsify/npm-registry": "^0.16.
|
|
130
|
-
"@gjsify/resolve-npm": "^0.16.
|
|
131
|
-
"@gjsify/rolldown-plugin-gjsify": "^0.16.
|
|
132
|
-
"@gjsify/rolldown-plugin-pnp": "^0.16.
|
|
133
|
-
"@gjsify/semver": "^0.16.
|
|
134
|
-
"@gjsify/tar": "^0.16.
|
|
135
|
-
"@gjsify/tsc": "^0.16.
|
|
136
|
-
"@gjsify/web-polyfills": "^0.16.
|
|
137
|
-
"@gjsify/workspace": "^0.16.
|
|
125
|
+
"@gjsify/buffer": "^0.16.9",
|
|
126
|
+
"@gjsify/create-app": "^0.16.9",
|
|
127
|
+
"@gjsify/node-globals": "^0.16.9",
|
|
128
|
+
"@gjsify/node-polyfills": "^0.16.9",
|
|
129
|
+
"@gjsify/npm-registry": "^0.16.9",
|
|
130
|
+
"@gjsify/resolve-npm": "^0.16.9",
|
|
131
|
+
"@gjsify/rolldown-plugin-gjsify": "^0.16.9",
|
|
132
|
+
"@gjsify/rolldown-plugin-pnp": "^0.16.9",
|
|
133
|
+
"@gjsify/semver": "^0.16.9",
|
|
134
|
+
"@gjsify/tar": "^0.16.9",
|
|
135
|
+
"@gjsify/tsc": "^0.16.9",
|
|
136
|
+
"@gjsify/web-polyfills": "^0.16.9",
|
|
137
|
+
"@gjsify/workspace": "^0.16.9",
|
|
138
138
|
"cosmiconfig": "^9.0.2",
|
|
139
139
|
"get-tsconfig": "^4.14.0",
|
|
140
140
|
"pkg-types": "^2.3.1",
|
|
@@ -142,13 +142,13 @@
|
|
|
142
142
|
"yargs": "^18.0.0"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
|
-
"@gjsify/unit": "^0.16.
|
|
145
|
+
"@gjsify/unit": "^0.16.9",
|
|
146
146
|
"@types/yargs": "^17.0.35",
|
|
147
147
|
"typescript": "^6.0.3"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
|
-
"@gjsify/oxfmt-native": "^0.16.
|
|
151
|
-
"@gjsify/rolldown-native": "^0.16.
|
|
150
|
+
"@gjsify/oxfmt-native": "^0.16.9",
|
|
151
|
+
"@gjsify/rolldown-native": "^0.16.9"
|
|
152
152
|
},
|
|
153
153
|
"peerDependenciesMeta": {
|
|
154
154
|
"@gjsify/oxfmt-native": {
|