@struktoai/mirage-browser 0.0.2 → 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-GMNRT7BJ.js +8 -0
- package/dist/backblaze-O6CLR73B.js +8 -0
- package/dist/{box-VJSE5N7P.js → box-GXWDWZRN.js} +2 -2
- package/dist/ceph-SM7MXDAY.js +8 -0
- package/dist/{chunk-SBAUYZJB.js → chunk-2AEAISO2.js} +2 -2
- package/dist/chunk-2AEAISO2.js.map +1 -0
- package/dist/{chunk-6K57U6CM.js → chunk-4NLXLDMV.js} +2 -2
- package/dist/chunk-4NLXLDMV.js.map +1 -0
- package/dist/{chunk-D3JDGGKO.js → chunk-57QQAM7V.js} +2 -2
- package/dist/{chunk-YEDSFMWK.js → chunk-6YP3B7UK.js} +2 -2
- package/dist/{chunk-EH2BN4JC.js → chunk-BIIG7ZAQ.js} +2 -2
- package/dist/chunk-BIIG7ZAQ.js.map +1 -0
- package/dist/{chunk-INLL7LRM.js → chunk-BJHHL4UT.js} +2 -2
- package/dist/chunk-BJHHL4UT.js.map +1 -0
- package/dist/{chunk-JVTKE6DB.js → chunk-CGZGX2GO.js} +2 -2
- package/dist/chunk-CGZGX2GO.js.map +1 -0
- package/dist/{chunk-MO5DGX42.js → chunk-CNDGXKMU.js} +2 -2
- package/dist/{chunk-HGSTRD7H.js → chunk-DA5EW34P.js} +2 -2
- package/dist/chunk-DA5EW34P.js.map +1 -0
- package/dist/{chunk-RD7ED27I.js → chunk-DFHFILVF.js} +2 -2
- package/dist/chunk-DFHFILVF.js.map +1 -0
- package/dist/{chunk-CAKSQ2LV.js → chunk-DHZMC42C.js} +2 -2
- package/dist/{chunk-72GY5B23.js → chunk-DVXOMWD4.js} +2 -2
- package/dist/{chunk-WZ53HLH6.js → chunk-F5QWZ7GM.js} +2 -2
- package/dist/{chunk-CO4FMKOF.js → chunk-G26SGOFR.js} +2 -2
- package/dist/{chunk-D6HF462C.js → chunk-HXQ7HDA6.js} +2 -2
- package/dist/chunk-HXQ7HDA6.js.map +1 -0
- package/dist/{chunk-RJ5FBBL6.js → chunk-J7PLA5S3.js} +2 -2
- package/dist/{chunk-32VC36P4.js → chunk-K2S42IR4.js} +2 -2
- package/dist/{chunk-JCS5EG5A.js → chunk-KNJKYCTA.js} +2 -2
- package/dist/chunk-KNJKYCTA.js.map +1 -0
- package/dist/{chunk-T43CZ3IZ.js → chunk-KTE5PB2D.js} +2 -2
- package/dist/chunk-KTE5PB2D.js.map +1 -0
- package/dist/{chunk-SJB2KXDM.js → chunk-KV2DM5H6.js} +136 -129
- package/dist/chunk-KV2DM5H6.js.map +1 -0
- package/dist/{chunk-EUKHGXCE.js → chunk-LSURHXZH.js} +2 -2
- package/dist/{chunk-GHKX2BA3.js → chunk-NLBT6TBM.js} +2 -2
- package/dist/{chunk-RJ4RR3BR.js → chunk-NWZNQ3RC.js} +2 -2
- package/dist/{chunk-TPFH5V4D.js → chunk-OSMEXGRN.js} +2 -2
- package/dist/chunk-OSMEXGRN.js.map +1 -0
- package/dist/{chunk-N43C6XFP.js → chunk-PV53AX35.js} +2 -2
- package/dist/chunk-PV53AX35.js.map +1 -0
- package/dist/{chunk-63GZEZW4.js → chunk-QLLRQNOJ.js} +2 -2
- package/dist/{chunk-WEJGUCCL.js → chunk-ROHDW6KT.js} +2 -2
- package/dist/{chunk-XFREXNA2.js → chunk-RQ273N5K.js} +2 -2
- package/dist/chunk-RQ273N5K.js.map +1 -0
- package/dist/{chunk-UZWJ462U.js → chunk-SOF74I3T.js} +2 -2
- package/dist/chunk-SOF74I3T.js.map +1 -0
- package/dist/{chunk-BUXWUKN7.js → chunk-TQ6VRUEI.js} +2 -2
- package/dist/chunk-TQ6VRUEI.js.map +1 -0
- package/dist/{chunk-ATLYBQSC.js → chunk-X2CCEHOR.js} +2 -2
- package/dist/chunk-X2CCEHOR.js.map +1 -0
- package/dist/{chunk-RZRXEXHM.js → chunk-XBOJZZRT.js} +2 -2
- package/dist/chunk-XBOJZZRT.js.map +1 -0
- package/dist/{chunk-4YJMDF2S.js → chunk-XYKNXGPR.js} +2 -2
- package/dist/chunk-XYKNXGPR.js.map +1 -0
- package/dist/digitalocean-XFH2V2A3.js +8 -0
- package/dist/discord-OQMSHM3L.js +7 -0
- package/dist/{dropbox-GI273OVA.js → dropbox-IAOKM7G5.js} +2 -2
- package/dist/gcs-JYZB6CVP.js +8 -0
- package/dist/{gdocs-EI2EFVKG.js → gdocs-PHKQGLZL.js} +2 -2
- package/dist/{gdrive-62HD67IP.js → gdrive-4JQLGOOP.js} +2 -2
- package/dist/github-DU7Z4RSU.js +7 -0
- package/dist/{github_ci-7P7VGBKM.js → github_ci-XSAJDNXC.js} +2 -2
- package/dist/{gmail-B7HXHZ7D.js → gmail-DEQP2M7T.js} +2 -2
- package/dist/{gsheets-OTBW2JWG.js → gsheets-KCIHSMOK.js} +2 -2
- package/dist/{gslides-MXSR4HRY.js → gslides-2KBUKKM5.js} +2 -2
- package/dist/index.d.ts +18 -18
- package/dist/index.js +71 -67
- package/dist/index.js.map +1 -1
- package/dist/langfuse-FNCMKFSL.js +7 -0
- package/dist/linear-XTFO4WKD.js +7 -0
- package/dist/minio-NGPBAJY3.js +8 -0
- package/dist/mongodb-PGOX6QSY.js +7 -0
- package/dist/notion-HYYNQ7KI.js +7 -0
- package/dist/oci-EGDBSMLM.js +8 -0
- package/dist/opfs-5WGXB5OG.js +7 -0
- package/dist/postgres-5HYED4AC.js +7 -0
- package/dist/qingstor-2T4Y6MEG.js +8 -0
- package/dist/r2-3B45S2KV.js +8 -0
- package/dist/{s3-GD2WKLWR.js → s3-GI7SDKGR.js} +2 -2
- package/dist/scaleway-ICCXVAY6.js +8 -0
- package/dist/seaweedfs-MF77EC33.js +8 -0
- package/dist/slack-6LGQERIU.js +7 -0
- package/dist/supabase-XTOVMHXU.js +8 -0
- package/dist/tencent-FXFKSOTN.js +8 -0
- package/dist/trello-DZK4NEVY.js +7 -0
- package/dist/wasabi-KVE2B6RB.js +8 -0
- package/package.json +2 -2
- package/dist/aliyun-F2ORS3KZ.js +0 -8
- package/dist/backblaze-HOVWPSV7.js +0 -8
- package/dist/ceph-CQKQ4NWW.js +0 -8
- package/dist/chunk-4YJMDF2S.js.map +0 -1
- package/dist/chunk-6K57U6CM.js.map +0 -1
- package/dist/chunk-ATLYBQSC.js.map +0 -1
- package/dist/chunk-BUXWUKN7.js.map +0 -1
- package/dist/chunk-D6HF462C.js.map +0 -1
- package/dist/chunk-EH2BN4JC.js.map +0 -1
- package/dist/chunk-HGSTRD7H.js.map +0 -1
- package/dist/chunk-INLL7LRM.js.map +0 -1
- package/dist/chunk-JCS5EG5A.js.map +0 -1
- package/dist/chunk-JVTKE6DB.js.map +0 -1
- package/dist/chunk-N43C6XFP.js.map +0 -1
- package/dist/chunk-RD7ED27I.js.map +0 -1
- package/dist/chunk-RZRXEXHM.js.map +0 -1
- package/dist/chunk-SBAUYZJB.js.map +0 -1
- package/dist/chunk-SJB2KXDM.js.map +0 -1
- package/dist/chunk-T43CZ3IZ.js.map +0 -1
- package/dist/chunk-TPFH5V4D.js.map +0 -1
- package/dist/chunk-UZWJ462U.js.map +0 -1
- package/dist/chunk-XFREXNA2.js.map +0 -1
- package/dist/digitalocean-KC7VIWZK.js +0 -8
- package/dist/discord-W3DSEXKN.js +0 -7
- package/dist/gcs-WRQTU27E.js +0 -8
- package/dist/github-SWLYD3LS.js +0 -7
- package/dist/langfuse-FWKU6E3F.js +0 -7
- package/dist/linear-SHVG3XVT.js +0 -7
- package/dist/minio-246KOHBJ.js +0 -8
- package/dist/mongodb-2ITJUDCF.js +0 -7
- package/dist/notion-BOBBSJSG.js +0 -7
- package/dist/oci-T7VREPQW.js +0 -8
- package/dist/opfs-3XNAXR5B.js +0 -7
- package/dist/postgres-CK4HWZSL.js +0 -7
- package/dist/qingstor-WIC27LS3.js +0 -8
- package/dist/r2-EAX6KHEI.js +0 -8
- package/dist/scaleway-OVFRZBKW.js +0 -8
- package/dist/seaweedfs-EOJVO432.js +0 -8
- package/dist/slack-RNXMU5OC.js +0 -7
- package/dist/supabase-VSUNLIJ6.js +0 -8
- package/dist/tencent-YYM5WUVU.js +0 -8
- package/dist/trello-MNR3VPTT.js +0 -7
- package/dist/wasabi-K5ANTZ2C.js +0 -8
- /package/dist/{aliyun-F2ORS3KZ.js.map → aliyun-GMNRT7BJ.js.map} +0 -0
- /package/dist/{backblaze-HOVWPSV7.js.map → backblaze-O6CLR73B.js.map} +0 -0
- /package/dist/{box-VJSE5N7P.js.map → box-GXWDWZRN.js.map} +0 -0
- /package/dist/{ceph-CQKQ4NWW.js.map → ceph-SM7MXDAY.js.map} +0 -0
- /package/dist/{chunk-D3JDGGKO.js.map → chunk-57QQAM7V.js.map} +0 -0
- /package/dist/{chunk-YEDSFMWK.js.map → chunk-6YP3B7UK.js.map} +0 -0
- /package/dist/{chunk-MO5DGX42.js.map → chunk-CNDGXKMU.js.map} +0 -0
- /package/dist/{chunk-CAKSQ2LV.js.map → chunk-DHZMC42C.js.map} +0 -0
- /package/dist/{chunk-72GY5B23.js.map → chunk-DVXOMWD4.js.map} +0 -0
- /package/dist/{chunk-WZ53HLH6.js.map → chunk-F5QWZ7GM.js.map} +0 -0
- /package/dist/{chunk-CO4FMKOF.js.map → chunk-G26SGOFR.js.map} +0 -0
- /package/dist/{chunk-RJ5FBBL6.js.map → chunk-J7PLA5S3.js.map} +0 -0
- /package/dist/{chunk-32VC36P4.js.map → chunk-K2S42IR4.js.map} +0 -0
- /package/dist/{chunk-EUKHGXCE.js.map → chunk-LSURHXZH.js.map} +0 -0
- /package/dist/{chunk-GHKX2BA3.js.map → chunk-NLBT6TBM.js.map} +0 -0
- /package/dist/{chunk-RJ4RR3BR.js.map → chunk-NWZNQ3RC.js.map} +0 -0
- /package/dist/{chunk-63GZEZW4.js.map → chunk-QLLRQNOJ.js.map} +0 -0
- /package/dist/{chunk-WEJGUCCL.js.map → chunk-ROHDW6KT.js.map} +0 -0
- /package/dist/{digitalocean-KC7VIWZK.js.map → digitalocean-XFH2V2A3.js.map} +0 -0
- /package/dist/{discord-W3DSEXKN.js.map → discord-OQMSHM3L.js.map} +0 -0
- /package/dist/{dropbox-GI273OVA.js.map → dropbox-IAOKM7G5.js.map} +0 -0
- /package/dist/{gcs-WRQTU27E.js.map → gcs-JYZB6CVP.js.map} +0 -0
- /package/dist/{gdocs-EI2EFVKG.js.map → gdocs-PHKQGLZL.js.map} +0 -0
- /package/dist/{gdrive-62HD67IP.js.map → gdrive-4JQLGOOP.js.map} +0 -0
- /package/dist/{github-SWLYD3LS.js.map → github-DU7Z4RSU.js.map} +0 -0
- /package/dist/{github_ci-7P7VGBKM.js.map → github_ci-XSAJDNXC.js.map} +0 -0
- /package/dist/{gmail-B7HXHZ7D.js.map → gmail-DEQP2M7T.js.map} +0 -0
- /package/dist/{gsheets-OTBW2JWG.js.map → gsheets-KCIHSMOK.js.map} +0 -0
- /package/dist/{gslides-MXSR4HRY.js.map → gslides-2KBUKKM5.js.map} +0 -0
- /package/dist/{langfuse-FWKU6E3F.js.map → langfuse-FNCMKFSL.js.map} +0 -0
- /package/dist/{linear-SHVG3XVT.js.map → linear-XTFO4WKD.js.map} +0 -0
- /package/dist/{minio-246KOHBJ.js.map → minio-NGPBAJY3.js.map} +0 -0
- /package/dist/{mongodb-2ITJUDCF.js.map → mongodb-PGOX6QSY.js.map} +0 -0
- /package/dist/{notion-BOBBSJSG.js.map → notion-HYYNQ7KI.js.map} +0 -0
- /package/dist/{oci-T7VREPQW.js.map → oci-EGDBSMLM.js.map} +0 -0
- /package/dist/{opfs-3XNAXR5B.js.map → opfs-5WGXB5OG.js.map} +0 -0
- /package/dist/{postgres-CK4HWZSL.js.map → postgres-5HYED4AC.js.map} +0 -0
- /package/dist/{qingstor-WIC27LS3.js.map → qingstor-2T4Y6MEG.js.map} +0 -0
- /package/dist/{r2-EAX6KHEI.js.map → r2-3B45S2KV.js.map} +0 -0
- /package/dist/{s3-GD2WKLWR.js.map → s3-GI7SDKGR.js.map} +0 -0
- /package/dist/{scaleway-OVFRZBKW.js.map → scaleway-ICCXVAY6.js.map} +0 -0
- /package/dist/{seaweedfs-EOJVO432.js.map → seaweedfs-MF77EC33.js.map} +0 -0
- /package/dist/{slack-RNXMU5OC.js.map → slack-6LGQERIU.js.map} +0 -0
- /package/dist/{supabase-VSUNLIJ6.js.map → supabase-XTOVMHXU.js.map} +0 -0
- /package/dist/{tencent-YYM5WUVU.js.map → tencent-FXFKSOTN.js.map} +0 -0
- /package/dist/{trello-MNR3VPTT.js.map → trello-DZK4NEVY.js.map} +0 -0
- /package/dist/{wasabi-K5ANTZ2C.js.map → wasabi-KVE2B6RB.js.map} +0 -0
|
@@ -151,18 +151,25 @@ async function stat(accessor, p) {
|
|
|
151
151
|
throw err;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
+
let dirHandle;
|
|
154
155
|
try {
|
|
155
|
-
await resolveDirHandle(root, virtual, { create: false });
|
|
156
|
-
return new FileStat({
|
|
157
|
-
name,
|
|
158
|
-
size: null,
|
|
159
|
-
modified: null,
|
|
160
|
-
type: FileType.DIRECTORY
|
|
161
|
-
});
|
|
156
|
+
dirHandle = await resolveDirHandle(root, virtual, { create: false });
|
|
162
157
|
} catch (err) {
|
|
163
158
|
if (isNotFound(err)) throw enoent2(p);
|
|
164
159
|
throw err;
|
|
165
160
|
}
|
|
161
|
+
let latest = 0;
|
|
162
|
+
for await (const [, handle] of iterEntries(dirHandle)) {
|
|
163
|
+
if (handle.kind !== "file") continue;
|
|
164
|
+
const file = await handle.getFile();
|
|
165
|
+
if (file.lastModified > latest) latest = file.lastModified;
|
|
166
|
+
}
|
|
167
|
+
return new FileStat({
|
|
168
|
+
name,
|
|
169
|
+
size: null,
|
|
170
|
+
modified: latest > 0 ? new Date(latest).toISOString() : null,
|
|
171
|
+
type: FileType.DIRECTORY
|
|
172
|
+
});
|
|
166
173
|
}
|
|
167
174
|
|
|
168
175
|
// src/commands/builtin/opfs/awk.ts
|
|
@@ -297,7 +304,12 @@ async function copy(accessor, src, dst) {
|
|
|
297
304
|
}
|
|
298
305
|
|
|
299
306
|
// src/core/opfs/find.ts
|
|
300
|
-
import {
|
|
307
|
+
import {
|
|
308
|
+
buildTree,
|
|
309
|
+
emitStartPath,
|
|
310
|
+
keep,
|
|
311
|
+
startBasename
|
|
312
|
+
} from "@struktoai/mirage-core";
|
|
301
313
|
async function walk(ctx, dir, current, depth) {
|
|
302
314
|
const opts = ctx.options;
|
|
303
315
|
if (opts.maxDepth !== null && opts.maxDepth !== void 0 && depth > opts.maxDepth) return;
|
|
@@ -371,6 +383,7 @@ async function walk(ctx, dir, current, depth) {
|
|
|
371
383
|
async function find(accessor, p, options = {}) {
|
|
372
384
|
const root = accessor.rootHandle;
|
|
373
385
|
const virtual = norm(p.stripPrefix);
|
|
386
|
+
const startName = startBasename(p.original);
|
|
374
387
|
const results = [];
|
|
375
388
|
const tree = options.tree ?? buildTree({
|
|
376
389
|
name: options.name,
|
|
@@ -388,7 +401,7 @@ async function find(accessor, p, options = {}) {
|
|
|
388
401
|
if (isNotFound(err)) return results;
|
|
389
402
|
throw err;
|
|
390
403
|
}
|
|
391
|
-
if (
|
|
404
|
+
if (options.maxDepth == null || options.maxDepth >= 0) {
|
|
392
405
|
let rootEmpty = null;
|
|
393
406
|
if (options.empty === true) {
|
|
394
407
|
rootEmpty = true;
|
|
@@ -398,19 +411,14 @@ async function find(accessor, p, options = {}) {
|
|
|
398
411
|
break;
|
|
399
412
|
}
|
|
400
413
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
kind: "d",
|
|
406
|
-
depth: 0,
|
|
407
|
-
isEmpty: rootEmpty
|
|
408
|
-
},
|
|
414
|
+
emitStartPath(results, virtual, startName, {
|
|
415
|
+
kind: "d",
|
|
416
|
+
isEmpty: rootEmpty,
|
|
417
|
+
exists: true,
|
|
409
418
|
tree,
|
|
410
|
-
options.
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
419
|
+
maxDepth: options.maxDepth,
|
|
420
|
+
minDepth: options.minDepth
|
|
421
|
+
});
|
|
414
422
|
}
|
|
415
423
|
await walk({ options, tree, results }, dir, virtual, 0);
|
|
416
424
|
results.sort();
|
|
@@ -487,11 +495,44 @@ var OPFS_CUT = command10({
|
|
|
487
495
|
|
|
488
496
|
// src/commands/builtin/opfs/diff.ts
|
|
489
497
|
import { ResourceName as ResourceName14, command as command11, diffGeneric, specOf as specOf11 } from "@struktoai/mirage-core";
|
|
498
|
+
|
|
499
|
+
// src/core/opfs/readdir.ts
|
|
500
|
+
import { enotdir } from "@struktoai/mirage-core";
|
|
501
|
+
async function readdir(accessor, path) {
|
|
502
|
+
const root = accessor.rootHandle;
|
|
503
|
+
const virtual = path.pattern !== null ? path.directory : path.stripPrefix;
|
|
504
|
+
let dir;
|
|
505
|
+
try {
|
|
506
|
+
dir = await resolveDirHandle(root, virtual, { create: false });
|
|
507
|
+
} catch (err) {
|
|
508
|
+
if (isNotFound(err)) throw enotdir(path);
|
|
509
|
+
if (err instanceof DOMException && err.name === "TypeMismatchError") {
|
|
510
|
+
throw enotdir(path);
|
|
511
|
+
}
|
|
512
|
+
throw err;
|
|
513
|
+
}
|
|
514
|
+
const names = [];
|
|
515
|
+
for await (const [name] of iterEntries(dir)) {
|
|
516
|
+
names.push(name);
|
|
517
|
+
}
|
|
518
|
+
const base = norm(virtual);
|
|
519
|
+
const dirPrefix = base === "/" ? "/" : `${base}/`;
|
|
520
|
+
const mountPrefix = path.prefix;
|
|
521
|
+
return names.map((n) => `${mountPrefix}${dirPrefix}${n}`).sort();
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// src/commands/builtin/opfs/diff.ts
|
|
490
525
|
var OPFS_DIFF = command11({
|
|
491
526
|
name: "diff",
|
|
492
527
|
resource: ResourceName14.OPFS,
|
|
493
528
|
spec: specOf11("diff"),
|
|
494
|
-
fn: (accessor, paths, _texts, opts) => diffGeneric(
|
|
529
|
+
fn: (accessor, paths, _texts, opts) => diffGeneric(
|
|
530
|
+
paths,
|
|
531
|
+
opts,
|
|
532
|
+
(p) => stream(accessor, p),
|
|
533
|
+
(p) => readdir(accessor, p),
|
|
534
|
+
(p) => stat(accessor, p)
|
|
535
|
+
)
|
|
495
536
|
});
|
|
496
537
|
|
|
497
538
|
// src/commands/builtin/opfs/dirname.ts
|
|
@@ -688,33 +729,6 @@ var OPFS_FOLD = command18({
|
|
|
688
729
|
|
|
689
730
|
// src/commands/builtin/opfs/grep/grep.ts
|
|
690
731
|
import { ResourceName as ResourceName22, command as command19, grepGeneric, prefixAggregate, specOf as specOf19 } from "@struktoai/mirage-core";
|
|
691
|
-
|
|
692
|
-
// src/core/opfs/readdir.ts
|
|
693
|
-
import { enotdir } from "@struktoai/mirage-core";
|
|
694
|
-
async function readdir(accessor, path) {
|
|
695
|
-
const root = accessor.rootHandle;
|
|
696
|
-
const virtual = path.pattern !== null ? path.directory : path.stripPrefix;
|
|
697
|
-
let dir;
|
|
698
|
-
try {
|
|
699
|
-
dir = await resolveDirHandle(root, virtual, { create: false });
|
|
700
|
-
} catch (err) {
|
|
701
|
-
if (isNotFound(err)) throw enotdir(path);
|
|
702
|
-
if (err instanceof DOMException && err.name === "TypeMismatchError") {
|
|
703
|
-
throw enotdir(path);
|
|
704
|
-
}
|
|
705
|
-
throw err;
|
|
706
|
-
}
|
|
707
|
-
const names = [];
|
|
708
|
-
for await (const [name] of iterEntries(dir)) {
|
|
709
|
-
names.push(name);
|
|
710
|
-
}
|
|
711
|
-
const base = norm(virtual);
|
|
712
|
-
const dirPrefix = base === "/" ? "/" : `${base}/`;
|
|
713
|
-
const mountPrefix = path.prefix;
|
|
714
|
-
return names.map((n) => `${mountPrefix}${dirPrefix}${n}`).sort();
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
// src/commands/builtin/opfs/grep/grep.ts
|
|
718
732
|
var OPFS_GREP = command19({
|
|
719
733
|
name: "grep",
|
|
720
734
|
resource: ResourceName22.OPFS,
|
|
@@ -1315,53 +1329,46 @@ var OPFS_RM = command40({
|
|
|
1315
1329
|
});
|
|
1316
1330
|
|
|
1317
1331
|
// src/commands/builtin/opfs/sed.ts
|
|
1318
|
-
import { ResourceName as ResourceName44,
|
|
1319
|
-
var OPFS_SED =
|
|
1320
|
-
name: "sed",
|
|
1332
|
+
import { ResourceName as ResourceName44, makeSed } from "@struktoai/mirage-core";
|
|
1333
|
+
var OPFS_SED = makeSed({
|
|
1321
1334
|
resource: ResourceName44.OPFS,
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
paths,
|
|
1325
|
-
texts,
|
|
1326
|
-
opts,
|
|
1327
|
-
(p) => stream(accessor, p),
|
|
1328
|
-
(p, d) => writeBytes(accessor, p, d)
|
|
1329
|
-
)
|
|
1335
|
+
stream: (a, p) => stream(a, p),
|
|
1336
|
+
write: (a, p, d) => writeBytes(a, p, d)
|
|
1330
1337
|
});
|
|
1331
1338
|
|
|
1332
1339
|
// src/commands/builtin/opfs/sha256sum.ts
|
|
1333
|
-
import { ResourceName as ResourceName45, command as
|
|
1334
|
-
var OPFS_SHA256SUM =
|
|
1340
|
+
import { ResourceName as ResourceName45, command as command41, sha256sumGeneric, specOf as specOf41 } from "@struktoai/mirage-core";
|
|
1341
|
+
var OPFS_SHA256SUM = command41({
|
|
1335
1342
|
name: "sha256sum",
|
|
1336
1343
|
resource: ResourceName45.OPFS,
|
|
1337
|
-
spec:
|
|
1344
|
+
spec: specOf41("sha256sum"),
|
|
1338
1345
|
fn: (accessor, paths, _texts, opts) => sha256sumGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1339
1346
|
});
|
|
1340
1347
|
|
|
1341
1348
|
// src/commands/builtin/opfs/shuf.ts
|
|
1342
|
-
import { ResourceName as ResourceName46, command as
|
|
1343
|
-
var OPFS_SHUF =
|
|
1349
|
+
import { ResourceName as ResourceName46, command as command42, specOf as specOf42, shufGeneric } from "@struktoai/mirage-core";
|
|
1350
|
+
var OPFS_SHUF = command42({
|
|
1344
1351
|
name: "shuf",
|
|
1345
1352
|
resource: ResourceName46.OPFS,
|
|
1346
|
-
spec:
|
|
1353
|
+
spec: specOf42("shuf"),
|
|
1347
1354
|
fn: (accessor, paths, texts, opts) => shufGeneric(paths, texts, opts, (p) => stream(accessor, p))
|
|
1348
1355
|
});
|
|
1349
1356
|
|
|
1350
1357
|
// src/commands/builtin/opfs/sort.ts
|
|
1351
|
-
import { ResourceName as ResourceName47, command as
|
|
1352
|
-
var OPFS_SORT =
|
|
1358
|
+
import { ResourceName as ResourceName47, command as command43, specOf as specOf43, sortGeneric } from "@struktoai/mirage-core";
|
|
1359
|
+
var OPFS_SORT = command43({
|
|
1353
1360
|
name: "sort",
|
|
1354
1361
|
resource: ResourceName47.OPFS,
|
|
1355
|
-
spec:
|
|
1362
|
+
spec: specOf43("sort"),
|
|
1356
1363
|
fn: (accessor, paths, _texts, opts) => sortGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1357
1364
|
});
|
|
1358
1365
|
|
|
1359
1366
|
// src/commands/builtin/opfs/split.ts
|
|
1360
|
-
import { ResourceName as ResourceName48, command as
|
|
1361
|
-
var OPFS_SPLIT =
|
|
1367
|
+
import { ResourceName as ResourceName48, command as command44, specOf as specOf44, splitGeneric } from "@struktoai/mirage-core";
|
|
1368
|
+
var OPFS_SPLIT = command44({
|
|
1362
1369
|
name: "split",
|
|
1363
1370
|
resource: ResourceName48.OPFS,
|
|
1364
|
-
spec:
|
|
1371
|
+
spec: specOf44("split"),
|
|
1365
1372
|
fn: (accessor, paths, _texts, opts) => splitGeneric(
|
|
1366
1373
|
paths,
|
|
1367
1374
|
opts,
|
|
@@ -1374,53 +1381,53 @@ var OPFS_SPLIT = command45({
|
|
|
1374
1381
|
// src/commands/builtin/opfs/stat/stat.ts
|
|
1375
1382
|
import {
|
|
1376
1383
|
ResourceName as ResourceName49,
|
|
1377
|
-
command as
|
|
1378
|
-
specOf as
|
|
1384
|
+
command as command45,
|
|
1385
|
+
specOf as specOf45,
|
|
1379
1386
|
statGeneric,
|
|
1380
1387
|
statProvisionGeneric
|
|
1381
1388
|
} from "@struktoai/mirage-core";
|
|
1382
|
-
var OPFS_STAT =
|
|
1389
|
+
var OPFS_STAT = command45({
|
|
1383
1390
|
name: "stat",
|
|
1384
1391
|
resource: ResourceName49.OPFS,
|
|
1385
|
-
spec:
|
|
1392
|
+
spec: specOf45("stat"),
|
|
1386
1393
|
fn: (accessor, paths, _texts, opts) => statGeneric(paths, opts, (p) => stat(accessor, p)),
|
|
1387
1394
|
provision: statProvisionGeneric
|
|
1388
1395
|
});
|
|
1389
1396
|
|
|
1390
1397
|
// src/commands/builtin/opfs/strings.ts
|
|
1391
|
-
import { ResourceName as ResourceName50, command as
|
|
1392
|
-
var OPFS_STRINGS =
|
|
1398
|
+
import { ResourceName as ResourceName50, command as command46, specOf as specOf46, stringsGeneric } from "@struktoai/mirage-core";
|
|
1399
|
+
var OPFS_STRINGS = command46({
|
|
1393
1400
|
name: "strings",
|
|
1394
1401
|
resource: ResourceName50.OPFS,
|
|
1395
|
-
spec:
|
|
1402
|
+
spec: specOf46("strings"),
|
|
1396
1403
|
fn: (accessor, paths, _texts, opts) => stringsGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1397
1404
|
});
|
|
1398
1405
|
|
|
1399
1406
|
// src/commands/builtin/opfs/tac.ts
|
|
1400
|
-
import { ResourceName as ResourceName51, command as
|
|
1401
|
-
var OPFS_TAC =
|
|
1407
|
+
import { ResourceName as ResourceName51, command as command47, specOf as specOf47, tacGeneric } from "@struktoai/mirage-core";
|
|
1408
|
+
var OPFS_TAC = command47({
|
|
1402
1409
|
name: "tac",
|
|
1403
1410
|
resource: ResourceName51.OPFS,
|
|
1404
|
-
spec:
|
|
1411
|
+
spec: specOf47("tac"),
|
|
1405
1412
|
fn: (accessor, paths, _texts, opts) => tacGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1406
1413
|
});
|
|
1407
1414
|
|
|
1408
1415
|
// src/commands/builtin/opfs/tail/tail.ts
|
|
1409
|
-
import { ResourceName as ResourceName52, command as
|
|
1410
|
-
var OPFS_TAIL =
|
|
1416
|
+
import { ResourceName as ResourceName52, command as command48, headerAggregate as headerAggregate2, specOf as specOf48, tailGeneric } from "@struktoai/mirage-core";
|
|
1417
|
+
var OPFS_TAIL = command48({
|
|
1411
1418
|
name: "tail",
|
|
1412
1419
|
resource: ResourceName52.OPFS,
|
|
1413
|
-
spec:
|
|
1420
|
+
spec: specOf48("tail"),
|
|
1414
1421
|
fn: (accessor, paths, texts, opts) => tailGeneric(paths, texts, opts, (p) => stream(accessor, p)),
|
|
1415
1422
|
aggregate: headerAggregate2
|
|
1416
1423
|
});
|
|
1417
1424
|
|
|
1418
1425
|
// src/commands/builtin/opfs/tar.ts
|
|
1419
|
-
import { ResourceName as ResourceName53, command as
|
|
1420
|
-
var OPFS_TAR =
|
|
1426
|
+
import { ResourceName as ResourceName53, command as command49, specOf as specOf49, tarGeneric } from "@struktoai/mirage-core";
|
|
1427
|
+
var OPFS_TAR = command49({
|
|
1421
1428
|
name: "tar",
|
|
1422
1429
|
resource: ResourceName53.OPFS,
|
|
1423
|
-
spec:
|
|
1430
|
+
spec: specOf49("tar"),
|
|
1424
1431
|
fn: (accessor, paths, _texts, opts) => tarGeneric(
|
|
1425
1432
|
paths,
|
|
1426
1433
|
opts,
|
|
@@ -1432,11 +1439,11 @@ var OPFS_TAR = command50({
|
|
|
1432
1439
|
});
|
|
1433
1440
|
|
|
1434
1441
|
// src/commands/builtin/opfs/tee.ts
|
|
1435
|
-
import { ResourceName as ResourceName54, command as
|
|
1436
|
-
var OPFS_TEE =
|
|
1442
|
+
import { ResourceName as ResourceName54, command as command50, specOf as specOf50, teeGeneric } from "@struktoai/mirage-core";
|
|
1443
|
+
var OPFS_TEE = command50({
|
|
1437
1444
|
name: "tee",
|
|
1438
1445
|
resource: ResourceName54.OPFS,
|
|
1439
|
-
spec:
|
|
1446
|
+
spec: specOf50("tee"),
|
|
1440
1447
|
fn: (accessor, paths, texts, opts) => teeGeneric(
|
|
1441
1448
|
paths,
|
|
1442
1449
|
texts,
|
|
@@ -1451,8 +1458,8 @@ var OPFS_TEE = command51({
|
|
|
1451
1458
|
import {
|
|
1452
1459
|
IOResult as IOResult6,
|
|
1453
1460
|
ResourceName as ResourceName55,
|
|
1454
|
-
command as
|
|
1455
|
-
specOf as
|
|
1461
|
+
command as command51,
|
|
1462
|
+
specOf as specOf51
|
|
1456
1463
|
} from "@struktoai/mirage-core";
|
|
1457
1464
|
var ENC2 = new TextEncoder();
|
|
1458
1465
|
async function touchCommand(accessor, paths, texts, opts) {
|
|
@@ -1468,29 +1475,29 @@ async function touchCommand(accessor, paths, texts, opts) {
|
|
|
1468
1475
|
}
|
|
1469
1476
|
return [null, new IOResult6()];
|
|
1470
1477
|
}
|
|
1471
|
-
var OPFS_TOUCH =
|
|
1478
|
+
var OPFS_TOUCH = command51({
|
|
1472
1479
|
name: "touch",
|
|
1473
1480
|
resource: ResourceName55.OPFS,
|
|
1474
|
-
spec:
|
|
1481
|
+
spec: specOf51("touch"),
|
|
1475
1482
|
fn: touchCommand,
|
|
1476
1483
|
write: true
|
|
1477
1484
|
});
|
|
1478
1485
|
|
|
1479
1486
|
// src/commands/builtin/opfs/tr.ts
|
|
1480
|
-
import { ResourceName as ResourceName56, command as
|
|
1481
|
-
var OPFS_TR =
|
|
1487
|
+
import { ResourceName as ResourceName56, command as command52, specOf as specOf52, trGeneric } from "@struktoai/mirage-core";
|
|
1488
|
+
var OPFS_TR = command52({
|
|
1482
1489
|
name: "tr",
|
|
1483
1490
|
resource: ResourceName56.OPFS,
|
|
1484
|
-
spec:
|
|
1491
|
+
spec: specOf52("tr"),
|
|
1485
1492
|
fn: (accessor, paths, texts, opts) => trGeneric(paths, texts, opts, (p) => stream(accessor, p))
|
|
1486
1493
|
});
|
|
1487
1494
|
|
|
1488
1495
|
// src/commands/builtin/opfs/tree.ts
|
|
1489
|
-
import { ResourceName as ResourceName57, command as
|
|
1490
|
-
var OPFS_TREE =
|
|
1496
|
+
import { ResourceName as ResourceName57, command as command53, specOf as specOf53, treeGeneric } from "@struktoai/mirage-core";
|
|
1497
|
+
var OPFS_TREE = command53({
|
|
1491
1498
|
name: "tree",
|
|
1492
1499
|
resource: ResourceName57.OPFS,
|
|
1493
|
-
spec:
|
|
1500
|
+
spec: specOf53("tree"),
|
|
1494
1501
|
fn: (accessor, paths, _texts, opts) => treeGeneric(
|
|
1495
1502
|
paths,
|
|
1496
1503
|
opts,
|
|
@@ -1500,38 +1507,38 @@ var OPFS_TREE = command54({
|
|
|
1500
1507
|
});
|
|
1501
1508
|
|
|
1502
1509
|
// src/commands/builtin/opfs/tsort.ts
|
|
1503
|
-
import { ResourceName as ResourceName58, command as
|
|
1504
|
-
var OPFS_TSORT =
|
|
1510
|
+
import { ResourceName as ResourceName58, command as command54, specOf as specOf54, tsortGeneric } from "@struktoai/mirage-core";
|
|
1511
|
+
var OPFS_TSORT = command54({
|
|
1505
1512
|
name: "tsort",
|
|
1506
1513
|
resource: ResourceName58.OPFS,
|
|
1507
|
-
spec:
|
|
1514
|
+
spec: specOf54("tsort"),
|
|
1508
1515
|
fn: (accessor, paths, _texts, opts) => tsortGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1509
1516
|
});
|
|
1510
1517
|
|
|
1511
1518
|
// src/commands/builtin/opfs/unexpand.ts
|
|
1512
|
-
import { ResourceName as ResourceName59, command as
|
|
1513
|
-
var OPFS_UNEXPAND =
|
|
1519
|
+
import { ResourceName as ResourceName59, command as command55, specOf as specOf55, unexpandGeneric } from "@struktoai/mirage-core";
|
|
1520
|
+
var OPFS_UNEXPAND = command55({
|
|
1514
1521
|
name: "unexpand",
|
|
1515
1522
|
resource: ResourceName59.OPFS,
|
|
1516
|
-
spec:
|
|
1523
|
+
spec: specOf55("unexpand"),
|
|
1517
1524
|
fn: (accessor, paths, _texts, opts) => unexpandGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1518
1525
|
});
|
|
1519
1526
|
|
|
1520
1527
|
// src/commands/builtin/opfs/uniq.ts
|
|
1521
|
-
import { ResourceName as ResourceName60, command as
|
|
1522
|
-
var OPFS_UNIQ =
|
|
1528
|
+
import { ResourceName as ResourceName60, command as command56, specOf as specOf56, uniqGeneric } from "@struktoai/mirage-core";
|
|
1529
|
+
var OPFS_UNIQ = command56({
|
|
1523
1530
|
name: "uniq",
|
|
1524
1531
|
resource: ResourceName60.OPFS,
|
|
1525
|
-
spec:
|
|
1532
|
+
spec: specOf56("uniq"),
|
|
1526
1533
|
fn: (accessor, paths, _texts, opts) => uniqGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1527
1534
|
});
|
|
1528
1535
|
|
|
1529
1536
|
// src/commands/builtin/opfs/unzip.ts
|
|
1530
|
-
import { ResourceName as ResourceName61, command as
|
|
1531
|
-
var OPFS_UNZIP =
|
|
1537
|
+
import { ResourceName as ResourceName61, command as command57, specOf as specOf57, unzipGeneric } from "@struktoai/mirage-core";
|
|
1538
|
+
var OPFS_UNZIP = command57({
|
|
1532
1539
|
name: "unzip",
|
|
1533
1540
|
resource: ResourceName61.OPFS,
|
|
1534
|
-
spec:
|
|
1541
|
+
spec: specOf57("unzip"),
|
|
1535
1542
|
fn: (accessor, paths, _texts, opts) => unzipGeneric(
|
|
1536
1543
|
paths,
|
|
1537
1544
|
opts,
|
|
@@ -1543,48 +1550,48 @@ var OPFS_UNZIP = command58({
|
|
|
1543
1550
|
});
|
|
1544
1551
|
|
|
1545
1552
|
// src/commands/builtin/opfs/wc/wc.ts
|
|
1546
|
-
import { ResourceName as ResourceName62, command as
|
|
1547
|
-
var OPFS_WC =
|
|
1553
|
+
import { ResourceName as ResourceName62, command as command58, specOf as specOf58, wcAggregate, wcGeneric } from "@struktoai/mirage-core";
|
|
1554
|
+
var OPFS_WC = command58({
|
|
1548
1555
|
name: "wc",
|
|
1549
1556
|
resource: ResourceName62.OPFS,
|
|
1550
|
-
spec:
|
|
1557
|
+
spec: specOf58("wc"),
|
|
1551
1558
|
fn: (accessor, paths, texts, opts) => wcGeneric(paths, texts, opts, (p) => stream(accessor, p)),
|
|
1552
1559
|
aggregate: wcAggregate
|
|
1553
1560
|
});
|
|
1554
1561
|
|
|
1555
1562
|
// src/commands/builtin/opfs/xxd.ts
|
|
1556
|
-
import { ResourceName as ResourceName63, command as
|
|
1557
|
-
var OPFS_XXD =
|
|
1563
|
+
import { ResourceName as ResourceName63, command as command59, specOf as specOf59, xxdGeneric } from "@struktoai/mirage-core";
|
|
1564
|
+
var OPFS_XXD = command59({
|
|
1558
1565
|
name: "xxd",
|
|
1559
1566
|
resource: ResourceName63.OPFS,
|
|
1560
|
-
spec:
|
|
1567
|
+
spec: specOf59("xxd"),
|
|
1561
1568
|
fn: (accessor, paths, _texts, opts) => xxdGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1562
1569
|
});
|
|
1563
1570
|
|
|
1564
1571
|
// src/commands/builtin/opfs/zcat.ts
|
|
1565
|
-
import { ResourceName as ResourceName64, command as
|
|
1566
|
-
var OPFS_ZCAT =
|
|
1572
|
+
import { ResourceName as ResourceName64, command as command60, specOf as specOf60, zcatGeneric } from "@struktoai/mirage-core";
|
|
1573
|
+
var OPFS_ZCAT = command60({
|
|
1567
1574
|
name: "zcat",
|
|
1568
1575
|
resource: ResourceName64.OPFS,
|
|
1569
|
-
spec:
|
|
1576
|
+
spec: specOf60("zcat"),
|
|
1570
1577
|
fn: (accessor, paths, _texts, opts) => zcatGeneric(paths, opts, (p) => stream(accessor, p))
|
|
1571
1578
|
});
|
|
1572
1579
|
|
|
1573
1580
|
// src/commands/builtin/opfs/zgrep.ts
|
|
1574
|
-
import { ResourceName as ResourceName65, command as
|
|
1575
|
-
var OPFS_ZGREP =
|
|
1581
|
+
import { ResourceName as ResourceName65, command as command61, specOf as specOf61, zgrepGeneric } from "@struktoai/mirage-core";
|
|
1582
|
+
var OPFS_ZGREP = command61({
|
|
1576
1583
|
name: "zgrep",
|
|
1577
1584
|
resource: ResourceName65.OPFS,
|
|
1578
|
-
spec:
|
|
1585
|
+
spec: specOf61("zgrep"),
|
|
1579
1586
|
fn: (accessor, paths, texts, opts) => zgrepGeneric(paths, texts, opts, (p) => stream(accessor, p))
|
|
1580
1587
|
});
|
|
1581
1588
|
|
|
1582
1589
|
// src/commands/builtin/opfs/zip_cmd.ts
|
|
1583
|
-
import { ResourceName as ResourceName66, command as
|
|
1584
|
-
var OPFS_ZIP =
|
|
1590
|
+
import { ResourceName as ResourceName66, command as command62, specOf as specOf62, zipGeneric } from "@struktoai/mirage-core";
|
|
1591
|
+
var OPFS_ZIP = command62({
|
|
1585
1592
|
name: "zip",
|
|
1586
1593
|
resource: ResourceName66.OPFS,
|
|
1587
|
-
spec:
|
|
1594
|
+
spec: specOf62("zip"),
|
|
1588
1595
|
fn: (accessor, paths, _texts, opts) => zipGeneric(
|
|
1589
1596
|
paths,
|
|
1590
1597
|
opts,
|
|
@@ -2106,4 +2113,4 @@ export {
|
|
|
2106
2113
|
OPFS_PROMPT,
|
|
2107
2114
|
OPFSResource
|
|
2108
2115
|
};
|
|
2109
|
-
//# sourceMappingURL=chunk-
|
|
2116
|
+
//# sourceMappingURL=chunk-KV2DM5H6.js.map
|