@struktoai/mirage-node 0.0.3-alpha.0 → 0.0.3
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/README.md +1 -1
- package/dist/{aliyun-TMZRUYCG.js → aliyun-JMJ3PFYY.js} +3 -3
- package/dist/{backblaze-OHW57DLK.js → backblaze-TDFD23QO.js} +3 -3
- package/dist/{box-UXTCAFOZ.js → box-GQ2U2R6R.js} +2 -2
- package/dist/{ceph-TNN4I2FT.js → ceph-S2VOYO6G.js} +3 -3
- package/dist/{chunk-FXFDBF3P.js → chunk-3WIO7NBR.js} +2 -2
- package/dist/{chunk-O7ODGJYL.js → chunk-47AVIIOT.js} +2 -2
- package/dist/{chunk-Q6CDMOM6.js → chunk-7CW3BMPH.js} +2 -2
- package/dist/{chunk-E7RW3SBV.js → chunk-A7IVFIOP.js} +2 -2
- package/dist/chunk-A7IVFIOP.js.map +1 -0
- package/dist/{chunk-3T3RMDNX.js → chunk-AUHSTJJ3.js} +2 -2
- package/dist/{chunk-PJBQKMCD.js → chunk-DM4GSE26.js} +2 -2
- package/dist/{chunk-5DLOHQJ2.js → chunk-EM4J5EQS.js} +2 -2
- package/dist/chunk-EM4J5EQS.js.map +1 -0
- package/dist/{chunk-ABTEGAFB.js → chunk-EZQ5HBAC.js} +2 -2
- package/dist/chunk-EZQ5HBAC.js.map +1 -0
- package/dist/{chunk-KTNDT45N.js → chunk-FQ33BYFR.js} +2 -2
- package/dist/{chunk-YAVGCQUP.js → chunk-G2WCEUQL.js} +2 -2
- package/dist/chunk-G2WCEUQL.js.map +1 -0
- package/dist/{chunk-RLGWMJD3.js → chunk-GCFYZSVR.js} +133 -3
- package/dist/chunk-GCFYZSVR.js.map +1 -0
- package/dist/{chunk-NHS7WLEQ.js → chunk-GS5AUKUO.js} +2 -2
- package/dist/chunk-GS5AUKUO.js.map +1 -0
- package/dist/{chunk-BYTU2YC3.js → chunk-HGCRXJGP.js} +2 -2
- package/dist/{chunk-G5BZE7UA.js → chunk-HJJMP6IX.js} +2 -2
- package/dist/{chunk-IQVNVTOP.js → chunk-I5THIMPP.js} +2 -2
- package/dist/chunk-IDYHQQOH.js +1095 -0
- package/dist/chunk-IDYHQQOH.js.map +1 -0
- package/dist/{chunk-C6NHFMIP.js → chunk-IK2L4EN3.js} +2 -2
- package/dist/{chunk-LYDMMNL2.js → chunk-JAGJTM3Q.js} +2 -2
- package/dist/chunk-JAGJTM3Q.js.map +1 -0
- package/dist/{chunk-A7X4L4JM.js → chunk-JCC4CU2I.js} +2 -2
- package/dist/chunk-JCC4CU2I.js.map +1 -0
- package/dist/{chunk-AJICZLHT.js → chunk-KPULTUOK.js} +2 -2
- package/dist/{chunk-YPT4JBUY.js → chunk-LV2G7VHL.js} +2 -2
- package/dist/chunk-LV2G7VHL.js.map +1 -0
- package/dist/{chunk-C6NHEDHY.js → chunk-M5FVUIYP.js} +2 -2
- package/dist/chunk-M5FVUIYP.js.map +1 -0
- package/dist/{chunk-HEHERHQ5.js → chunk-MPCCRRE6.js} +2 -2
- package/dist/chunk-MPCCRRE6.js.map +1 -0
- package/dist/{chunk-RQYEEA2O.js → chunk-N5FSLVKO.js} +2 -2
- package/dist/{chunk-CASCUFK2.js → chunk-NOHWIBRX.js} +2 -2
- package/dist/chunk-NOHWIBRX.js.map +1 -0
- package/dist/{chunk-TRTUHCS4.js → chunk-QCZ2XUKH.js} +2 -2
- package/dist/chunk-QCZ2XUKH.js.map +1 -0
- package/dist/{chunk-3IJSIVKT.js → chunk-QQBJC2FQ.js} +2 -2
- package/dist/{chunk-JZQHKDSY.js → chunk-RNQN2FOU.js} +2 -2
- package/dist/chunk-RNQN2FOU.js.map +1 -0
- package/dist/{chunk-DTAY7LPC.js → chunk-S5OVP467.js} +2 -2
- package/dist/chunk-S5OVP467.js.map +1 -0
- package/dist/{chunk-5YOCVEUB.js → chunk-SWCDFEUK.js} +2 -2
- package/dist/chunk-SWCDFEUK.js.map +1 -0
- package/dist/{chunk-MHCMHKM6.js → chunk-TA3WMOMU.js} +2 -2
- package/dist/chunk-TA3WMOMU.js.map +1 -0
- package/dist/{chunk-WSGEIVY3.js → chunk-TURD42QO.js} +101 -85
- package/dist/chunk-TURD42QO.js.map +1 -0
- package/dist/{chunk-WL7HS7EM.js → chunk-UINQOUZR.js} +2 -2
- package/dist/{chunk-A4Z6DZ22.js → chunk-VWKUT4CW.js} +2 -2
- package/dist/chunk-VWKUT4CW.js.map +1 -0
- package/dist/{chunk-ERELJ7BS.js → chunk-WAR4Q2NM.js} +2 -2
- package/dist/chunk-WAR4Q2NM.js.map +1 -0
- package/dist/{chunk-5HCVKTP3.js → chunk-WHFUWWI6.js} +92 -81
- package/dist/chunk-WHFUWWI6.js.map +1 -0
- package/dist/{chunk-HQ4KWN76.js → chunk-X3G37FXT.js} +2 -2
- package/dist/{chunk-OYV2DN66.js → chunk-X5HF2OFP.js} +2 -2
- package/dist/chunk-XWVDS66D.js +963 -0
- package/dist/chunk-XWVDS66D.js.map +1 -0
- package/dist/{chunk-L6JPBJAS.js → chunk-YAHRT6MB.js} +2 -2
- package/dist/{chunk-XRU5WXZX.js → chunk-ZEGAMJO2.js} +2 -2
- package/dist/chunk-ZEGAMJO2.js.map +1 -0
- package/dist/{chunk-B6SXRCBO.js → chunk-ZGSER5TG.js} +2 -2
- package/dist/databricks_volume-7XOUYSTY.js +7 -0
- package/dist/{digitalocean-6SPR4S7V.js → digitalocean-3CQ4CPPZ.js} +3 -3
- package/dist/{discord-SAV2RBJV.js → discord-BG7OSRJG.js} +2 -2
- package/dist/{disk-POACMF4G.js → disk-XVLBCVKE.js} +2 -2
- package/dist/{dropbox-CQ7MTYX2.js → dropbox-74GYLV3R.js} +2 -2
- package/dist/{email-KBQ7CXS7.js → email-5IZ7OBQ4.js} +2 -2
- package/dist/{gcs-SMIE4VMT.js → gcs-EMEYU2XT.js} +3 -3
- package/dist/{gdocs-X5Y2SIQX.js → gdocs-R67TDPON.js} +2 -2
- package/dist/{gdrive-SIQPRIGI.js → gdrive-PRN2ALRK.js} +2 -2
- package/dist/{github-KBHWANKQ.js → github-DV7E6OFV.js} +2 -2
- package/dist/{github_ci-HPITNK37.js → github_ci-Q554V5PA.js} +2 -2
- package/dist/{gmail-DKHAGJNX.js → gmail-OLN2LT4O.js} +2 -2
- package/dist/{gsheets-ZSUDIWGK.js → gsheets-H4RYMQJ5.js} +2 -2
- package/dist/{gslides-GYXM7IMJ.js → gslides-YLCHKJOM.js} +2 -2
- package/dist/{hf_buckets-RIOMV7WG.js → hf_buckets-DTKXKKFF.js} +3 -3
- package/dist/{hf_datasets-QF4BQ3OK.js → hf_datasets-55C4APKR.js} +3 -3
- package/dist/{hf_models-62GC2HPZ.js → hf_models-RO5JR36V.js} +3 -3
- package/dist/{hf_spaces-NVSMUNRM.js → hf_spaces-ZVZ3EDRX.js} +3 -3
- package/dist/index.d.ts +110 -44
- package/dist/index.js +520 -232
- package/dist/index.js.map +1 -1
- package/dist/{langfuse-HUAYVPHF.js → langfuse-ACASJZ7O.js} +2 -2
- package/dist/{linear-2MM55KBC.js → linear-IC37LZV7.js} +2 -2
- package/dist/{minio-L3XE6PQS.js → minio-HZ576XFQ.js} +3 -3
- package/dist/mongodb-JVR62OIO.js +7 -0
- package/dist/{notion-UK4GTMT4.js → notion-HKRPQMJS.js} +2 -2
- package/dist/{oci-NURLWPL2.js → oci-ZLVECXTW.js} +3 -3
- package/dist/postgres-P36Z2YN4.js +7 -0
- package/dist/{qingstor-W55D5YFO.js → qingstor-YLP6K3L4.js} +3 -3
- package/dist/{r2-FSZK7IFI.js → r2-RPK25ANI.js} +3 -3
- package/dist/{redis-S6GIPA4Z.js → redis-V5ULXULL.js} +2 -2
- package/dist/{s3-GMPUJ65D.js → s3-4OIOCAAT.js} +2 -2
- package/dist/{scaleway-5VM55Y6D.js → scaleway-CCWCLUHB.js} +3 -3
- package/dist/{seaweedfs-J3EPUEPE.js → seaweedfs-QSWKF2FN.js} +3 -3
- package/dist/{slack-FVBXY7KD.js → slack-YPS7PII3.js} +2 -2
- package/dist/{ssh-GCXETJ3Z.js → ssh-YFP3SMTJ.js} +2 -2
- package/dist/{supabase-HLWNHBBE.js → supabase-6CFTOKGZ.js} +3 -3
- package/dist/{tencent-YDO73XBD.js → tencent-IWZZOSQ4.js} +3 -3
- package/dist/{trello-CQ53BQUL.js → trello-XYKWZD6P.js} +2 -2
- package/dist/{wasabi-SOZKPMRQ.js → wasabi-6Z4DC5S5.js} +3 -3
- package/package.json +7 -5
- package/dist/chunk-5DLOHQJ2.js.map +0 -1
- package/dist/chunk-5HCVKTP3.js.map +0 -1
- package/dist/chunk-5YOCVEUB.js.map +0 -1
- package/dist/chunk-A4Z6DZ22.js.map +0 -1
- package/dist/chunk-A7X4L4JM.js.map +0 -1
- package/dist/chunk-ABTEGAFB.js.map +0 -1
- package/dist/chunk-C6NHEDHY.js.map +0 -1
- package/dist/chunk-CASCUFK2.js.map +0 -1
- package/dist/chunk-DTAY7LPC.js.map +0 -1
- package/dist/chunk-E7RW3SBV.js.map +0 -1
- package/dist/chunk-ERELJ7BS.js.map +0 -1
- package/dist/chunk-HEHERHQ5.js.map +0 -1
- package/dist/chunk-JZQHKDSY.js.map +0 -1
- package/dist/chunk-LYDMMNL2.js.map +0 -1
- package/dist/chunk-MHCMHKM6.js.map +0 -1
- package/dist/chunk-N72CAZEH.js +0 -1990
- package/dist/chunk-N72CAZEH.js.map +0 -1
- package/dist/chunk-NHS7WLEQ.js.map +0 -1
- package/dist/chunk-PBBG7VFT.js +0 -1896
- package/dist/chunk-PBBG7VFT.js.map +0 -1
- package/dist/chunk-RLGWMJD3.js.map +0 -1
- package/dist/chunk-TRTUHCS4.js.map +0 -1
- package/dist/chunk-WSGEIVY3.js.map +0 -1
- package/dist/chunk-XRU5WXZX.js.map +0 -1
- package/dist/chunk-YAVGCQUP.js.map +0 -1
- package/dist/chunk-YPT4JBUY.js.map +0 -1
- package/dist/databricks_volume-HNQ4DJVJ.js +0 -7
- package/dist/mongodb-ZOX4FRHJ.js +0 -7
- package/dist/postgres-JNFMPAO2.js +0 -7
- /package/dist/{aliyun-TMZRUYCG.js.map → aliyun-JMJ3PFYY.js.map} +0 -0
- /package/dist/{backblaze-OHW57DLK.js.map → backblaze-TDFD23QO.js.map} +0 -0
- /package/dist/{box-UXTCAFOZ.js.map → box-GQ2U2R6R.js.map} +0 -0
- /package/dist/{ceph-TNN4I2FT.js.map → ceph-S2VOYO6G.js.map} +0 -0
- /package/dist/{chunk-FXFDBF3P.js.map → chunk-3WIO7NBR.js.map} +0 -0
- /package/dist/{chunk-O7ODGJYL.js.map → chunk-47AVIIOT.js.map} +0 -0
- /package/dist/{chunk-Q6CDMOM6.js.map → chunk-7CW3BMPH.js.map} +0 -0
- /package/dist/{chunk-3T3RMDNX.js.map → chunk-AUHSTJJ3.js.map} +0 -0
- /package/dist/{chunk-PJBQKMCD.js.map → chunk-DM4GSE26.js.map} +0 -0
- /package/dist/{chunk-KTNDT45N.js.map → chunk-FQ33BYFR.js.map} +0 -0
- /package/dist/{chunk-BYTU2YC3.js.map → chunk-HGCRXJGP.js.map} +0 -0
- /package/dist/{chunk-G5BZE7UA.js.map → chunk-HJJMP6IX.js.map} +0 -0
- /package/dist/{chunk-IQVNVTOP.js.map → chunk-I5THIMPP.js.map} +0 -0
- /package/dist/{chunk-C6NHFMIP.js.map → chunk-IK2L4EN3.js.map} +0 -0
- /package/dist/{chunk-AJICZLHT.js.map → chunk-KPULTUOK.js.map} +0 -0
- /package/dist/{chunk-RQYEEA2O.js.map → chunk-N5FSLVKO.js.map} +0 -0
- /package/dist/{chunk-3IJSIVKT.js.map → chunk-QQBJC2FQ.js.map} +0 -0
- /package/dist/{chunk-WL7HS7EM.js.map → chunk-UINQOUZR.js.map} +0 -0
- /package/dist/{chunk-HQ4KWN76.js.map → chunk-X3G37FXT.js.map} +0 -0
- /package/dist/{chunk-OYV2DN66.js.map → chunk-X5HF2OFP.js.map} +0 -0
- /package/dist/{chunk-L6JPBJAS.js.map → chunk-YAHRT6MB.js.map} +0 -0
- /package/dist/{chunk-B6SXRCBO.js.map → chunk-ZGSER5TG.js.map} +0 -0
- /package/dist/{databricks_volume-HNQ4DJVJ.js.map → databricks_volume-7XOUYSTY.js.map} +0 -0
- /package/dist/{digitalocean-6SPR4S7V.js.map → digitalocean-3CQ4CPPZ.js.map} +0 -0
- /package/dist/{discord-SAV2RBJV.js.map → discord-BG7OSRJG.js.map} +0 -0
- /package/dist/{disk-POACMF4G.js.map → disk-XVLBCVKE.js.map} +0 -0
- /package/dist/{dropbox-CQ7MTYX2.js.map → dropbox-74GYLV3R.js.map} +0 -0
- /package/dist/{email-KBQ7CXS7.js.map → email-5IZ7OBQ4.js.map} +0 -0
- /package/dist/{gcs-SMIE4VMT.js.map → gcs-EMEYU2XT.js.map} +0 -0
- /package/dist/{gdocs-X5Y2SIQX.js.map → gdocs-R67TDPON.js.map} +0 -0
- /package/dist/{gdrive-SIQPRIGI.js.map → gdrive-PRN2ALRK.js.map} +0 -0
- /package/dist/{github-KBHWANKQ.js.map → github-DV7E6OFV.js.map} +0 -0
- /package/dist/{github_ci-HPITNK37.js.map → github_ci-Q554V5PA.js.map} +0 -0
- /package/dist/{gmail-DKHAGJNX.js.map → gmail-OLN2LT4O.js.map} +0 -0
- /package/dist/{gsheets-ZSUDIWGK.js.map → gsheets-H4RYMQJ5.js.map} +0 -0
- /package/dist/{gslides-GYXM7IMJ.js.map → gslides-YLCHKJOM.js.map} +0 -0
- /package/dist/{hf_buckets-RIOMV7WG.js.map → hf_buckets-DTKXKKFF.js.map} +0 -0
- /package/dist/{hf_datasets-QF4BQ3OK.js.map → hf_datasets-55C4APKR.js.map} +0 -0
- /package/dist/{hf_models-62GC2HPZ.js.map → hf_models-RO5JR36V.js.map} +0 -0
- /package/dist/{hf_spaces-NVSMUNRM.js.map → hf_spaces-ZVZ3EDRX.js.map} +0 -0
- /package/dist/{langfuse-HUAYVPHF.js.map → langfuse-ACASJZ7O.js.map} +0 -0
- /package/dist/{linear-2MM55KBC.js.map → linear-IC37LZV7.js.map} +0 -0
- /package/dist/{minio-L3XE6PQS.js.map → minio-HZ576XFQ.js.map} +0 -0
- /package/dist/{mongodb-ZOX4FRHJ.js.map → mongodb-JVR62OIO.js.map} +0 -0
- /package/dist/{notion-UK4GTMT4.js.map → notion-HKRPQMJS.js.map} +0 -0
- /package/dist/{oci-NURLWPL2.js.map → oci-ZLVECXTW.js.map} +0 -0
- /package/dist/{postgres-JNFMPAO2.js.map → postgres-P36Z2YN4.js.map} +0 -0
- /package/dist/{qingstor-W55D5YFO.js.map → qingstor-YLP6K3L4.js.map} +0 -0
- /package/dist/{r2-FSZK7IFI.js.map → r2-RPK25ANI.js.map} +0 -0
- /package/dist/{redis-S6GIPA4Z.js.map → redis-V5ULXULL.js.map} +0 -0
- /package/dist/{s3-GMPUJ65D.js.map → s3-4OIOCAAT.js.map} +0 -0
- /package/dist/{scaleway-5VM55Y6D.js.map → scaleway-CCWCLUHB.js.map} +0 -0
- /package/dist/{seaweedfs-J3EPUEPE.js.map → seaweedfs-QSWKF2FN.js.map} +0 -0
- /package/dist/{slack-FVBXY7KD.js.map → slack-YPS7PII3.js.map} +0 -0
- /package/dist/{ssh-GCXETJ3Z.js.map → ssh-YFP3SMTJ.js.map} +0 -0
- /package/dist/{supabase-HLWNHBBE.js.map → supabase-6CFTOKGZ.js.map} +0 -0
- /package/dist/{tencent-YDO73XBD.js.map → tencent-IWZZOSQ4.js.map} +0 -0
- /package/dist/{trello-CQ53BQUL.js.map → trello-XYKWZD6P.js.map} +0 -0
- /package/dist/{wasabi-SOZKPMRQ.js.map → wasabi-6Z4DC5S5.js.map} +0 -0
|
@@ -528,6 +528,7 @@ var HF_COMM = command7({
|
|
|
528
528
|
import { command as command8, specOf as specOf8, csplitGeneric } from "@struktoai/mirage-core";
|
|
529
529
|
|
|
530
530
|
// src/core/hf/write.ts
|
|
531
|
+
import { invalidateAfterWrite } from "@struktoai/mirage-core";
|
|
531
532
|
import { record as record2 } from "@struktoai/mirage-core";
|
|
532
533
|
import { enoent as enoent5 } from "@struktoai/mirage-core";
|
|
533
534
|
async function write(accessor, path, data, _index) {
|
|
@@ -542,6 +543,7 @@ async function write(accessor, path, data, _index) {
|
|
|
542
543
|
throw err;
|
|
543
544
|
}
|
|
544
545
|
record2("write", path.original, accessor.resourceName, data.byteLength, startMs);
|
|
546
|
+
await invalidateAfterWrite(path);
|
|
545
547
|
}
|
|
546
548
|
|
|
547
549
|
// src/commands/builtin/hf/csplit.ts
|
|
@@ -574,7 +576,13 @@ var HF_DIFF = command10({
|
|
|
574
576
|
name: "diff",
|
|
575
577
|
resource: [...HF_RESOURCES],
|
|
576
578
|
spec: specOf10("diff"),
|
|
577
|
-
fn: (accessor, paths, _texts, opts) => diffGeneric(
|
|
579
|
+
fn: (accessor, paths, _texts, opts) => diffGeneric(
|
|
580
|
+
paths,
|
|
581
|
+
opts,
|
|
582
|
+
(p) => stream(accessor, p),
|
|
583
|
+
(p) => readdir(accessor, p, opts.index ?? void 0),
|
|
584
|
+
(p) => stat(accessor, p, opts.index ?? void 0)
|
|
585
|
+
)
|
|
578
586
|
});
|
|
579
587
|
|
|
580
588
|
// src/commands/builtin/hf/dirname.ts
|
|
@@ -695,8 +703,10 @@ import { command as command15, findGeneric, specOf as specOf15 } from "@struktoa
|
|
|
695
703
|
// src/core/hf/find.ts
|
|
696
704
|
import {
|
|
697
705
|
buildTree,
|
|
706
|
+
emitStartPath,
|
|
698
707
|
keep,
|
|
699
708
|
rstripSlash as rstripSlash2,
|
|
709
|
+
startBasename,
|
|
700
710
|
stripSlash as stripSlash4
|
|
701
711
|
} from "@struktoai/mirage-core";
|
|
702
712
|
function matchesFilters(entryPath, kind, meta, baseDepth, options, tree) {
|
|
@@ -733,10 +743,12 @@ async function find(accessor, path, options = {}) {
|
|
|
733
743
|
const scanPath = pfx !== "" ? `${pfx}/` : "/";
|
|
734
744
|
const base = pfx !== "" ? `/${pfx}` : "/";
|
|
735
745
|
const baseDepth = base === "/" ? 0 : (base.match(/\//g) ?? []).length;
|
|
746
|
+
const startName = startBasename(path.original);
|
|
736
747
|
const op = await accessor.operator();
|
|
737
748
|
const results = [];
|
|
738
749
|
const seenDirs = /* @__PURE__ */ new Set();
|
|
739
750
|
let sawDescendant = false;
|
|
751
|
+
let dirExists = false;
|
|
740
752
|
const tree = options.tree ?? buildTree({
|
|
741
753
|
name: options.name,
|
|
742
754
|
iname: options.iname,
|
|
@@ -758,7 +770,11 @@ async function find(accessor, path, options = {}) {
|
|
|
758
770
|
const meta = entry.metadata();
|
|
759
771
|
const isDir = rel.endsWith("/") || meta.isDirectory();
|
|
760
772
|
const entryPath = `/${stripSlash4(rel)}`;
|
|
761
|
-
if (entryPath
|
|
773
|
+
if (entryPath === base) {
|
|
774
|
+
dirExists = true;
|
|
775
|
+
continue;
|
|
776
|
+
}
|
|
777
|
+
sawDescendant = true;
|
|
762
778
|
const kind = isDir ? "d" : "f";
|
|
763
779
|
const length = meta.contentLength;
|
|
764
780
|
const lm = meta.lastModified;
|
|
@@ -783,10 +799,15 @@ async function find(accessor, path, options = {}) {
|
|
|
783
799
|
}
|
|
784
800
|
}
|
|
785
801
|
}
|
|
786
|
-
if (
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
802
|
+
if (sawDescendant || dirExists) {
|
|
803
|
+
emitStartPath(results, base, startName, {
|
|
804
|
+
kind: "d",
|
|
805
|
+
isEmpty: null,
|
|
806
|
+
exists: true,
|
|
807
|
+
tree,
|
|
808
|
+
maxDepth: options.maxDepth,
|
|
809
|
+
minDepth: options.minDepth
|
|
810
|
+
});
|
|
790
811
|
}
|
|
791
812
|
return [...new Set(results)].sort();
|
|
792
813
|
}
|
|
@@ -851,6 +872,7 @@ var HF_GREP = command18({
|
|
|
851
872
|
import { command as command19, specOf as specOf19, gunzipGeneric } from "@struktoai/mirage-core";
|
|
852
873
|
|
|
853
874
|
// src/core/hf/unlink.ts
|
|
875
|
+
import { invalidateAfterUnlink } from "@struktoai/mirage-core";
|
|
854
876
|
import { FileType as FileType2, record as record3 } from "@struktoai/mirage-core";
|
|
855
877
|
import { enoent as enoent6 } from "@struktoai/mirage-core";
|
|
856
878
|
async function unlink(accessor, path, index) {
|
|
@@ -871,6 +893,7 @@ async function unlink(accessor, path, index) {
|
|
|
871
893
|
throw err;
|
|
872
894
|
}
|
|
873
895
|
record3("unlink", path.original, accessor.resourceName, 0, startMs);
|
|
896
|
+
await invalidateAfterUnlink(path);
|
|
874
897
|
}
|
|
875
898
|
|
|
876
899
|
// src/commands/builtin/hf/gunzip.ts
|
|
@@ -1176,53 +1199,46 @@ var HF_RM = command35({
|
|
|
1176
1199
|
});
|
|
1177
1200
|
|
|
1178
1201
|
// src/commands/builtin/hf/sed.ts
|
|
1179
|
-
import {
|
|
1180
|
-
var HF_SED =
|
|
1181
|
-
name: "sed",
|
|
1202
|
+
import { makeSed } from "@struktoai/mirage-core";
|
|
1203
|
+
var HF_SED = makeSed({
|
|
1182
1204
|
resource: [...HF_RESOURCES],
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
paths,
|
|
1186
|
-
texts,
|
|
1187
|
-
opts,
|
|
1188
|
-
(p) => stream(accessor, p),
|
|
1189
|
-
(p, d) => write(accessor, p, d)
|
|
1190
|
-
)
|
|
1205
|
+
stream: (a, p) => stream(a, p),
|
|
1206
|
+
write: (a, p, d) => write(a, p, d)
|
|
1191
1207
|
});
|
|
1192
1208
|
|
|
1193
1209
|
// src/commands/builtin/hf/sha256sum.ts
|
|
1194
|
-
import { command as
|
|
1195
|
-
var HF_SHA256SUM =
|
|
1210
|
+
import { command as command36, sha256sumGeneric, specOf as specOf36 } from "@struktoai/mirage-core";
|
|
1211
|
+
var HF_SHA256SUM = command36({
|
|
1196
1212
|
name: "sha256sum",
|
|
1197
1213
|
resource: [...HF_RESOURCES],
|
|
1198
|
-
spec:
|
|
1214
|
+
spec: specOf36("sha256sum"),
|
|
1199
1215
|
fn: (accessor, paths, _texts, opts) => sha256sumGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1200
1216
|
});
|
|
1201
1217
|
|
|
1202
1218
|
// src/commands/builtin/hf/shuf.ts
|
|
1203
|
-
import { command as
|
|
1204
|
-
var HF_SHUF =
|
|
1219
|
+
import { command as command37, specOf as specOf37, shufGeneric } from "@struktoai/mirage-core";
|
|
1220
|
+
var HF_SHUF = command37({
|
|
1205
1221
|
name: "shuf",
|
|
1206
1222
|
resource: [...HF_RESOURCES],
|
|
1207
|
-
spec:
|
|
1223
|
+
spec: specOf37("shuf"),
|
|
1208
1224
|
fn: (accessor, paths, texts, opts) => shufGeneric(paths, texts, opts, (p) => stream(accessor, p))
|
|
1209
1225
|
});
|
|
1210
1226
|
|
|
1211
1227
|
// src/commands/builtin/hf/sort.ts
|
|
1212
|
-
import { command as
|
|
1213
|
-
var HF_SORT =
|
|
1228
|
+
import { command as command38, specOf as specOf38, sortGeneric } from "@struktoai/mirage-core";
|
|
1229
|
+
var HF_SORT = command38({
|
|
1214
1230
|
name: "sort",
|
|
1215
1231
|
resource: [...HF_RESOURCES],
|
|
1216
|
-
spec:
|
|
1232
|
+
spec: specOf38("sort"),
|
|
1217
1233
|
fn: (accessor, paths, _texts, opts) => sortGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1218
1234
|
});
|
|
1219
1235
|
|
|
1220
1236
|
// src/commands/builtin/hf/split.ts
|
|
1221
|
-
import { command as
|
|
1222
|
-
var HF_SPLIT =
|
|
1237
|
+
import { command as command39, specOf as specOf39, splitGeneric } from "@struktoai/mirage-core";
|
|
1238
|
+
var HF_SPLIT = command39({
|
|
1223
1239
|
name: "split",
|
|
1224
1240
|
resource: [...HF_RESOURCES],
|
|
1225
|
-
spec:
|
|
1241
|
+
spec: specOf39("split"),
|
|
1226
1242
|
fn: (accessor, paths, _texts, opts) => splitGeneric(
|
|
1227
1243
|
paths,
|
|
1228
1244
|
opts,
|
|
@@ -1234,57 +1250,57 @@ var HF_SPLIT = command40({
|
|
|
1234
1250
|
|
|
1235
1251
|
// src/commands/builtin/hf/stat/stat.ts
|
|
1236
1252
|
import {
|
|
1237
|
-
command as
|
|
1238
|
-
specOf as
|
|
1253
|
+
command as command40,
|
|
1254
|
+
specOf as specOf40,
|
|
1239
1255
|
statGeneric
|
|
1240
1256
|
} from "@struktoai/mirage-core";
|
|
1241
1257
|
async function statCommand(accessor, paths, _texts, opts) {
|
|
1242
1258
|
const resolved = paths.length > 0 ? await resolveGlob(accessor, paths, opts.index ?? void 0) : [];
|
|
1243
1259
|
return statGeneric(resolved, opts, (p) => stat(accessor, p, opts.index ?? void 0));
|
|
1244
1260
|
}
|
|
1245
|
-
var HF_STAT =
|
|
1261
|
+
var HF_STAT = command40({
|
|
1246
1262
|
name: "stat",
|
|
1247
1263
|
resource: [...HF_RESOURCES],
|
|
1248
|
-
spec:
|
|
1264
|
+
spec: specOf40("stat"),
|
|
1249
1265
|
fn: statCommand,
|
|
1250
1266
|
provision: metadataProvision
|
|
1251
1267
|
});
|
|
1252
1268
|
|
|
1253
1269
|
// src/commands/builtin/hf/strings.ts
|
|
1254
|
-
import { command as
|
|
1255
|
-
var HF_STRINGS =
|
|
1270
|
+
import { command as command41, specOf as specOf41, stringsGeneric } from "@struktoai/mirage-core";
|
|
1271
|
+
var HF_STRINGS = command41({
|
|
1256
1272
|
name: "strings",
|
|
1257
1273
|
resource: [...HF_RESOURCES],
|
|
1258
|
-
spec:
|
|
1274
|
+
spec: specOf41("strings"),
|
|
1259
1275
|
fn: (accessor, paths, _texts, opts) => stringsGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1260
1276
|
});
|
|
1261
1277
|
|
|
1262
1278
|
// src/commands/builtin/hf/tac.ts
|
|
1263
|
-
import { command as
|
|
1264
|
-
var HF_TAC =
|
|
1279
|
+
import { command as command42, specOf as specOf42, tacGeneric } from "@struktoai/mirage-core";
|
|
1280
|
+
var HF_TAC = command42({
|
|
1265
1281
|
name: "tac",
|
|
1266
1282
|
resource: [...HF_RESOURCES],
|
|
1267
|
-
spec:
|
|
1283
|
+
spec: specOf42("tac"),
|
|
1268
1284
|
fn: (accessor, paths, _texts, opts) => tacGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1269
1285
|
});
|
|
1270
1286
|
|
|
1271
1287
|
// src/commands/builtin/hf/tail/tail.ts
|
|
1272
|
-
import { command as
|
|
1273
|
-
var HF_TAIL =
|
|
1288
|
+
import { command as command43, headerAggregate as headerAggregate2, specOf as specOf43, tailGeneric } from "@struktoai/mirage-core";
|
|
1289
|
+
var HF_TAIL = command43({
|
|
1274
1290
|
name: "tail",
|
|
1275
1291
|
resource: [...HF_RESOURCES],
|
|
1276
|
-
spec:
|
|
1292
|
+
spec: specOf43("tail"),
|
|
1277
1293
|
provision: headTailProvision,
|
|
1278
1294
|
fn: (accessor, paths, texts, opts) => tailGeneric(paths, texts, opts, (p) => stream(accessor, p)),
|
|
1279
1295
|
aggregate: headerAggregate2
|
|
1280
1296
|
});
|
|
1281
1297
|
|
|
1282
1298
|
// src/commands/builtin/hf/tar.ts
|
|
1283
|
-
import { command as
|
|
1284
|
-
var HF_TAR =
|
|
1299
|
+
import { command as command44, specOf as specOf44, tarGeneric } from "@struktoai/mirage-core";
|
|
1300
|
+
var HF_TAR = command44({
|
|
1285
1301
|
name: "tar",
|
|
1286
1302
|
resource: [...HF_RESOURCES],
|
|
1287
|
-
spec:
|
|
1303
|
+
spec: specOf44("tar"),
|
|
1288
1304
|
fn: (accessor, paths, _texts, opts) => tarGeneric(
|
|
1289
1305
|
paths,
|
|
1290
1306
|
opts,
|
|
@@ -1298,8 +1314,8 @@ var HF_TAR = command45({
|
|
|
1298
1314
|
// src/commands/builtin/hf/touch.ts
|
|
1299
1315
|
import {
|
|
1300
1316
|
IOResult as IOResult2,
|
|
1301
|
-
command as
|
|
1302
|
-
specOf as
|
|
1317
|
+
command as command45,
|
|
1318
|
+
specOf as specOf45
|
|
1303
1319
|
} from "@struktoai/mirage-core";
|
|
1304
1320
|
|
|
1305
1321
|
// src/core/hf/exists.ts
|
|
@@ -1328,27 +1344,27 @@ async function touchCommand(accessor, paths, texts, opts) {
|
|
|
1328
1344
|
}
|
|
1329
1345
|
return [null, new IOResult2()];
|
|
1330
1346
|
}
|
|
1331
|
-
var HF_TOUCH =
|
|
1347
|
+
var HF_TOUCH = command45({
|
|
1332
1348
|
name: "touch",
|
|
1333
1349
|
resource: [...HF_RESOURCES],
|
|
1334
|
-
spec:
|
|
1350
|
+
spec: specOf45("touch"),
|
|
1335
1351
|
fn: touchCommand,
|
|
1336
1352
|
write: true
|
|
1337
1353
|
});
|
|
1338
1354
|
|
|
1339
1355
|
// src/commands/builtin/hf/tr.ts
|
|
1340
|
-
import { command as
|
|
1341
|
-
var HF_TR =
|
|
1356
|
+
import { command as command46, specOf as specOf46, trGeneric } from "@struktoai/mirage-core";
|
|
1357
|
+
var HF_TR = command46({
|
|
1342
1358
|
name: "tr",
|
|
1343
1359
|
resource: [...HF_RESOURCES],
|
|
1344
|
-
spec:
|
|
1360
|
+
spec: specOf46("tr"),
|
|
1345
1361
|
fn: (accessor, paths, texts, opts) => trGeneric(paths, texts, opts, (p) => stream(accessor, p))
|
|
1346
1362
|
});
|
|
1347
1363
|
|
|
1348
1364
|
// src/commands/builtin/hf/tree.ts
|
|
1349
1365
|
import {
|
|
1350
|
-
command as
|
|
1351
|
-
specOf as
|
|
1366
|
+
command as command47,
|
|
1367
|
+
specOf as specOf47,
|
|
1352
1368
|
treeGeneric
|
|
1353
1369
|
} from "@struktoai/mirage-core";
|
|
1354
1370
|
async function treeCommand(accessor, paths, _texts, opts) {
|
|
@@ -1360,46 +1376,46 @@ async function treeCommand(accessor, paths, _texts, opts) {
|
|
|
1360
1376
|
(p) => stat(accessor, p, opts.index ?? void 0)
|
|
1361
1377
|
);
|
|
1362
1378
|
}
|
|
1363
|
-
var HF_TREE =
|
|
1379
|
+
var HF_TREE = command47({
|
|
1364
1380
|
name: "tree",
|
|
1365
1381
|
resource: [...HF_RESOURCES],
|
|
1366
|
-
spec:
|
|
1382
|
+
spec: specOf47("tree"),
|
|
1367
1383
|
fn: treeCommand
|
|
1368
1384
|
});
|
|
1369
1385
|
|
|
1370
1386
|
// src/commands/builtin/hf/tsort.ts
|
|
1371
|
-
import { command as
|
|
1372
|
-
var HF_TSORT =
|
|
1387
|
+
import { command as command48, specOf as specOf48, tsortGeneric } from "@struktoai/mirage-core";
|
|
1388
|
+
var HF_TSORT = command48({
|
|
1373
1389
|
name: "tsort",
|
|
1374
1390
|
resource: [...HF_RESOURCES],
|
|
1375
|
-
spec:
|
|
1391
|
+
spec: specOf48("tsort"),
|
|
1376
1392
|
fn: (accessor, paths, _texts, opts) => tsortGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1377
1393
|
});
|
|
1378
1394
|
|
|
1379
1395
|
// src/commands/builtin/hf/unexpand.ts
|
|
1380
|
-
import { command as
|
|
1381
|
-
var HF_UNEXPAND =
|
|
1396
|
+
import { command as command49, specOf as specOf49, unexpandGeneric } from "@struktoai/mirage-core";
|
|
1397
|
+
var HF_UNEXPAND = command49({
|
|
1382
1398
|
name: "unexpand",
|
|
1383
1399
|
resource: [...HF_RESOURCES],
|
|
1384
|
-
spec:
|
|
1400
|
+
spec: specOf49("unexpand"),
|
|
1385
1401
|
fn: (accessor, paths, _texts, opts) => unexpandGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1386
1402
|
});
|
|
1387
1403
|
|
|
1388
1404
|
// src/commands/builtin/hf/uniq.ts
|
|
1389
|
-
import { command as
|
|
1390
|
-
var HF_UNIQ =
|
|
1405
|
+
import { command as command50, specOf as specOf50, uniqGeneric } from "@struktoai/mirage-core";
|
|
1406
|
+
var HF_UNIQ = command50({
|
|
1391
1407
|
name: "uniq",
|
|
1392
1408
|
resource: [...HF_RESOURCES],
|
|
1393
|
-
spec:
|
|
1409
|
+
spec: specOf50("uniq"),
|
|
1394
1410
|
fn: (accessor, paths, _texts, opts) => uniqGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1395
1411
|
});
|
|
1396
1412
|
|
|
1397
1413
|
// src/commands/builtin/hf/unzip.ts
|
|
1398
|
-
import { command as
|
|
1399
|
-
var HF_UNZIP =
|
|
1414
|
+
import { command as command51, specOf as specOf51, unzipGeneric } from "@struktoai/mirage-core";
|
|
1415
|
+
var HF_UNZIP = command51({
|
|
1400
1416
|
name: "unzip",
|
|
1401
1417
|
resource: [...HF_RESOURCES],
|
|
1402
|
-
spec:
|
|
1418
|
+
spec: specOf51("unzip"),
|
|
1403
1419
|
fn: (accessor, paths, _texts, opts) => unzipGeneric(
|
|
1404
1420
|
paths,
|
|
1405
1421
|
opts,
|
|
@@ -1411,49 +1427,49 @@ var HF_UNZIP = command52({
|
|
|
1411
1427
|
});
|
|
1412
1428
|
|
|
1413
1429
|
// src/commands/builtin/hf/wc/wc.ts
|
|
1414
|
-
import { command as
|
|
1415
|
-
var HF_WC =
|
|
1430
|
+
import { command as command52, specOf as specOf52, wcAggregate, wcGeneric } from "@struktoai/mirage-core";
|
|
1431
|
+
var HF_WC = command52({
|
|
1416
1432
|
name: "wc",
|
|
1417
1433
|
resource: [...HF_RESOURCES],
|
|
1418
|
-
spec:
|
|
1434
|
+
spec: specOf52("wc"),
|
|
1419
1435
|
fn: (accessor, paths, texts, opts) => wcGeneric(paths, texts, opts, (p) => stream(accessor, p)),
|
|
1420
1436
|
provision: fileReadProvision,
|
|
1421
1437
|
aggregate: wcAggregate
|
|
1422
1438
|
});
|
|
1423
1439
|
|
|
1424
1440
|
// src/commands/builtin/hf/xxd.ts
|
|
1425
|
-
import { command as
|
|
1426
|
-
var HF_XXD =
|
|
1441
|
+
import { command as command53, specOf as specOf53, xxdGeneric } from "@struktoai/mirage-core";
|
|
1442
|
+
var HF_XXD = command53({
|
|
1427
1443
|
name: "xxd",
|
|
1428
1444
|
resource: [...HF_RESOURCES],
|
|
1429
|
-
spec:
|
|
1445
|
+
spec: specOf53("xxd"),
|
|
1430
1446
|
fn: (accessor, paths, _texts, opts) => xxdGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1431
1447
|
});
|
|
1432
1448
|
|
|
1433
1449
|
// src/commands/builtin/hf/zcat.ts
|
|
1434
|
-
import { command as
|
|
1435
|
-
var HF_ZCAT =
|
|
1450
|
+
import { command as command54, specOf as specOf54, zcatGeneric } from "@struktoai/mirage-core";
|
|
1451
|
+
var HF_ZCAT = command54({
|
|
1436
1452
|
name: "zcat",
|
|
1437
1453
|
resource: [...HF_RESOURCES],
|
|
1438
|
-
spec:
|
|
1454
|
+
spec: specOf54("zcat"),
|
|
1439
1455
|
fn: (accessor, paths, _texts, opts) => zcatGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1440
1456
|
});
|
|
1441
1457
|
|
|
1442
1458
|
// src/commands/builtin/hf/zgrep.ts
|
|
1443
|
-
import { command as
|
|
1444
|
-
var HF_ZGREP =
|
|
1459
|
+
import { command as command55, specOf as specOf55, zgrepGeneric } from "@struktoai/mirage-core";
|
|
1460
|
+
var HF_ZGREP = command55({
|
|
1445
1461
|
name: "zgrep",
|
|
1446
1462
|
resource: [...HF_RESOURCES],
|
|
1447
|
-
spec:
|
|
1463
|
+
spec: specOf55("zgrep"),
|
|
1448
1464
|
fn: (accessor, paths, texts, opts) => zgrepGeneric(paths, texts, opts, (p) => stream(accessor, p))
|
|
1449
1465
|
});
|
|
1450
1466
|
|
|
1451
1467
|
// src/commands/builtin/hf/zip_cmd.ts
|
|
1452
|
-
import { command as
|
|
1453
|
-
var HF_ZIP =
|
|
1468
|
+
import { command as command56, specOf as specOf56, zipGeneric } from "@struktoai/mirage-core";
|
|
1469
|
+
var HF_ZIP = command56({
|
|
1454
1470
|
name: "zip",
|
|
1455
1471
|
resource: [...HF_RESOURCES],
|
|
1456
|
-
spec:
|
|
1472
|
+
spec: specOf56("zip"),
|
|
1457
1473
|
fn: (accessor, paths, _texts, opts) => zipGeneric(
|
|
1458
1474
|
paths,
|
|
1459
1475
|
opts,
|
|
@@ -1667,7 +1683,7 @@ import {
|
|
|
1667
1683
|
PathSpec as PathSpec2
|
|
1668
1684
|
} from "@struktoai/mirage-core";
|
|
1669
1685
|
var HfResource = class extends BaseResource {
|
|
1670
|
-
|
|
1686
|
+
cachesReads = true;
|
|
1671
1687
|
supportsSnapshot = true;
|
|
1672
1688
|
opsMap = {
|
|
1673
1689
|
read_bytes: read,
|
|
@@ -1763,4 +1779,4 @@ export {
|
|
|
1763
1779
|
HF_OPS,
|
|
1764
1780
|
HfResource
|
|
1765
1781
|
};
|
|
1766
|
-
//# sourceMappingURL=chunk-
|
|
1782
|
+
//# sourceMappingURL=chunk-TURD42QO.js.map
|