@gjsify/tsc 0.37.0 → 0.38.1
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/tsc.gjs.mjs +1 -1
- package/package.json +6 -6
package/dist/tsc.gjs.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env -S gjs -m
|
|
2
|
-
if(globalThis.__gjsifyBundleUrl??=import.meta.url,Symbol.dispose||(Symbol.dispose=Symbol.for(`Symbol.dispose`)),Symbol.asyncDispose||(Symbol.asyncDispose=Symbol.for(`Symbol.asyncDispose`)),globalThis.process===void 0){let e=globalThis.imports.system,t=globalThis.imports.gi.GLib,_h=e=>[0,0];_h.bigint=()=>0n,
|
|
2
|
+
if(globalThis.__gjsifyBundleUrl??=import.meta.url,Symbol.dispose||(Symbol.dispose=Symbol.for(`Symbol.dispose`)),Symbol.asyncDispose||(Symbol.asyncDispose=Symbol.for(`Symbol.asyncDispose`)),globalThis.process===void 0){let e=globalThis.imports.system,t=globalThis.imports.gi.GLib,_h=e=>[0,0];_h.bigint=()=>0n;let n,_p=()=>{if(n)return n;n={platform:`linux`,arch:`x64`};try{if(t.getenv(`OS`)===`Windows_NT`||t.getenv(`SystemRoot`)){let e=(t.getenv(`PROCESSOR_ARCHITECTURE`)||``).toLowerCase();return n={platform:`win32`,arch:e===`arm64`?`arm64`:e===`x86`?`ia32`:`x64`},n}let e=t.spawn_sync(null,[`uname`,`-sm`],null,t.SpawnFlags.SEARCH_PATH,null);if(e&&e[0]&&e[1]){let t=new TextDecoder().decode(e[1]).trim().split(/\s+/);if(t.length>1){let e=t[0],r=t[t.length-1].toLowerCase();n={platform:e===`Linux`?`linux`:e===`Darwin`?`darwin`:/^CYGWIN/i.test(e)?`cygwin`:/^(MINGW|MSYS|Windows)/i.test(e)?`win32`:e.toLowerCase(),arch:r===`x86_64`||r===`amd64`?`x64`:r===`aarch64`||r===`arm64`?`arm64`:/^i[3-6]86$/.test(r)?`ia32`:r.startsWith(`arm`)?`arm`:r}}}}catch{}return n};globalThis.process={get platform(){return _p().platform},get arch(){return _p().arch},version:`v20.0.0`,env:new Proxy({},{get(e,n){return typeof n==`string`?t.getenv(n)??void 0:void 0},set(e,n,r){return typeof n==`string`&&t.setenv(n,String(r),!0),!0},has(e,n){return typeof n==`string`&&t.getenv(n)!==null},deleteProperty(e,n){return typeof n==`string`&&t.unsetenv(n),!0},ownKeys(){return t.listenv()??[]},getOwnPropertyDescriptor(e,n){let r=t.getenv(n);return r===null?void 0:{value:r,writable:!0,enumerable:!0,configurable:!0}}}),argv:e?.programArgs?[`gjs`,e.programInvocationName||``,...e.programArgs]:[`gjs`],versions:{},config:{},cwd(){return t.get_current_dir()||`/`},exit(t){e.exit(t??0)},stderr:{write(e){globalThis.printerr(e)}},stdout:{write(e){globalThis.print(e)}},stdin:null,exitCode:void 0,nextTick(e,...t){Promise.resolve().then(()=>e(...t))},hrtime:_h}}import e from"gi://GLib?version=2.0";import t from"gi://Gio?version=2.0";import n from"gi://GioUnix?version=2.0";import"system";var r=Object.defineProperty,__name=(e,t)=>r(e,`name`,{value:t,configurable:!0}),i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,__esmMin=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},__exportAll$2=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=i(t,d))||s.enumerable});return e},__toCommonJS=e=>o.call(e,`module.exports`)?e[`module.exports`]:__copyProps(r({},`__esModule`,{value:!0}),e),s=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}),c,_encoder,l,FilePolyfill,u,d,f=__esmMin(()=>{_encoder=()=>c??=new TextEncoder,l=class BlobPolyfill{_parts;size;type;constructor(e,t){this._parts=e||[],this.type=t?.type||``,this.size=this._parts.reduce((e,t)=>typeof t==`string`?e+_encoder().encode(t).byteLength:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?e+t.byteLength:t&&typeof t.size==`number`?e+t.size:e,0)}async bytes(){let e=await this.arrayBuffer();return new Uint8Array(e)}async text(){return new TextDecoder().decode(await this.arrayBuffer())}async arrayBuffer(){let e=[];for(let t of this._parts)if(typeof t==`string`)e.push(_encoder().encode(t));else if(t instanceof ArrayBuffer)e.push(new Uint8Array(t));else if(ArrayBuffer.isView(t))e.push(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));else if(t&&typeof t.arrayBuffer==`function`){let n=await t.arrayBuffer();e.push(new Uint8Array(n))}let t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n.buffer}slice(e,t,n){return new BlobPolyfill([],{type:n})}stream(){let e=this;return new ReadableStream({async pull(t){let n=await e.arrayBuffer();t.enqueue(new Uint8Array(n)),t.close()}})}},FilePolyfill=class extends l{name;lastModified;webkitRelativePath=``;constructor(e,t,n){super(e,n),this.name=t,this.lastModified=n?.lastModified??Date.now()}},u=globalThis.Blob??l,d=globalThis.File??FilePolyfill});function makeCallable(e){return new Proxy(e,{apply(e,t,n){if(t==null||t===globalThis)return Reflect.construct(e,n,e);let r=Reflect.construct(e,n,e);for(let e of Reflect.ownKeys(r)){let n=Object.getOwnPropertyDescriptor(r,e);n&&Object.defineProperty(t,e,n)}return t}})}var p=__esmMin(()=>{}),initErrorV8Methods,m=__esmMin(()=>{initErrorV8Methods=e=>{let t=Error;t.captureStackTrace||=function(e,t){let n=Error();Object.defineProperty(t||e,"stack",{configurable:!0,get:function getStack(){var e=n.stack;return Object.defineProperty(this,"stack",{value:e}),e}})}}});function createNodeError$1(e,t,n){let r=e,i=h[r?.code??-1]||`EIO`,a=`${i}: ${r?.message||`unknown error`}, ${t}`;n?.path&&(a+=` '${n.path}'`),n?.dest&&(a+=` -> '${n.dest}'`),n?.address&&(a+=` ${n.address}`),n?.port!=null&&(a+=`:${n.port}`);let o=Error(a);return o.code=i,o.syscall=t,o.errno=-(r?.code||0),n?.path&&(o.path=n.path),n?.address&&(o.address=n.address),n?.port!=null&&(o.port=n.port),o}function isNotFoundError(e){let t=e;return t?.code===1||t?.code===`ENOENT`}var h,g=__esmMin(()=>{h={0:`EIO`,1:`ENOENT`,2:`EEXIST`,3:`EISDIR`,4:`ENOTDIR`,5:`ENOTEMPTY`,6:`ENOENT`,7:`ENFILE`,9:`EACCES`,10:`ENFILE`,11:`EINVAL`,12:`ELOOP`,13:`ENOSPC`,14:`EACCES`,17:`ELOOP`,19:`ENOSPC`,20:`ENOTSUP`,22:`EMFILE`,24:`EROFS`,25:`ECANCELED`,26:`EBUSY`,27:`ETIMEDOUT`,28:`EHOSTUNREACH`,30:`EHOSTUNREACH`,31:`ENETUNREACH`,32:`ECONNREFUSED`,33:`EADDRINUSE`,34:`ECONNRESET`,36:`EPIPE`,38:`ENETUNREACH`,39:`ECONNREFUSED`,40:`ECONNREFUSED`,41:`EACCES`,44:`ECONNRESET`,46:`EMSGSIZE`},__name(createNodeError$1,`createNodeError`)});function registerGlobal(e,t){let n=globalThis;n[e]===void 0&&(n[e]=t)}var _=__esmMin(()=>{});function hostPlatform(){let e=globalThis.process?.platform;return typeof e==`string`?e:void 0}function isWin32(){return hostPlatform()===`win32`}function isDarwin(){return hostPlatform()===`darwin`}var v=__esmMin(()=>{});function _formatArgs(...e){let t=e[0],n=e.slice(1);if(typeof t!=`string`||!/%(s|d|i|f|o|O|c)/.test(t))return e.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(` `);let r=0,i=t.replace(/%([sdifOoc])/g,(e,t)=>{if(r>=n.length)return e;let i=n[r++];switch(t){case`s`:return String(i);case`d`:case`i`:return String(parseInt(String(i),10));case`f`:return String(parseFloat(String(i)));case`o`:case`O`:return JSON.stringify(i);case`c`:return``;default:return e}}),a=n.slice(r);return a.length===0?i:i+` `+a.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(` `)}var y,Console,b,log,info,debug,warn,error,dir,dirxml,table,x,assert,S,time,timeEnd,timeLog,count,countReset,C,groupCollapsed,groupEnd,profile,profileEnd,timeStamp,w=__esmMin(()=>{y=typeof print==`function`&&typeof printerr==`function`,Console=class{_stdout;_stderr;_groupDepth=0;_groupIndentation;_timers=new Map;_counters=new Map;constructor(e,t){if(e&&typeof e.write==`function`)this._stdout=e,this._stderr=t||this._stdout;else if(e&&typeof e==`object`){let t=e;this._stdout=t.stdout,this._stderr=t.stderr||t.stdout}this._groupIndentation=2}_write(e,...t){let n=e===`stderr`&&this._stderr||this._stdout;if(n){let e=` `.repeat(this._groupDepth*this._groupIndentation),r=_formatArgs(...t);n.write(e+r+`
|
|
3
3
|
`)}else if(y){let n=` `.repeat(this._groupDepth*this._groupIndentation)+_formatArgs(...t);e===`stderr`?printerr(n):print(n)}else{let n=globalThis.console;e===`stderr`?n.error(...t):n.log(...t)}}log(...e){this._write(`stdout`,...e)}info(...e){this._write(`stdout`,...e)}debug(...e){this._write(`stdout`,...e)}warn(...e){this._write(`stderr`,...e)}error(...e){this._write(`stderr`,...e)}dir(e,t){this._write(`stdout`,e)}dirxml(...e){this.log(...e)}assert(e,...t){e||this.error(`Assertion failed:`,...t)}clear(){this._stdout?this._stdout.write(`\x1Bc`):y?print(`\x1Bc`):globalThis.console.clear()}count(e=`default`){let t=(this._counters.get(e)||0)+1;this._counters.set(e,t),this.log(`${e}: ${t}`)}countReset(e=`default`){this._counters.delete(e)}group(...e){e.length>0&&this.log(...e),this._groupDepth++}groupCollapsed(...e){this.group(...e)}groupEnd(){this._groupDepth>0&&this._groupDepth--}table(e,t){this._stdout?this._write(`stdout`,e):y?print(JSON.stringify(e,null,2)):globalThis.console.table(e,t)}time(e=`default`){this._timers.set(e,Date.now())}timeEnd(e=`default`){let t=this._timers.get(e);t===void 0?this.warn(`Warning: No such label '${e}' for console.timeEnd()`):(this.log(`${e}: ${Date.now()-t}ms`),this._timers.delete(e))}timeLog(e=`default`,...t){let n=this._timers.get(e);n===void 0?this.warn(`Warning: No such label '${e}' for console.timeLog()`):this.log(`${e}: ${Date.now()-n}ms`,...t)}trace(...e){let t=Error().stack?.split(`
|
|
4
4
|
`).slice(1).join(`
|
|
5
5
|
`)||``;this._write(`stderr`,`Trace:`,...e,`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/tsc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"description": "TypeScript compiler for GJS — bundles upstream `typescript` to a single GJS module + ships a Node-free `tsc` bin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/infra/tsc#readme",
|
|
53
53
|
"license": "MIT",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@gjsify/console": "^0.
|
|
56
|
-
"@gjsify/node-globals": "^0.
|
|
57
|
-
"@gjsify/web-globals": "^0.
|
|
55
|
+
"@gjsify/console": "^0.38.1",
|
|
56
|
+
"@gjsify/node-globals": "^0.38.1",
|
|
57
|
+
"@gjsify/web-globals": "^0.38.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@gjsify/cli": "^0.
|
|
61
|
-
"@gjsify/unit": "^0.
|
|
60
|
+
"@gjsify/cli": "^0.38.1",
|
|
61
|
+
"@gjsify/unit": "^0.38.1",
|
|
62
62
|
"@girs/gio-2.0": "^4.1.0",
|
|
63
63
|
"@girs/glib-2.0": "^4.1.0",
|
|
64
64
|
"typescript": "^6.0.3"
|