just-binary 3.0.2 → 3.2.0
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/bin/chunks/chunk-OCVX56N5.js +6 -0
- package/dist/bin/{shell/chunks/date-KYJ2OPHH.js → chunks/date-K253WXCF.js} +1 -1
- package/dist/bin/{shell/chunks/flag-coverage-O3TGZMW3.js → chunks/flag-coverage-GI5UJZB7.js} +1 -1
- package/dist/bin/just-bash.js +229 -229
- package/dist/bin/shell/chunks/chunk-OCVX56N5.js +6 -0
- package/dist/bin/{chunks/date-KYJ2OPHH.js → shell/chunks/date-K253WXCF.js} +1 -1
- package/dist/bin/{chunks/flag-coverage-O3TGZMW3.js → shell/chunks/flag-coverage-GI5UJZB7.js} +1 -1
- package/dist/bin/shell/shell.js +288 -288
- package/dist/bundle/browser.js +302 -301
- package/dist/bundle/chunks/chunk-5O326FL2.js +5 -0
- package/dist/bundle/chunks/{date-MHLQVLQZ.js → date-3ASQNZYJ.js} +1 -1
- package/dist/bundle/chunks/{flag-coverage-33IDWH3V.js → flag-coverage-ICCKNUY3.js} +1 -1
- package/dist/bundle/index.js +173 -173
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +1 -0
- package/dist/fs/interface.d.ts +11 -0
- package/dist/fs/mountable-fs/mountable-fs.d.ts +1 -0
- package/dist/fs/overlay-fs/overlay-fs.d.ts +7 -0
- package/dist/fs/range.d.ts +10 -0
- package/dist/fs/read-write-fs/read-write-fs.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bin/chunks/chunk-ECBMSCPX.js +0 -5
- package/dist/bin/shell/chunks/chunk-ECBMSCPX.js +0 -5
- package/dist/bundle/chunks/chunk-KM46TYGR.js +0 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as y,b as M,c as k}from"./chunk-DFAHK2EQ.js";import{b as g,e as h}from"./chunk-RAUBS6MJ.js";import{k as T,l as w}from"./chunk-463VWH7H.js";var I={name:"date",summary:"display the current time in the given FORMAT",usage:"date [OPTION]... [+FORMAT]",options:["-d, --date=STRING display time described by STRING","-u, --utc print Coordinated Universal Time (UTC)"," --timezone=TZ use the named IANA time zone (e.g. America/New_York)","-I, --iso-8601 output date/time in ISO 8601 format","-R, --rfc-email output RFC 5322 date format"," --help display this help and exit","","If --timezone is not given, the TZ environment variable is used."]},N=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function i(r,n=2){return String(r).padStart(n,"0")}var v={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function D(r,n){let a=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,weekday:"short",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e={};for(let t of a.formatToParts(r))e[t.type]=t.value;let o=Number.parseInt(e.hour,10);return o===24&&(o=0),{Y:Number.parseInt(e.year,10),m:Number.parseInt(e.month,10)-1,D:Number.parseInt(e.day,10),H:o,M:Number.parseInt(e.minute,10),S:Number.parseInt(e.second,10),w:v[e.weekday]??0}}function $(r,n){let a=D(r,n),e=Date.UTC(a.Y,a.m,a.D,a.H,a.M,a.S);return Math.round((e-r.getTime())/6e4)}function F(r){let n=r>=0?"+":"-",a=Math.abs(r);return`${n}${i(Math.floor(a/60))}${i(a%60)}`}function z(r,n){let a=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"short"});for(let e of a.formatToParts(r))if(e.type==="timeZoneName")return e.value;return n??""}function S(r,n,a){let e=D(r,a),o=$(r,a),t="",u=0;for(;u<n.length;){if(n[u]==="%"&&u+1<n.length){let f=n[++u];switch(f){case"%":t+="%";break;case"a":t+=N[e.w];break;case"b":case"h":t+=H[e.m];break;case"d":t+=i(e.D);break;case"e":t+=String(e.D).padStart(2," ");break;case"F":t+=`${e.Y}-${i(e.m+1)}-${i(e.D)}`;break;case"H":t+=i(e.H);break;case"I":t+=i(e.H%12||12);break;case"m":t+=i(e.m+1);break;case"M":t+=i(e.M);break;case"n":t+=`
|
|
3
|
+
`;break;case"p":t+=e.H<12?"AM":"PM";break;case"P":t+=e.H<12?"am":"pm";break;case"R":t+=`${i(e.H)}:${i(e.M)}`;break;case"s":t+=Math.floor(r.getTime()/1e3);break;case"S":t+=i(e.S);break;case"t":t+=" ";break;case"T":t+=`${i(e.H)}:${i(e.M)}:${i(e.S)}`;break;case"u":t+=e.w||7;break;case"w":t+=e.w;break;case"y":t+=i(e.Y%100);break;case"Y":t+=e.Y;break;case"z":t+=F(o);break;case"Z":t+=z(r,a);break;default:t+=`%${f}`}}else t+=n[u];u++}return t}function Y(r){let n=new Date(r);if(!Number.isNaN(n.getTime()))return n;if(/^\d+$/.test(r))return new Date(Number.parseInt(r,10)*1e3);let a=r.toLowerCase();return a==="now"||a==="today"?new Date:a==="yesterday"?new Date(Date.now()-864e5):a==="tomorrow"?new Date(Date.now()+864e5):null}var O={name:"date",async execute(r,n){let a=T(r);if(M(a))return y(I);let e=!1,o=null,t=null,u=!1,f=!1,d=null;for(let c=0;c<a.length;c++){let s=a[c];if(s==="-u"||s==="--utc")e=!0;else if(s==="-d"||s==="--date")o=a[++c]??"";else if(s.startsWith("--date="))o=s.slice(7);else if(s==="--timezone")d=a[++c]??"";else if(s.startsWith("--timezone="))d=s.slice(11);else if(s==="-I"||s==="--iso-8601")u=!0;else if(s==="-R"||s==="--rfc-email")f=!0;else if(s.startsWith("+"))t=s.slice(1);else{if(s.startsWith("--"))return k("date",s);if(s.startsWith("-"))for(let p of s.slice(1))if(p==="u")e=!0;else if(p==="I")u=!0;else if(p==="R")f=!0;else return k("date",`-${p}`)}}let l;if(e)l="UTC";else if(d!==null&&d!=="")l=d;else{let c=w(n.env,"TZ");c&&(l=c)}if(l!==void 0)try{new Intl.DateTimeFormat("en-US",{timeZone:l})}catch{return{stdout:g(),stderr:h(`date: invalid time zone '${l}'
|
|
4
|
+
`),exitCode:1}}let m=o!==null?Y(o):new Date;if(!m)return{stdout:g(),stderr:h(`date: invalid date '${o}'
|
|
5
|
+
`),exitCode:1};let b;return t?b=S(m,t,l):u?b=S(m,"%Y-%m-%dT%H:%M:%S%z",l):f?b=S(m,"%a, %d %b %Y %H:%M:%S %z",l):b=S(m,"%a %b %e %H:%M:%S %Z %Y",l),{stdout:h(`${b}
|
|
6
|
+
`),stderr:g(),exitCode:0}}},U={name:"date",flags:[{flag:"-d",type:"value",valueHint:"string"},{flag:"-u",type:"boolean"},{flag:"-I",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"--timezone",type:"value",valueHint:"string"}]};export{O as a,U as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-OCVX56N5.js";import"./chunk-DFAHK2EQ.js";import"./chunk-RAUBS6MJ.js";import"./chunk-463VWH7H.js";export{a as dateCommand,b as flagsForFuzzing};
|
package/dist/bin/{shell/chunks/flag-coverage-O3TGZMW3.js → chunks/flag-coverage-GI5UJZB7.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{b as yr}from"./chunk-YG67AAKF.js";import{d as Ir,e as Mr,f as jr}from"./chunk-ASU2EQWZ.js";import{b as Ar}from"./chunk-4W52T6KS.js";import{b as $r}from"./chunk-23CC4423.js";import{b as Sr}from"./chunk-7YOACDUK.js";import"./chunk-23EV7RYO.js";import"./chunk-TACNCKUC.js";import{b as Tr}from"./chunk-EHJW6FCX.js";import{b as hr}from"./chunk-GUZJZK5O.js";import{b as wr}from"./chunk-SDTTNNEH.js";import{b as xr}from"./chunk-5KQNIOZS.js";import{b as vr}from"./chunk-Z73LISDU.js";import{b as kr}from"./chunk-5IL5CXJC.js";import{b as qr}from"./chunk-V3N6H3L5.js";import{b as Cr}from"./chunk-KAWPUEQM.js";import{b as br}from"./chunk-PRQYRYWV.js";import{b as nr}from"./chunk-
|
|
2
|
+
import{b as yr}from"./chunk-YG67AAKF.js";import{d as Ir,e as Mr,f as jr}from"./chunk-ASU2EQWZ.js";import{b as Ar}from"./chunk-4W52T6KS.js";import{b as $r}from"./chunk-23CC4423.js";import{b as Sr}from"./chunk-7YOACDUK.js";import"./chunk-23EV7RYO.js";import"./chunk-TACNCKUC.js";import{b as Tr}from"./chunk-EHJW6FCX.js";import{b as hr}from"./chunk-GUZJZK5O.js";import{b as wr}from"./chunk-SDTTNNEH.js";import{b as xr}from"./chunk-5KQNIOZS.js";import{b as vr}from"./chunk-Z73LISDU.js";import{b as kr}from"./chunk-5IL5CXJC.js";import{b as qr}from"./chunk-V3N6H3L5.js";import{b as Cr}from"./chunk-KAWPUEQM.js";import{b as br}from"./chunk-PRQYRYWV.js";import{b as nr}from"./chunk-OCVX56N5.js";import{b as tr}from"./chunk-HY6WUGWS.js";import{b as lr}from"./chunk-7J7OY2YE.js";import{b as ur}from"./chunk-HEO6EBJ2.js";import{b as pr}from"./chunk-XSBNCA43.js";import{b as er}from"./chunk-WXI44VNZ.js";import{b as dr}from"./chunk-NNVWOCET.js";import{b as cr}from"./chunk-YER5PEKD.js";import"./chunk-I2N72LXH.js";import{b as rr}from"./chunk-3VDZW42W.js";import{c as or,d as ar}from"./chunk-SZM4GZ4H.js";import{b as sr}from"./chunk-VWJBSJYM.js";import{b as ir}from"./chunk-H7TGYILF.js";import{c as gr,d as mr}from"./chunk-RFIBBYTO.js";import{b as Fr}from"./chunk-YGAHXCGB.js";import"./chunk-N7P3SUNH.js";import"./chunk-UYBH3FNE.js";import{b as zr}from"./chunk-D44C6YVE.js";import{b as fr}from"./chunk-RIV3HSPK.js";import{b as Q}from"./chunk-QXOUI5BS.js";import{b as R}from"./chunk-44ROJVH3.js";import{b as U}from"./chunk-UAZICDKU.js";import{b as V}from"./chunk-AN2KBMAK.js";import{b as W}from"./chunk-444WPTN5.js";import{c as X,d as Y}from"./chunk-67SBKZZD.js";import{c as Z,d as _}from"./chunk-D34QBGQ3.js";import{b as N}from"./chunk-XB426ZI7.js";import{b as E}from"./chunk-2IOUIOWE.js";import{b as G}from"./chunk-U4LP6WPJ.js";import{b as H}from"./chunk-Q2BKN6MV.js";import{b as J}from"./chunk-AZQ66C5R.js";import{b as K}from"./chunk-6U6CK6V4.js";import{b as L}from"./chunk-IAUA3FL7.js";import{b as O}from"./chunk-ZZPPBMHW.js";import{b as P}from"./chunk-SL4D2YES.js";import{b as M}from"./chunk-GIVPKQT5.js";import{b as j}from"./chunk-LVSKOXVG.js";import{b as A}from"./chunk-X7PEK6W7.js";import{b as $}from"./chunk-MPX22C7Y.js";import{b as S}from"./chunk-4VVLCPRH.js";import{b as T}from"./chunk-B4GXMUCA.js";import{b as B}from"./chunk-RUNWFUUE.js";import{b as D}from"./chunk-JU5KTPFP.js";import{b as h}from"./chunk-IQY3I4OH.js";import{b as w}from"./chunk-66PXNTAV.js";import"./chunk-RZ6FAJ25.js";import{b as x}from"./chunk-DMTOGHTU.js";import{b as v}from"./chunk-RX4PT2U7.js";import{d as k,e as q,f as C}from"./chunk-CE2ILL65.js";import"./chunk-GIFF636B.js";import{b}from"./chunk-4Y3GINAY.js";import"./chunk-BXOX2H2G.js";import{b as y}from"./chunk-EXCMJ23H.js";import{b as I}from"./chunk-FVFLR7NF.js";import{b as n}from"./chunk-XRZNW2KP.js";import{b as t}from"./chunk-NSSLXYEG.js";import{b as l}from"./chunk-HZM5PBQF.js";import{b as u}from"./chunk-CD3NCHIB.js";import{b as p}from"./chunk-QKQUVK53.js";import{b as e}from"./chunk-446TXLPR.js";import{b as d}from"./chunk-OH3VVXF7.js";import{b as c}from"./chunk-QFPJQSDK.js";import"./chunk-RUESYAVK.js";import"./chunk-CAXM2HMK.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-PZ46XEZ4.js";import{b as g}from"./chunk-PKKBPSVJ.js";import"./chunk-Z72PSRMX.js";import{b as m}from"./chunk-L2KFCEBW.js";import"./chunk-K2K4KPOQ.js";import"./chunk-XILOLP4K.js";import{b as F}from"./chunk-RMG637UR.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-RAL2LVDX.js";import{b as f}from"./chunk-IPWJZ22H.js";import"./chunk-4VDEBYW7.js";import"./chunk-7VWUKGDV.js";import"./chunk-DFAHK2EQ.js";import"./chunk-RAUBS6MJ.js";import"./chunk-463VWH7H.js";var Gr=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,y,I,M,j,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,yr,Ir,Mr,jr,Ar,$r,ir,Sr,Tr];function Br(){return Gr}var Dr=new Map;for(let r of Br())Dr.set(r.name,new Set(r.flags.map(o=>o.flag)));function fa(r,o,Er){let a=Dr.get(o);if(!(!a||a.size===0))for(let s of Er)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{fa as emitFlagCoverage};
|