@struktoai/mirage-node 0.0.7-alpha.2 → 0.0.7
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/LICENSE +201 -0
- package/README.md +28 -29
- package/THIRD_PARTY_NOTICES +227 -0
- package/dist/accessor/disk.d.ts +2 -1
- package/dist/accessor/disk.d.ts.map +1 -1
- package/dist/accessor/disk.js +5 -1
- package/dist/accessor/disk.js.map +1 -1
- package/dist/accessor/email.d.ts +8 -0
- package/dist/accessor/email.d.ts.map +1 -1
- package/dist/accessor/email.js +33 -14
- package/dist/accessor/email.js.map +1 -1
- package/dist/accessor/gridfs.d.ts +1 -1
- package/dist/accessor/gridfs.d.ts.map +1 -1
- package/dist/accessor/gridfs.js +2 -2
- package/dist/accessor/gridfs.js.map +1 -1
- package/dist/accessor/hf_buckets.d.ts +39 -0
- package/dist/accessor/hf_buckets.d.ts.map +1 -0
- package/dist/accessor/hf_buckets.js +92 -0
- package/dist/accessor/hf_buckets.js.map +1 -0
- package/dist/accessor/hf_hub.d.ts +45 -40
- package/dist/accessor/hf_hub.d.ts.map +1 -1
- package/dist/accessor/hf_hub.js +72 -42
- package/dist/accessor/hf_hub.js.map +1 -1
- package/dist/accessor/nextcloud.d.ts +2 -2
- package/dist/accessor/nextcloud.d.ts.map +1 -1
- package/dist/accessor/nextcloud.js +4 -4
- package/dist/accessor/nextcloud.js.map +1 -1
- package/dist/accessor/ssh.d.ts +19 -1
- package/dist/accessor/ssh.d.ts.map +1 -1
- package/dist/accessor/ssh.js +141 -25
- package/dist/accessor/ssh.js.map +1 -1
- package/dist/cache/file/redis.d.ts +48 -10
- package/dist/cache/file/redis.d.ts.map +1 -1
- package/dist/cache/file/redis.js +204 -75
- package/dist/cache/file/redis.js.map +1 -1
- package/dist/cache/file/version.lua +13 -0
- package/dist/commands/builtin/utils/http.d.ts +2 -0
- package/dist/commands/builtin/utils/http.d.ts.map +1 -0
- package/dist/commands/builtin/utils/http.js +26 -0
- package/dist/commands/builtin/utils/http.js.map +1 -0
- package/dist/commands/cli/builtin/hf/accessor.d.ts +7 -21
- package/dist/commands/cli/builtin/hf/accessor.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/accessor.js +14 -37
- package/dist/commands/cli/builtin/hf/accessor.js.map +1 -1
- package/dist/commands/cli/builtin/hf/auth.d.ts +5 -4
- package/dist/commands/cli/builtin/hf/auth.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/auth.js +9 -10
- package/dist/commands/cli/builtin/hf/auth.js.map +1 -1
- package/dist/commands/cli/builtin/hf/download.d.ts +7 -6
- package/dist/commands/cli/builtin/hf/download.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/download.js +100 -96
- package/dist/commands/cli/builtin/hf/download.js.map +1 -1
- package/dist/commands/cli/builtin/hf/env.d.ts +5 -4
- package/dist/commands/cli/builtin/hf/env.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/env.js +4 -6
- package/dist/commands/cli/builtin/hf/env.js.map +1 -1
- package/dist/commands/cli/builtin/hf/files.d.ts +10 -7
- package/dist/commands/cli/builtin/hf/files.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/files.js +36 -19
- package/dist/commands/cli/builtin/hf/files.js.map +1 -1
- package/dist/commands/cli/builtin/hf/index.d.ts +2 -2
- package/dist/commands/cli/builtin/hf/index.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/index.js +148 -178
- package/dist/commands/cli/builtin/hf/index.js.map +1 -1
- package/dist/commands/cli/builtin/hf/repo.d.ts +7 -6
- package/dist/commands/cli/builtin/hf/repo.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/repo.js +32 -34
- package/dist/commands/cli/builtin/hf/repo.js.map +1 -1
- package/dist/commands/cli/builtin/hf/upload.d.ts +7 -17
- package/dist/commands/cli/builtin/hf/upload.d.ts.map +1 -1
- package/dist/commands/cli/builtin/hf/upload.js +99 -96
- package/dist/commands/cli/builtin/hf/upload.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/compose.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/compose.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/compose.js +2 -2
- package/dist/commands/cli/builtin/himalaya/compose.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/deliver.d.ts +5 -5
- package/dist/commands/cli/builtin/himalaya/deliver.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/deliver.js +13 -19
- package/dist/commands/cli/builtin/himalaya/deliver.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/forward.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/forward.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/forward.js +7 -15
- package/dist/commands/cli/builtin/himalaya/forward.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/index.d.ts +2 -2
- package/dist/commands/cli/builtin/himalaya/index.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/index.js +110 -147
- package/dist/commands/cli/builtin/himalaya/index.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/list.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/list.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/list.js +10 -20
- package/dist/commands/cli/builtin/himalaya/list.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/query.d.ts +8 -1
- package/dist/commands/cli/builtin/himalaya/query.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/query.js +13 -19
- package/dist/commands/cli/builtin/himalaya/query.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/read.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/read.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/read.js +12 -19
- package/dist/commands/cli/builtin/himalaya/read.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/reply.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/reply.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/reply.js +7 -15
- package/dist/commands/cli/builtin/himalaya/reply.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/search.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/search.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/search.js +11 -21
- package/dist/commands/cli/builtin/himalaya/search.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/send.d.ts +4 -3
- package/dist/commands/cli/builtin/himalaya/send.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/send.js +6 -6
- package/dist/commands/cli/builtin/himalaya/send.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/smtp.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/smtp.js +5 -1
- package/dist/commands/cli/builtin/himalaya/smtp.js.map +1 -1
- package/dist/commands/cli/builtin/himalaya/util.d.ts +4 -4
- package/dist/commands/cli/builtin/himalaya/util.d.ts.map +1 -1
- package/dist/commands/cli/builtin/himalaya/util.js +17 -18
- package/dist/commands/cli/builtin/himalaya/util.js.map +1 -1
- package/dist/compression_codecs.js +21 -13
- package/dist/compression_codecs.js.map +1 -1
- package/dist/config.d.ts +38 -18
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +244 -133
- package/dist/config.js.map +1 -1
- package/dist/core/disk/append.d.ts.map +1 -1
- package/dist/core/disk/append.js +4 -7
- package/dist/core/disk/append.js.map +1 -1
- package/dist/core/disk/constants.d.ts +1 -1
- package/dist/core/disk/constants.d.ts.map +1 -1
- package/dist/core/disk/constants.js +3 -1
- package/dist/core/disk/constants.js.map +1 -1
- package/dist/core/disk/copy.d.ts.map +1 -1
- package/dist/core/disk/copy.js +3 -5
- package/dist/core/disk/copy.js.map +1 -1
- package/dist/core/disk/create.d.ts +1 -1
- package/dist/core/disk/create.d.ts.map +1 -1
- package/dist/core/disk/create.js +15 -3
- package/dist/core/disk/create.js.map +1 -1
- package/dist/core/disk/dest.d.ts +1 -1
- package/dist/core/disk/dest.js +3 -3
- package/dist/core/disk/dest.js.map +1 -1
- package/dist/core/disk/events/constants.d.ts.map +1 -0
- package/dist/core/disk/events/constants.js.map +1 -0
- package/dist/core/disk/events/hook.d.ts +54 -0
- package/dist/core/disk/events/hook.d.ts.map +1 -0
- package/dist/core/disk/events/hook.js +108 -0
- package/dist/core/disk/events/hook.js.map +1 -0
- package/dist/core/disk/events/index.d.ts +2 -0
- package/dist/core/disk/events/index.d.ts.map +1 -0
- package/dist/core/disk/events/index.js +15 -0
- package/dist/core/disk/events/index.js.map +1 -0
- package/dist/core/disk/exists.d.ts.map +1 -1
- package/dist/core/disk/exists.js +9 -6
- package/dist/core/disk/exists.js.map +1 -1
- package/dist/core/disk/listing_version.d.ts +27 -0
- package/dist/core/disk/listing_version.d.ts.map +1 -0
- package/dist/core/disk/listing_version.js +50 -0
- package/dist/core/disk/listing_version.js.map +1 -0
- package/dist/core/disk/mkdir.d.ts.map +1 -1
- package/dist/core/disk/mkdir.js +2 -6
- package/dist/core/disk/mkdir.js.map +1 -1
- package/dist/core/disk/pwrite.d.ts +4 -0
- package/dist/core/disk/pwrite.d.ts.map +1 -0
- package/dist/core/disk/pwrite.js +41 -0
- package/dist/core/disk/pwrite.js.map +1 -0
- package/dist/core/disk/read.d.ts +1 -2
- package/dist/core/disk/read.d.ts.map +1 -1
- package/dist/core/disk/read.js +12 -14
- package/dist/core/disk/read.js.map +1 -1
- package/dist/core/disk/readdir.d.ts +2 -3
- package/dist/core/disk/readdir.d.ts.map +1 -1
- package/dist/core/disk/readdir.js +35 -38
- package/dist/core/disk/readdir.js.map +1 -1
- package/dist/core/disk/rename.d.ts.map +1 -1
- package/dist/core/disk/rename.js +4 -10
- package/dist/core/disk/rename.js.map +1 -1
- package/dist/core/disk/rm.d.ts.map +1 -1
- package/dist/core/disk/rm.js +2 -4
- package/dist/core/disk/rm.js.map +1 -1
- package/dist/core/disk/rmdir.d.ts.map +1 -1
- package/dist/core/disk/rmdir.js +4 -7
- package/dist/core/disk/rmdir.js.map +1 -1
- package/dist/core/disk/set_attrs.d.ts.map +1 -1
- package/dist/core/disk/set_attrs.js +5 -4
- package/dist/core/disk/set_attrs.js.map +1 -1
- package/dist/core/disk/stat.d.ts +7 -0
- package/dist/core/disk/stat.d.ts.map +1 -1
- package/dist/core/disk/stat.js +32 -15
- package/dist/core/disk/stat.js.map +1 -1
- package/dist/core/disk/stream.d.ts +1 -1
- package/dist/core/disk/stream.d.ts.map +1 -1
- package/dist/core/disk/stream.js +8 -8
- package/dist/core/disk/stream.js.map +1 -1
- package/dist/core/disk/truncate.d.ts +1 -1
- package/dist/core/disk/truncate.d.ts.map +1 -1
- package/dist/core/disk/truncate.js +19 -19
- package/dist/core/disk/truncate.js.map +1 -1
- package/dist/core/disk/unlink.d.ts.map +1 -1
- package/dist/core/disk/unlink.js +13 -8
- package/dist/core/disk/unlink.js.map +1 -1
- package/dist/core/disk/utils.d.ts +31 -0
- package/dist/core/disk/utils.d.ts.map +1 -1
- package/dist/core/disk/utils.js +92 -1
- package/dist/core/disk/utils.js.map +1 -1
- package/dist/core/disk/write.d.ts +3 -1
- package/dist/core/disk/write.d.ts.map +1 -1
- package/dist/core/disk/write.js +66 -9
- package/dist/core/disk/write.js.map +1 -1
- package/dist/core/email/client.d.ts +17 -1
- package/dist/core/email/client.d.ts.map +1 -1
- package/dist/core/email/client.js +40 -15
- package/dist/core/email/client.js.map +1 -1
- package/dist/core/email/config.d.ts +3 -2
- package/dist/core/email/config.d.ts.map +1 -1
- package/dist/core/email/config.js +9 -1
- package/dist/core/email/config.js.map +1 -1
- package/dist/core/email/events.d.ts +22 -0
- package/dist/core/email/events.d.ts.map +1 -0
- package/dist/core/email/events.js +44 -0
- package/dist/core/email/events.js.map +1 -0
- package/dist/core/email/read.d.ts +9 -3
- package/dist/core/email/read.d.ts.map +1 -1
- package/dist/core/email/read.js +36 -10
- package/dist/core/email/read.js.map +1 -1
- package/dist/core/email/readdir.d.ts.map +1 -1
- package/dist/core/email/readdir.js +29 -63
- package/dist/core/email/readdir.js.map +1 -1
- package/dist/core/email/render.d.ts +2 -1
- package/dist/core/email/render.d.ts.map +1 -1
- package/dist/core/email/render.js +21 -2
- package/dist/core/email/render.js.map +1 -1
- package/dist/core/email/scope.js +3 -3
- package/dist/core/email/scope.js.map +1 -1
- package/dist/core/email/search.d.ts +33 -1
- package/dist/core/email/search.d.ts.map +1 -1
- package/dist/core/email/search.js +116 -18
- package/dist/core/email/search.js.map +1 -1
- package/dist/core/email/stat.d.ts +1 -3
- package/dist/core/email/stat.d.ts.map +1 -1
- package/dist/core/email/stat.js +1 -40
- package/dist/core/email/stat.js.map +1 -1
- package/dist/core/gridfs/client.d.ts +1 -5
- package/dist/core/gridfs/client.d.ts.map +1 -1
- package/dist/core/gridfs/client.js +2 -14
- package/dist/core/gridfs/client.js.map +1 -1
- package/dist/core/gridfs/create.d.ts +1 -1
- package/dist/core/gridfs/create.d.ts.map +1 -1
- package/dist/core/gridfs/driver.d.ts +0 -16
- package/dist/core/gridfs/driver.d.ts.map +1 -1
- package/dist/core/gridfs/driver.js +45 -103
- package/dist/core/gridfs/driver.js.map +1 -1
- package/dist/core/gridfs/events.d.ts +33 -0
- package/dist/core/gridfs/events.d.ts.map +1 -0
- package/dist/core/gridfs/events.js +117 -0
- package/dist/core/gridfs/events.js.map +1 -0
- package/dist/core/gridfs/read.d.ts +1 -2
- package/dist/core/gridfs/read.d.ts.map +1 -1
- package/dist/core/gridfs/read.js +8 -14
- package/dist/core/gridfs/read.js.map +1 -1
- package/dist/core/gridfs/readdir.d.ts +1 -0
- package/dist/core/gridfs/readdir.d.ts.map +1 -1
- package/dist/core/gridfs/readdir.js +2 -1
- package/dist/core/gridfs/readdir.js.map +1 -1
- package/dist/core/gridfs/stream.d.ts +1 -14
- package/dist/core/gridfs/stream.d.ts.map +1 -1
- package/dist/core/gridfs/stream.js +8 -21
- package/dist/core/gridfs/stream.js.map +1 -1
- package/dist/core/gridfs/write.d.ts +1 -0
- package/dist/core/gridfs/write.d.ts.map +1 -1
- package/dist/core/gridfs/write.js +3 -2
- package/dist/core/gridfs/write.js.map +1 -1
- package/dist/core/hf_buckets/constants.d.ts +2 -0
- package/dist/core/hf_buckets/constants.d.ts.map +1 -0
- package/dist/core/hf_buckets/constants.js +15 -0
- package/dist/core/hf_buckets/constants.js.map +1 -0
- package/dist/core/hf_buckets/create.d.ts +2 -0
- package/dist/core/hf_buckets/create.d.ts.map +1 -0
- package/dist/core/hf_buckets/create.js.map +1 -0
- package/dist/core/hf_buckets/driver.d.ts +15 -0
- package/dist/core/hf_buckets/driver.d.ts.map +1 -0
- package/dist/core/hf_buckets/driver.js +211 -0
- package/dist/core/hf_buckets/driver.js.map +1 -0
- package/dist/core/hf_buckets/exists.d.ts +2 -0
- package/dist/core/hf_buckets/exists.d.ts.map +1 -0
- package/dist/core/hf_buckets/exists.js.map +1 -0
- package/dist/core/hf_buckets/hub.d.ts +37 -0
- package/dist/core/hf_buckets/hub.d.ts.map +1 -0
- package/dist/core/hf_buckets/hub.js +74 -0
- package/dist/core/hf_buckets/hub.js.map +1 -0
- package/dist/core/hf_buckets/mkdir.d.ts +2 -0
- package/dist/core/hf_buckets/mkdir.d.ts.map +1 -0
- package/dist/core/hf_buckets/mkdir.js.map +1 -0
- package/dist/core/hf_buckets/read.d.ts +23 -0
- package/dist/core/hf_buckets/read.d.ts.map +1 -0
- package/dist/core/hf_buckets/read.js +79 -0
- package/dist/core/hf_buckets/read.js.map +1 -0
- package/dist/core/hf_buckets/readdir.d.ts +3 -0
- package/dist/core/hf_buckets/readdir.d.ts.map +1 -0
- package/dist/core/hf_buckets/readdir.js +18 -0
- package/dist/core/hf_buckets/readdir.js.map +1 -0
- package/dist/core/hf_buckets/rm.d.ts +2 -0
- package/dist/core/hf_buckets/rm.d.ts.map +1 -0
- package/dist/core/hf_buckets/rm.js.map +1 -0
- package/dist/core/hf_buckets/stat.d.ts +12 -0
- package/dist/core/hf_buckets/stat.d.ts.map +1 -0
- package/dist/core/hf_buckets/stat.js +29 -0
- package/dist/core/hf_buckets/stat.js.map +1 -0
- package/dist/core/hf_buckets/stream.d.ts +5 -0
- package/dist/core/hf_buckets/stream.d.ts.map +1 -0
- package/dist/core/hf_buckets/stream.js +46 -0
- package/dist/core/hf_buckets/stream.js.map +1 -0
- package/dist/core/hf_buckets/unlink.d.ts +2 -0
- package/dist/core/hf_buckets/unlink.d.ts.map +1 -0
- package/dist/core/hf_buckets/unlink.js.map +1 -0
- package/dist/core/hf_buckets/write.d.ts +2 -0
- package/dist/core/hf_buckets/write.d.ts.map +1 -0
- package/dist/core/hf_buckets/write.js +17 -0
- package/dist/core/hf_buckets/write.js.map +1 -0
- package/dist/core/hf_hub/account.d.ts +3 -3
- package/dist/core/hf_hub/account.d.ts.map +1 -1
- package/dist/core/hf_hub/account.js +5 -5
- package/dist/core/hf_hub/account.js.map +1 -1
- package/dist/core/hf_hub/admin.d.ts +5 -7
- package/dist/core/hf_hub/admin.d.ts.map +1 -1
- package/dist/core/hf_hub/admin.js +13 -19
- package/dist/core/hf_hub/admin.js.map +1 -1
- package/dist/core/hf_hub/cache.d.ts +5 -4
- package/dist/core/hf_hub/cache.d.ts.map +1 -1
- package/dist/core/hf_hub/cache.js +4 -4
- package/dist/core/hf_hub/cache.js.map +1 -1
- package/dist/core/hf_hub/checksum.d.ts +17 -0
- package/dist/core/hf_hub/checksum.d.ts.map +1 -0
- package/dist/core/hf_hub/checksum.js +50 -0
- package/dist/core/hf_hub/checksum.js.map +1 -0
- package/dist/core/hf_hub/client.d.ts +61 -8
- package/dist/core/hf_hub/client.d.ts.map +1 -1
- package/dist/core/hf_hub/client.js +156 -22
- package/dist/core/hf_hub/client.js.map +1 -1
- package/dist/core/hf_hub/commit.d.ts +12 -5
- package/dist/core/hf_hub/commit.d.ts.map +1 -1
- package/dist/core/hf_hub/commit.js +42 -18
- package/dist/core/hf_hub/commit.js.map +1 -1
- package/dist/core/hf_hub/config.d.ts +2 -2
- package/dist/core/hf_hub/config.d.ts.map +1 -1
- package/dist/core/hf_hub/config.js +1 -1
- package/dist/core/hf_hub/config.js.map +1 -1
- package/dist/core/hf_hub/constants.d.ts +5 -0
- package/dist/core/hf_hub/constants.d.ts.map +1 -1
- package/dist/core/hf_hub/constants.js +32 -0
- package/dist/core/hf_hub/constants.js.map +1 -1
- package/dist/core/hf_hub/exists.d.ts +6 -4
- package/dist/core/hf_hub/exists.d.ts.map +1 -1
- package/dist/core/hf_hub/exists.js +7 -10
- package/dist/core/hf_hub/exists.js.map +1 -1
- package/dist/core/hf_hub/lookup.d.ts +10 -29
- package/dist/core/hf_hub/lookup.d.ts.map +1 -1
- package/dist/core/hf_hub/lookup.js +17 -59
- package/dist/core/hf_hub/lookup.js.map +1 -1
- package/dist/core/hf_hub/read.d.ts +10 -9
- package/dist/core/hf_hub/read.d.ts.map +1 -1
- package/dist/core/hf_hub/read.js +28 -26
- package/dist/core/hf_hub/read.js.map +1 -1
- package/dist/core/hf_hub/readdir.d.ts +8 -5
- package/dist/core/hf_hub/readdir.d.ts.map +1 -1
- package/dist/core/hf_hub/readdir.js +17 -17
- package/dist/core/hf_hub/readdir.js.map +1 -1
- package/dist/core/hf_hub/repo.d.ts +16 -7
- package/dist/core/hf_hub/repo.d.ts.map +1 -1
- package/dist/core/hf_hub/repo.js +25 -12
- package/dist/core/hf_hub/repo.js.map +1 -1
- package/dist/core/hf_hub/stat.d.ts +9 -1
- package/dist/core/hf_hub/stat.d.ts.map +1 -1
- package/dist/core/hf_hub/stat.js +54 -45
- package/dist/core/hf_hub/stat.js.map +1 -1
- package/dist/core/hf_hub/stream.d.ts +2 -5
- package/dist/core/hf_hub/stream.d.ts.map +1 -1
- package/dist/core/hf_hub/stream.js +19 -11
- package/dist/core/hf_hub/stream.js.map +1 -1
- package/dist/core/hf_hub/tree.d.ts +65 -48
- package/dist/core/hf_hub/tree.d.ts.map +1 -1
- package/dist/core/hf_hub/tree.js +200 -155
- package/dist/core/hf_hub/tree.js.map +1 -1
- package/dist/core/nextcloud/capacity.d.ts +9 -0
- package/dist/core/nextcloud/capacity.d.ts.map +1 -0
- package/dist/core/nextcloud/capacity.js +36 -0
- package/dist/core/nextcloud/capacity.js.map +1 -0
- package/dist/core/nextcloud/checksum.d.ts +16 -0
- package/dist/core/nextcloud/checksum.d.ts.map +1 -0
- package/dist/core/nextcloud/checksum.js +75 -0
- package/dist/core/nextcloud/checksum.js.map +1 -0
- package/dist/core/nextcloud/constants.d.ts +4 -0
- package/dist/core/nextcloud/constants.d.ts.map +1 -1
- package/dist/core/nextcloud/constants.js +16 -0
- package/dist/core/nextcloud/constants.js.map +1 -1
- package/dist/core/nextcloud/copy.d.ts +8 -1
- package/dist/core/nextcloud/copy.d.ts.map +1 -1
- package/dist/core/nextcloud/copy.js +54 -3
- package/dist/core/nextcloud/copy.js.map +1 -1
- package/dist/core/nextcloud/create.d.ts +1 -2
- package/dist/core/nextcloud/create.d.ts.map +1 -1
- package/dist/core/nextcloud/create.js +2 -2
- package/dist/core/nextcloud/create.js.map +1 -1
- package/dist/core/nextcloud/dav.d.ts +13 -0
- package/dist/core/nextcloud/dav.d.ts.map +1 -0
- package/dist/core/nextcloud/dav.js +39 -0
- package/dist/core/nextcloud/dav.js.map +1 -0
- package/dist/core/nextcloud/events.d.ts +28 -0
- package/dist/core/nextcloud/events.d.ts.map +1 -0
- package/dist/core/nextcloud/events.js +125 -0
- package/dist/core/nextcloud/events.js.map +1 -0
- package/dist/core/nextcloud/exists.d.ts +1 -3
- package/dist/core/nextcloud/exists.d.ts.map +1 -1
- package/dist/core/nextcloud/exists.js +2 -11
- package/dist/core/nextcloud/exists.js.map +1 -1
- package/dist/core/nextcloud/mkdir.d.ts +6 -9
- package/dist/core/nextcloud/mkdir.d.ts.map +1 -1
- package/dist/core/nextcloud/mkdir.js +68 -15
- package/dist/core/nextcloud/mkdir.js.map +1 -1
- package/dist/core/nextcloud/read.d.ts +1 -2
- package/dist/core/nextcloud/read.d.ts.map +1 -1
- package/dist/core/nextcloud/read.js +4 -4
- package/dist/core/nextcloud/read.js.map +1 -1
- package/dist/core/nextcloud/readdir.d.ts +3 -3
- package/dist/core/nextcloud/readdir.d.ts.map +1 -1
- package/dist/core/nextcloud/readdir.js +38 -56
- package/dist/core/nextcloud/readdir.js.map +1 -1
- package/dist/core/nextcloud/rename.d.ts.map +1 -1
- package/dist/core/nextcloud/rename.js +1 -4
- package/dist/core/nextcloud/rename.js.map +1 -1
- package/dist/core/nextcloud/rm.d.ts.map +1 -1
- package/dist/core/nextcloud/rm.js +1 -3
- package/dist/core/nextcloud/rm.js.map +1 -1
- package/dist/core/nextcloud/rmdir.d.ts +1 -1
- package/dist/core/nextcloud/rmdir.d.ts.map +1 -1
- package/dist/core/nextcloud/rmdir.js +2 -4
- package/dist/core/nextcloud/rmdir.js.map +1 -1
- package/dist/core/nextcloud/search/client.d.ts +9 -2
- package/dist/core/nextcloud/search/client.d.ts.map +1 -1
- package/dist/core/nextcloud/search/client.js +13 -9
- package/dist/core/nextcloud/search/client.js.map +1 -1
- package/dist/core/nextcloud/search/constants.d.ts +1 -1
- package/dist/core/nextcloud/search/constants.d.ts.map +1 -1
- package/dist/core/nextcloud/search/constants.js +6 -3
- package/dist/core/nextcloud/search/constants.js.map +1 -1
- package/dist/core/nextcloud/search/index.d.ts +1 -2
- package/dist/core/nextcloud/search/index.d.ts.map +1 -1
- package/dist/core/nextcloud/search/index.js +0 -1
- package/dist/core/nextcloud/search/index.js.map +1 -1
- package/dist/core/nextcloud/search/query.d.ts +3 -4
- package/dist/core/nextcloud/search/query.d.ts.map +1 -1
- package/dist/core/nextcloud/search/query.js +9 -158
- package/dist/core/nextcloud/search/query.js.map +1 -1
- package/dist/core/nextcloud/search/response.d.ts +4 -1
- package/dist/core/nextcloud/search/response.d.ts.map +1 -1
- package/dist/core/nextcloud/search/response.js +14 -14
- package/dist/core/nextcloud/search/response.js.map +1 -1
- package/dist/core/nextcloud/search/target.js +6 -6
- package/dist/core/nextcloud/search/target.js.map +1 -1
- package/dist/core/nextcloud/search/types.d.ts +2 -29
- package/dist/core/nextcloud/search/types.d.ts.map +1 -1
- package/dist/core/nextcloud/search/types.js +0 -10
- package/dist/core/nextcloud/search/types.js.map +1 -1
- package/dist/core/nextcloud/set_attrs.d.ts +13 -0
- package/dist/core/nextcloud/set_attrs.d.ts.map +1 -0
- package/dist/core/nextcloud/set_attrs.js +40 -0
- package/dist/core/nextcloud/set_attrs.js.map +1 -0
- package/dist/core/nextcloud/stat.d.ts +16 -2
- package/dist/core/nextcloud/stat.d.ts.map +1 -1
- package/dist/core/nextcloud/stat.js +57 -50
- package/dist/core/nextcloud/stat.js.map +1 -1
- package/dist/core/nextcloud/stream.d.ts +1 -3
- package/dist/core/nextcloud/stream.d.ts.map +1 -1
- package/dist/core/nextcloud/stream.js +3 -7
- package/dist/core/nextcloud/stream.js.map +1 -1
- package/dist/core/nextcloud/truncate.d.ts +1 -1
- package/dist/core/nextcloud/truncate.d.ts.map +1 -1
- package/dist/core/nextcloud/truncate.js +6 -5
- package/dist/core/nextcloud/truncate.js.map +1 -1
- package/dist/core/nextcloud/unlink.d.ts.map +1 -1
- package/dist/core/nextcloud/unlink.js +3 -5
- package/dist/core/nextcloud/unlink.js.map +1 -1
- package/dist/core/nextcloud/util.d.ts +0 -1
- package/dist/core/nextcloud/util.d.ts.map +1 -1
- package/dist/core/nextcloud/util.js +1 -7
- package/dist/core/nextcloud/util.js.map +1 -1
- package/dist/core/nextcloud/write.d.ts +1 -2
- package/dist/core/nextcloud/write.d.ts.map +1 -1
- package/dist/core/nextcloud/write.js +4 -6
- package/dist/core/nextcloud/write.js.map +1 -1
- package/dist/core/ssh/append.d.ts +2 -0
- package/dist/core/ssh/append.d.ts.map +1 -1
- package/dist/core/ssh/append.js +35 -11
- package/dist/core/ssh/append.js.map +1 -1
- package/dist/core/ssh/capacity.d.ts +9 -0
- package/dist/core/ssh/capacity.d.ts.map +1 -0
- package/dist/core/ssh/capacity.js +52 -0
- package/dist/core/ssh/capacity.js.map +1 -0
- package/dist/core/ssh/checksum.d.ts +14 -0
- package/dist/core/ssh/checksum.d.ts.map +1 -0
- package/dist/core/ssh/checksum.js +60 -0
- package/dist/core/ssh/checksum.js.map +1 -0
- package/dist/core/ssh/constants.d.ts +3 -1
- package/dist/core/ssh/constants.d.ts.map +1 -1
- package/dist/core/ssh/constants.js +3 -1
- package/dist/core/ssh/constants.js.map +1 -1
- package/dist/core/ssh/copy.d.ts +10 -1
- package/dist/core/ssh/copy.d.ts.map +1 -1
- package/dist/core/ssh/copy.js +58 -2
- package/dist/core/ssh/copy.js.map +1 -1
- package/dist/core/ssh/create.d.ts.map +1 -1
- package/dist/core/ssh/create.js +18 -3
- package/dist/core/ssh/create.js.map +1 -1
- package/dist/core/ssh/exists.d.ts.map +1 -1
- package/dist/core/ssh/exists.js +3 -2
- package/dist/core/ssh/exists.js.map +1 -1
- package/dist/core/ssh/mkdir.d.ts +1 -1
- package/dist/core/ssh/mkdir.d.ts.map +1 -1
- package/dist/core/ssh/mkdir.js +9 -7
- package/dist/core/ssh/mkdir.js.map +1 -1
- package/dist/core/ssh/pwrite.d.ts +4 -0
- package/dist/core/ssh/pwrite.d.ts.map +1 -0
- package/dist/core/ssh/pwrite.js +45 -0
- package/dist/core/ssh/pwrite.js.map +1 -0
- package/dist/core/ssh/read.d.ts +9 -3
- package/dist/core/ssh/read.d.ts.map +1 -1
- package/dist/core/ssh/read.js +38 -11
- package/dist/core/ssh/read.js.map +1 -1
- package/dist/core/ssh/readdir.d.ts +2 -2
- package/dist/core/ssh/readdir.d.ts.map +1 -1
- package/dist/core/ssh/readdir.js +36 -19
- package/dist/core/ssh/readdir.js.map +1 -1
- package/dist/core/ssh/rename.d.ts.map +1 -1
- package/dist/core/ssh/rename.js +5 -10
- package/dist/core/ssh/rename.js.map +1 -1
- package/dist/core/ssh/rm.d.ts.map +1 -1
- package/dist/core/ssh/rm.js +4 -5
- package/dist/core/ssh/rm.js.map +1 -1
- package/dist/core/ssh/rmdir.d.ts.map +1 -1
- package/dist/core/ssh/rmdir.js +4 -5
- package/dist/core/ssh/rmdir.js.map +1 -1
- package/dist/core/ssh/search.d.ts +22 -0
- package/dist/core/ssh/search.d.ts.map +1 -0
- package/dist/core/ssh/search.js +85 -0
- package/dist/core/ssh/search.js.map +1 -0
- package/dist/core/ssh/set_attrs.d.ts.map +1 -1
- package/dist/core/ssh/set_attrs.js +4 -3
- package/dist/core/ssh/set_attrs.js.map +1 -1
- package/dist/core/ssh/stat.d.ts +28 -1
- package/dist/core/ssh/stat.d.ts.map +1 -1
- package/dist/core/ssh/stat.js +134 -5
- package/dist/core/ssh/stat.js.map +1 -1
- package/dist/core/ssh/stream.d.ts +20 -2
- package/dist/core/ssh/stream.d.ts.map +1 -1
- package/dist/core/ssh/stream.js +67 -25
- package/dist/core/ssh/stream.js.map +1 -1
- package/dist/core/ssh/truncate.d.ts +1 -1
- package/dist/core/ssh/truncate.d.ts.map +1 -1
- package/dist/core/ssh/truncate.js +30 -15
- package/dist/core/ssh/truncate.js.map +1 -1
- package/dist/core/ssh/unlink.d.ts.map +1 -1
- package/dist/core/ssh/unlink.js +29 -16
- package/dist/core/ssh/unlink.js.map +1 -1
- package/dist/core/ssh/utils.d.ts +12 -1
- package/dist/core/ssh/utils.d.ts.map +1 -1
- package/dist/core/ssh/utils.js +47 -10
- package/dist/core/ssh/utils.js.map +1 -1
- package/dist/core/ssh/write.d.ts +3 -1
- package/dist/core/ssh/write.d.ts.map +1 -1
- package/dist/core/ssh/write.js +88 -16
- package/dist/core/ssh/write.js.map +1 -1
- package/dist/fuse/backend.d.ts +5 -5
- package/dist/fuse/backend.d.ts.map +1 -1
- package/dist/fuse/backend.js +12 -13
- package/dist/fuse/backend.js.map +1 -1
- package/dist/fuse/constants.d.ts +3 -0
- package/dist/fuse/constants.d.ts.map +1 -0
- package/dist/fuse/constants.js +21 -0
- package/dist/fuse/constants.js.map +1 -0
- package/dist/fuse/fs.d.ts +7 -10
- package/dist/fuse/fs.d.ts.map +1 -1
- package/dist/fuse/fs.js +65 -158
- package/dist/fuse/fs.js.map +1 -1
- package/dist/fuse/mount.d.ts +31 -4
- package/dist/fuse/mount.d.ts.map +1 -1
- package/dist/fuse/mount.js +96 -13
- package/dist/fuse/mount.js.map +1 -1
- package/dist/index.d.ts +150 -157
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +138 -154
- package/dist/index.js.map +1 -1
- package/dist/io/spool.d.ts +2 -0
- package/dist/io/spool.d.ts.map +1 -0
- package/dist/io/spool.js +54 -0
- package/dist/io/spool.js.map +1 -0
- package/dist/mount/constants.d.ts +36 -0
- package/dist/mount/constants.d.ts.map +1 -0
- package/dist/mount/constants.js +52 -0
- package/dist/mount/constants.js.map +1 -0
- package/dist/mount/core.d.ts +313 -0
- package/dist/mount/core.d.ts.map +1 -0
- package/dist/mount/core.js +915 -0
- package/dist/mount/core.js.map +1 -0
- package/dist/mount/errors.d.ts +37 -0
- package/dist/mount/errors.d.ts.map +1 -0
- package/dist/mount/errors.js +125 -0
- package/dist/mount/errors.js.map +1 -0
- package/dist/mount/nfs.d.ts +67 -0
- package/dist/mount/nfs.d.ts.map +1 -0
- package/dist/mount/nfs.js +381 -0
- package/dist/mount/nfs.js.map +1 -0
- package/dist/mount/platform/macos.d.ts.map +1 -0
- package/dist/mount/platform/macos.js.map +1 -0
- package/dist/mount/sftp.d.ts +83 -0
- package/dist/mount/sftp.d.ts.map +1 -0
- package/dist/mount/sftp.js +470 -0
- package/dist/mount/sftp.js.map +1 -0
- package/dist/mount/types.d.ts +37 -0
- package/dist/mount/types.d.ts.map +1 -0
- package/dist/mount/types.js.map +1 -0
- package/dist/observe/redis_store.d.ts +1 -2
- package/dist/observe/redis_store.d.ts.map +1 -1
- package/dist/observe/redis_store.js +9 -28
- package/dist/observe/redis_store.js.map +1 -1
- package/dist/optional_peer.d.ts +23 -1
- package/dist/optional_peer.d.ts.map +1 -1
- package/dist/optional_peer.js +49 -1
- package/dist/optional_peer.js.map +1 -1
- package/dist/runtime/js/host/constants.d.ts +8 -0
- package/dist/runtime/js/host/constants.d.ts.map +1 -0
- package/dist/runtime/js/host/constants.js +97 -0
- package/dist/runtime/js/host/constants.js.map +1 -0
- package/dist/runtime/js/host/descriptors.d.ts +96 -0
- package/dist/runtime/js/host/descriptors.d.ts.map +1 -0
- package/dist/runtime/js/host/descriptors.js +331 -0
- package/dist/runtime/js/host/descriptors.js.map +1 -0
- package/dist/runtime/js/host/fs.d.ts +18 -0
- package/dist/runtime/js/host/fs.d.ts.map +1 -0
- package/dist/runtime/js/host/fs.js +978 -0
- package/dist/runtime/js/host/fs.js.map +1 -0
- package/dist/runtime/python/local/config.d.ts +14 -0
- package/dist/runtime/python/local/config.d.ts.map +1 -0
- package/dist/runtime/python/local/config.js +16 -0
- package/dist/runtime/python/local/config.js.map +1 -0
- package/dist/runtime/python/local/runtime.d.ts +38 -0
- package/dist/runtime/python/local/runtime.d.ts.map +1 -0
- package/dist/runtime/python/local/runtime.js +222 -0
- package/dist/runtime/python/local/runtime.js.map +1 -0
- package/dist/runtime/sandbox/apple_container/config.d.ts +12 -0
- package/dist/runtime/sandbox/apple_container/config.d.ts.map +1 -0
- package/dist/runtime/sandbox/apple_container/config.js +41 -0
- package/dist/runtime/sandbox/apple_container/config.js.map +1 -0
- package/dist/runtime/sandbox/apple_container/constants.d.ts +12 -0
- package/dist/runtime/sandbox/apple_container/constants.d.ts.map +1 -0
- package/dist/runtime/sandbox/apple_container/constants.js +40 -0
- package/dist/runtime/sandbox/apple_container/constants.js.map +1 -0
- package/dist/runtime/sandbox/apple_container/runtime.d.ts +54 -0
- package/dist/runtime/sandbox/apple_container/runtime.d.ts.map +1 -0
- package/dist/runtime/sandbox/apple_container/runtime.js +139 -0
- package/dist/runtime/sandbox/apple_container/runtime.js.map +1 -0
- package/dist/runtime/sandbox/cli.d.ts +56 -0
- package/dist/runtime/sandbox/cli.d.ts.map +1 -0
- package/dist/runtime/sandbox/cli.js +260 -0
- package/dist/runtime/sandbox/cli.js.map +1 -0
- package/dist/runtime/sandbox/daytona/config.d.ts +1 -1
- package/dist/runtime/sandbox/daytona/config.d.ts.map +1 -1
- package/dist/runtime/sandbox/daytona/config.js +2 -1
- package/dist/runtime/sandbox/daytona/config.js.map +1 -1
- package/dist/runtime/sandbox/daytona/runtime.d.ts +4 -4
- package/dist/runtime/sandbox/daytona/runtime.d.ts.map +1 -1
- package/dist/runtime/sandbox/daytona/runtime.js +4 -8
- package/dist/runtime/sandbox/daytona/runtime.js.map +1 -1
- package/dist/runtime/sandbox/daytona/sdk.d.ts +5 -0
- package/dist/runtime/sandbox/daytona/sdk.d.ts.map +1 -0
- package/dist/runtime/sandbox/daytona/sdk.js +22 -0
- package/dist/runtime/sandbox/daytona/sdk.js.map +1 -0
- package/dist/runtime/sandbox/docker/config.d.ts +1 -1
- package/dist/runtime/sandbox/docker/config.d.ts.map +1 -1
- package/dist/runtime/sandbox/docker/config.js +2 -1
- package/dist/runtime/sandbox/docker/config.js.map +1 -1
- package/dist/runtime/sandbox/docker/runtime.d.ts +8 -11
- package/dist/runtime/sandbox/docker/runtime.d.ts.map +1 -1
- package/dist/runtime/sandbox/docker/runtime.js +16 -42
- package/dist/runtime/sandbox/docker/runtime.js.map +1 -1
- package/dist/runtime/sandbox/microsandbox/config.d.ts +8 -0
- package/dist/runtime/sandbox/microsandbox/config.d.ts.map +1 -0
- package/dist/runtime/sandbox/microsandbox/config.js +16 -0
- package/dist/runtime/sandbox/microsandbox/config.js.map +1 -0
- package/dist/runtime/sandbox/microsandbox/constants.d.ts +6 -0
- package/dist/runtime/sandbox/microsandbox/constants.d.ts.map +1 -0
- package/dist/runtime/sandbox/microsandbox/constants.js +22 -0
- package/dist/runtime/sandbox/microsandbox/constants.js.map +1 -0
- package/dist/runtime/sandbox/microsandbox/runtime.d.ts +26 -0
- package/dist/runtime/sandbox/microsandbox/runtime.d.ts.map +1 -0
- package/dist/runtime/sandbox/microsandbox/runtime.js +117 -0
- package/dist/runtime/sandbox/microsandbox/runtime.js.map +1 -0
- package/dist/runtime/sandbox/sandlock/config.d.ts +8 -0
- package/dist/runtime/sandbox/sandlock/config.d.ts.map +1 -0
- package/dist/runtime/sandbox/sandlock/config.js +21 -0
- package/dist/runtime/sandbox/sandlock/config.js.map +1 -0
- package/dist/runtime/sandbox/sandlock/constants.d.ts +3 -0
- package/dist/runtime/sandbox/sandlock/constants.d.ts.map +1 -0
- package/dist/runtime/sandbox/sandlock/constants.js +27 -0
- package/dist/runtime/sandbox/sandlock/constants.js.map +1 -0
- package/dist/runtime/sandbox/sandlock/runtime.d.ts +24 -0
- package/dist/runtime/sandbox/sandlock/runtime.d.ts.map +1 -0
- package/dist/runtime/sandbox/sandlock/runtime.js +78 -0
- package/dist/runtime/sandbox/sandlock/runtime.js.map +1 -0
- package/dist/runtime/sandbox/smolvm/config.d.ts +1 -1
- package/dist/runtime/sandbox/smolvm/config.d.ts.map +1 -1
- package/dist/runtime/sandbox/smolvm/config.js +2 -1
- package/dist/runtime/sandbox/smolvm/config.js.map +1 -1
- package/dist/runtime/sandbox/smolvm/runtime.d.ts +11 -12
- package/dist/runtime/sandbox/smolvm/runtime.d.ts.map +1 -1
- package/dist/runtime/sandbox/smolvm/runtime.js +28 -41
- package/dist/runtime/sandbox/smolvm/runtime.js.map +1 -1
- package/dist/runtime/sandbox/ssh/config.d.ts +2 -2
- package/dist/runtime/sandbox/ssh/config.d.ts.map +1 -1
- package/dist/runtime/sandbox/ssh/config.js +2 -1
- package/dist/runtime/sandbox/ssh/config.js.map +1 -1
- package/dist/runtime/sandbox/ssh/constants.d.ts +1 -1
- package/dist/runtime/sandbox/ssh/constants.js +1 -1
- package/dist/runtime/sandbox/ssh/runtime.d.ts +15 -14
- package/dist/runtime/sandbox/ssh/runtime.d.ts.map +1 -1
- package/dist/runtime/sandbox/ssh/runtime.js +76 -46
- package/dist/runtime/sandbox/ssh/runtime.js.map +1 -1
- package/dist/runtime/sandbox/ssh/sdk.d.ts +5 -0
- package/dist/runtime/sandbox/ssh/sdk.d.ts.map +1 -0
- package/dist/runtime/sandbox/ssh/sdk.js +22 -0
- package/dist/runtime/sandbox/ssh/sdk.js.map +1 -0
- package/dist/secrets/config.d.ts +1 -1
- package/dist/secrets/config.d.ts.map +1 -1
- package/dist/secrets/config.js +3 -3
- package/dist/secrets/config.js.map +1 -1
- package/dist/secrets/constants.d.ts +1 -2
- package/dist/secrets/constants.d.ts.map +1 -1
- package/dist/secrets/constants.js +2 -4
- package/dist/secrets/constants.js.map +1 -1
- package/dist/secrets/onepassword.d.ts +2 -2
- package/dist/secrets/onepassword.js +3 -3
- package/dist/shell/console/redis/store.d.ts +1 -1
- package/dist/shell/console/redis/store.d.ts.map +1 -1
- package/dist/shell/console/redis/store.js +9 -18
- package/dist/shell/console/redis/store.js.map +1 -1
- package/dist/utils/loader.d.ts.map +1 -0
- package/dist/utils/loader.js.map +1 -0
- package/dist/utils/ssh.d.ts +4 -0
- package/dist/utils/ssh.d.ts.map +1 -0
- package/dist/utils/ssh.js +63 -0
- package/dist/utils/ssh.js.map +1 -0
- package/dist/utils/yaml.d.ts +3 -0
- package/dist/utils/yaml.d.ts.map +1 -0
- package/dist/utils/yaml.js +6 -0
- package/dist/utils/yaml.js.map +1 -0
- package/dist/vfs/aliyun/aliyun.d.ts +8 -0
- package/dist/vfs/aliyun/aliyun.d.ts.map +1 -0
- package/dist/vfs/aliyun/aliyun.js +24 -0
- package/dist/vfs/aliyun/aliyun.js.map +1 -0
- package/dist/vfs/aliyun/config.d.ts.map +1 -0
- package/dist/vfs/aliyun/config.js.map +1 -0
- package/dist/vfs/aliyun/prompt.d.ts +2 -0
- package/dist/vfs/aliyun/prompt.d.ts.map +1 -0
- package/dist/vfs/aliyun/prompt.js +19 -0
- package/dist/vfs/aliyun/prompt.js.map +1 -0
- package/dist/vfs/backblaze/backblaze.d.ts +8 -0
- package/dist/vfs/backblaze/backblaze.d.ts.map +1 -0
- package/dist/vfs/backblaze/backblaze.js +24 -0
- package/dist/vfs/backblaze/backblaze.js.map +1 -0
- package/dist/vfs/backblaze/config.d.ts.map +1 -0
- package/dist/vfs/backblaze/config.js.map +1 -0
- package/dist/vfs/backblaze/prompt.d.ts +2 -0
- package/dist/vfs/backblaze/prompt.d.ts.map +1 -0
- package/dist/vfs/backblaze/prompt.js +19 -0
- package/dist/vfs/backblaze/prompt.js.map +1 -0
- package/dist/vfs/ceph/ceph.d.ts +8 -0
- package/dist/vfs/ceph/ceph.d.ts.map +1 -0
- package/dist/vfs/ceph/ceph.js +24 -0
- package/dist/vfs/ceph/ceph.js.map +1 -0
- package/dist/vfs/ceph/config.d.ts.map +1 -0
- package/dist/vfs/ceph/config.js.map +1 -0
- package/dist/vfs/ceph/prompt.d.ts +2 -0
- package/dist/vfs/ceph/prompt.d.ts.map +1 -0
- package/dist/vfs/ceph/prompt.js +19 -0
- package/dist/vfs/ceph/prompt.js.map +1 -0
- package/dist/vfs/databricks_volume/config.d.ts +3 -0
- package/dist/vfs/databricks_volume/config.d.ts.map +1 -0
- package/dist/vfs/databricks_volume/config.js +15 -0
- package/dist/vfs/databricks_volume/config.js.map +1 -0
- package/dist/vfs/databricks_volume/databricks_volume.d.ts +19 -0
- package/dist/vfs/databricks_volume/databricks_volume.d.ts.map +1 -0
- package/dist/vfs/databricks_volume/databricks_volume.js +45 -0
- package/dist/vfs/databricks_volume/databricks_volume.js.map +1 -0
- package/dist/vfs/digitalocean/config.d.ts.map +1 -0
- package/dist/vfs/digitalocean/config.js.map +1 -0
- package/dist/vfs/digitalocean/digitalocean.d.ts +8 -0
- package/dist/vfs/digitalocean/digitalocean.d.ts.map +1 -0
- package/dist/vfs/digitalocean/digitalocean.js +24 -0
- package/dist/vfs/digitalocean/digitalocean.js.map +1 -0
- package/dist/vfs/digitalocean/prompt.d.ts +2 -0
- package/dist/vfs/digitalocean/prompt.d.ts.map +1 -0
- package/dist/vfs/digitalocean/prompt.js +19 -0
- package/dist/vfs/digitalocean/prompt.js.map +1 -0
- package/dist/vfs/discord/discord.d.ts +19 -0
- package/dist/vfs/discord/discord.d.ts.map +1 -0
- package/dist/vfs/discord/discord.js +44 -0
- package/dist/vfs/discord/discord.js.map +1 -0
- package/dist/vfs/disk/disk.d.ts +65 -0
- package/dist/vfs/disk/disk.d.ts.map +1 -0
- package/dist/vfs/disk/disk.js +217 -0
- package/dist/vfs/disk/disk.js.map +1 -0
- package/dist/vfs/disk/prompt.d.ts +2 -0
- package/dist/vfs/disk/prompt.d.ts.map +1 -0
- package/dist/vfs/disk/prompt.js +17 -0
- package/dist/vfs/disk/prompt.js.map +1 -0
- package/dist/vfs/dropbox/config.d.ts +34 -0
- package/dist/vfs/dropbox/config.d.ts.map +1 -0
- package/dist/vfs/dropbox/config.js +31 -0
- package/dist/vfs/dropbox/config.js.map +1 -0
- package/dist/vfs/email/email.d.ts +38 -0
- package/dist/vfs/email/email.d.ts.map +1 -0
- package/dist/vfs/email/email.js +78 -0
- package/dist/vfs/email/email.js.map +1 -0
- package/dist/vfs/email/index.d.ts +3 -0
- package/dist/vfs/email/index.d.ts.map +1 -0
- package/dist/vfs/email/index.js +16 -0
- package/dist/vfs/email/index.js.map +1 -0
- package/dist/vfs/email/prompt.d.ts +3 -0
- package/dist/vfs/email/prompt.d.ts.map +1 -0
- package/dist/vfs/email/prompt.js +29 -0
- package/dist/vfs/email/prompt.js.map +1 -0
- package/dist/vfs/gcs/config.d.ts +36 -0
- package/dist/vfs/gcs/config.d.ts.map +1 -0
- package/dist/vfs/gcs/config.js +55 -0
- package/dist/vfs/gcs/config.js.map +1 -0
- package/dist/vfs/gcs/gcs.d.ts +8 -0
- package/dist/vfs/gcs/gcs.d.ts.map +1 -0
- package/dist/vfs/gcs/gcs.js +24 -0
- package/dist/vfs/gcs/gcs.js.map +1 -0
- package/dist/vfs/gcs/prompt.d.ts +2 -0
- package/dist/vfs/gcs/prompt.d.ts.map +1 -0
- package/dist/vfs/gcs/prompt.js +19 -0
- package/dist/vfs/gcs/prompt.js.map +1 -0
- package/dist/vfs/gridfs/config.d.ts +20 -0
- package/dist/vfs/gridfs/config.d.ts.map +1 -0
- package/dist/vfs/gridfs/config.js +42 -0
- package/dist/vfs/gridfs/config.js.map +1 -0
- package/dist/vfs/gridfs/gridfs.d.ts +45 -0
- package/dist/vfs/gridfs/gridfs.d.ts.map +1 -0
- package/dist/vfs/gridfs/gridfs.js +144 -0
- package/dist/vfs/gridfs/gridfs.js.map +1 -0
- package/dist/vfs/gridfs/prompt.d.ts +2 -0
- package/dist/vfs/gridfs/prompt.d.ts.map +1 -0
- package/dist/vfs/gridfs/prompt.js +19 -0
- package/dist/vfs/gridfs/prompt.js.map +1 -0
- package/dist/vfs/hf_buckets/config.d.ts +59 -0
- package/dist/vfs/hf_buckets/config.d.ts.map +1 -0
- package/dist/vfs/hf_buckets/config.js +91 -0
- package/dist/vfs/hf_buckets/config.js.map +1 -0
- package/dist/vfs/hf_buckets/hf_buckets.d.ts +36 -0
- package/dist/vfs/hf_buckets/hf_buckets.d.ts.map +1 -0
- package/dist/vfs/hf_buckets/hf_buckets.js +114 -0
- package/dist/vfs/hf_buckets/hf_buckets.js.map +1 -0
- package/dist/vfs/hf_buckets/prompt.d.ts +2 -0
- package/dist/vfs/hf_buckets/prompt.d.ts.map +1 -0
- package/dist/vfs/hf_buckets/prompt.js +18 -0
- package/dist/vfs/hf_buckets/prompt.js.map +1 -0
- package/dist/vfs/hf_datasets/config.d.ts +6 -0
- package/dist/vfs/hf_datasets/config.d.ts.map +1 -0
- package/dist/vfs/hf_datasets/config.js +17 -0
- package/dist/vfs/hf_datasets/config.js.map +1 -0
- package/dist/vfs/hf_datasets/hf_datasets.d.ts +16 -0
- package/dist/vfs/hf_datasets/hf_datasets.d.ts.map +1 -0
- package/dist/vfs/hf_datasets/hf_datasets.js +47 -0
- package/dist/vfs/hf_datasets/hf_datasets.js.map +1 -0
- package/dist/vfs/hf_datasets/prompt.d.ts +2 -0
- package/dist/vfs/hf_datasets/prompt.d.ts.map +1 -0
- package/dist/vfs/hf_datasets/prompt.js +18 -0
- package/dist/vfs/hf_datasets/prompt.js.map +1 -0
- package/dist/vfs/hf_hub/base.d.ts +42 -0
- package/dist/vfs/hf_hub/base.d.ts.map +1 -0
- package/dist/vfs/hf_hub/base.js +80 -0
- package/dist/vfs/hf_hub/base.js.map +1 -0
- package/dist/vfs/hf_models/config.d.ts.map +1 -0
- package/dist/vfs/hf_models/config.js.map +1 -0
- package/dist/vfs/hf_models/hf_models.d.ts +16 -0
- package/dist/vfs/hf_models/hf_models.d.ts.map +1 -0
- package/dist/vfs/hf_models/hf_models.js +47 -0
- package/dist/vfs/hf_models/hf_models.js.map +1 -0
- package/dist/vfs/hf_models/prompt.d.ts +2 -0
- package/dist/vfs/hf_models/prompt.d.ts.map +1 -0
- package/dist/vfs/hf_models/prompt.js +18 -0
- package/dist/vfs/hf_models/prompt.js.map +1 -0
- package/dist/vfs/hf_spaces/config.d.ts +6 -0
- package/dist/vfs/hf_spaces/config.d.ts.map +1 -0
- package/dist/vfs/hf_spaces/config.js +17 -0
- package/dist/vfs/hf_spaces/config.js.map +1 -0
- package/dist/vfs/hf_spaces/hf_spaces.d.ts +16 -0
- package/dist/vfs/hf_spaces/hf_spaces.d.ts.map +1 -0
- package/dist/vfs/hf_spaces/hf_spaces.js +47 -0
- package/dist/vfs/hf_spaces/hf_spaces.js.map +1 -0
- package/dist/vfs/hf_spaces/prompt.d.ts +2 -0
- package/dist/vfs/hf_spaces/prompt.d.ts.map +1 -0
- package/dist/vfs/hf_spaces/prompt.js +18 -0
- package/dist/vfs/hf_spaces/prompt.js.map +1 -0
- package/dist/vfs/jaeger/config.d.ts +15 -0
- package/dist/vfs/jaeger/config.d.ts.map +1 -0
- package/dist/vfs/jaeger/config.js +28 -0
- package/dist/vfs/jaeger/config.js.map +1 -0
- package/dist/vfs/jaeger/jaeger.d.ts +18 -0
- package/dist/vfs/jaeger/jaeger.d.ts.map +1 -0
- package/dist/vfs/jaeger/jaeger.js +57 -0
- package/dist/vfs/jaeger/jaeger.js.map +1 -0
- package/dist/vfs/lancedb/lancedb.d.ts +27 -0
- package/dist/vfs/lancedb/lancedb.d.ts.map +1 -0
- package/dist/vfs/lancedb/lancedb.js +61 -0
- package/dist/vfs/lancedb/lancedb.js.map +1 -0
- package/dist/vfs/lancedb/store.d.ts +20 -0
- package/dist/vfs/lancedb/store.d.ts.map +1 -0
- package/dist/vfs/lancedb/store.js +160 -0
- package/dist/vfs/lancedb/store.js.map +1 -0
- package/dist/vfs/minio/config.d.ts.map +1 -0
- package/dist/vfs/minio/config.js.map +1 -0
- package/dist/vfs/minio/minio.d.ts +8 -0
- package/dist/vfs/minio/minio.d.ts.map +1 -0
- package/dist/vfs/minio/minio.js +24 -0
- package/dist/vfs/minio/minio.js.map +1 -0
- package/dist/vfs/minio/prompt.d.ts +2 -0
- package/dist/vfs/minio/prompt.d.ts.map +1 -0
- package/dist/vfs/minio/prompt.js +19 -0
- package/dist/vfs/minio/prompt.js.map +1 -0
- package/dist/vfs/mongodb/mongodb.d.ts +26 -0
- package/dist/vfs/mongodb/mongodb.d.ts.map +1 -0
- package/dist/vfs/mongodb/mongodb.js +53 -0
- package/dist/vfs/mongodb/mongodb.js.map +1 -0
- package/dist/vfs/mongodb/store.d.ts +80 -0
- package/dist/vfs/mongodb/store.d.ts.map +1 -0
- package/dist/vfs/mongodb/store.js +220 -0
- package/dist/vfs/mongodb/store.js.map +1 -0
- package/dist/vfs/nextcloud/config.d.ts +14 -0
- package/dist/vfs/nextcloud/config.d.ts.map +1 -0
- package/dist/vfs/nextcloud/config.js +17 -0
- package/dist/vfs/nextcloud/config.js.map +1 -0
- package/dist/vfs/nextcloud/nextcloud.d.ts +44 -0
- package/dist/vfs/nextcloud/nextcloud.d.ts.map +1 -0
- package/dist/vfs/nextcloud/nextcloud.js +114 -0
- package/dist/vfs/nextcloud/nextcloud.js.map +1 -0
- package/dist/vfs/nextcloud/prompt.d.ts +2 -0
- package/dist/vfs/nextcloud/prompt.d.ts.map +1 -0
- package/dist/vfs/nextcloud/prompt.js +6 -0
- package/dist/vfs/nextcloud/prompt.js.map +1 -0
- package/dist/vfs/notion/notion.d.ts +18 -0
- package/dist/vfs/notion/notion.d.ts.map +1 -0
- package/dist/vfs/notion/notion.js +46 -0
- package/dist/vfs/notion/notion.js.map +1 -0
- package/dist/vfs/oci/config.d.ts +37 -0
- package/dist/vfs/oci/config.d.ts.map +1 -0
- package/dist/vfs/oci/config.js +60 -0
- package/dist/vfs/oci/config.js.map +1 -0
- package/dist/vfs/oci/oci.d.ts +8 -0
- package/dist/vfs/oci/oci.d.ts.map +1 -0
- package/dist/vfs/oci/oci.js +24 -0
- package/dist/vfs/oci/oci.js.map +1 -0
- package/dist/vfs/oci/prompt.d.ts +2 -0
- package/dist/vfs/oci/prompt.d.ts.map +1 -0
- package/dist/vfs/oci/prompt.js +19 -0
- package/dist/vfs/oci/prompt.js.map +1 -0
- package/dist/vfs/postgres/postgres.d.ts +26 -0
- package/dist/vfs/postgres/postgres.d.ts.map +1 -0
- package/dist/vfs/postgres/postgres.js +53 -0
- package/dist/vfs/postgres/postgres.js.map +1 -0
- package/dist/vfs/postgres/store.d.ts +21 -0
- package/dist/vfs/postgres/store.d.ts.map +1 -0
- package/dist/vfs/postgres/store.js +61 -0
- package/dist/vfs/postgres/store.js.map +1 -0
- package/dist/vfs/qingstor/config.d.ts.map +1 -0
- package/dist/vfs/qingstor/config.js.map +1 -0
- package/dist/vfs/qingstor/prompt.d.ts +2 -0
- package/dist/vfs/qingstor/prompt.d.ts.map +1 -0
- package/dist/vfs/qingstor/prompt.js +19 -0
- package/dist/vfs/qingstor/prompt.js.map +1 -0
- package/dist/vfs/qingstor/qingstor.d.ts +8 -0
- package/dist/vfs/qingstor/qingstor.d.ts.map +1 -0
- package/dist/vfs/qingstor/qingstor.js +24 -0
- package/dist/vfs/qingstor/qingstor.js.map +1 -0
- package/dist/vfs/r2/config.d.ts +37 -0
- package/dist/vfs/r2/config.d.ts.map +1 -0
- package/dist/vfs/r2/config.js +63 -0
- package/dist/vfs/r2/config.js.map +1 -0
- package/dist/vfs/r2/prompt.d.ts +2 -0
- package/dist/vfs/r2/prompt.d.ts.map +1 -0
- package/dist/vfs/r2/prompt.js +19 -0
- package/dist/vfs/r2/prompt.js.map +1 -0
- package/dist/vfs/r2/r2.d.ts +8 -0
- package/dist/vfs/r2/r2.d.ts.map +1 -0
- package/dist/vfs/r2/r2.js +24 -0
- package/dist/vfs/r2/r2.js.map +1 -0
- package/dist/vfs/redis/redis.d.ts +30 -0
- package/dist/vfs/redis/redis.d.ts.map +1 -0
- package/dist/vfs/redis/redis.js +37 -0
- package/dist/vfs/redis/redis.js.map +1 -0
- package/dist/vfs/redis/store.d.ts +69 -0
- package/dist/vfs/redis/store.d.ts.map +1 -0
- package/dist/vfs/redis/store.js +270 -0
- package/dist/vfs/redis/store.js.map +1 -0
- package/dist/vfs/registry.d.ts +42 -0
- package/dist/vfs/registry.d.ts.map +1 -0
- package/dist/vfs/registry.js +409 -0
- package/dist/vfs/registry.js.map +1 -0
- package/dist/vfs/s3/config.d.ts +36 -0
- package/dist/vfs/s3/config.d.ts.map +1 -0
- package/dist/vfs/s3/config.js +61 -0
- package/dist/vfs/s3/config.js.map +1 -0
- package/dist/vfs/s3/s3.d.ts +29 -0
- package/dist/vfs/s3/s3.d.ts.map +1 -0
- package/dist/vfs/s3/s3.js +96 -0
- package/dist/vfs/s3/s3.js.map +1 -0
- package/dist/vfs/s3_alias.d.ts +105 -0
- package/dist/vfs/s3_alias.d.ts.map +1 -0
- package/dist/vfs/s3_alias.js +141 -0
- package/dist/vfs/s3_alias.js.map +1 -0
- package/dist/vfs/scaleway/config.d.ts.map +1 -0
- package/dist/vfs/scaleway/config.js.map +1 -0
- package/dist/vfs/scaleway/prompt.d.ts +2 -0
- package/dist/vfs/scaleway/prompt.d.ts.map +1 -0
- package/dist/vfs/scaleway/prompt.js +19 -0
- package/dist/vfs/scaleway/prompt.js.map +1 -0
- package/dist/vfs/scaleway/scaleway.d.ts +8 -0
- package/dist/vfs/scaleway/scaleway.d.ts.map +1 -0
- package/dist/vfs/scaleway/scaleway.js +24 -0
- package/dist/vfs/scaleway/scaleway.js.map +1 -0
- package/dist/vfs/seaweedfs/config.d.ts.map +1 -0
- package/dist/vfs/seaweedfs/config.js.map +1 -0
- package/dist/vfs/seaweedfs/prompt.d.ts +2 -0
- package/dist/vfs/seaweedfs/prompt.d.ts.map +1 -0
- package/dist/vfs/seaweedfs/prompt.js +19 -0
- package/dist/vfs/seaweedfs/prompt.js.map +1 -0
- package/dist/vfs/seaweedfs/seaweedfs.d.ts +8 -0
- package/dist/vfs/seaweedfs/seaweedfs.d.ts.map +1 -0
- package/dist/vfs/seaweedfs/seaweedfs.js +24 -0
- package/dist/vfs/seaweedfs/seaweedfs.js.map +1 -0
- package/dist/vfs/slack/slack.d.ts +19 -0
- package/dist/vfs/slack/slack.d.ts.map +1 -0
- package/dist/vfs/slack/slack.js +45 -0
- package/dist/vfs/slack/slack.js.map +1 -0
- package/dist/vfs/ssh/config.d.ts +20 -0
- package/dist/vfs/ssh/config.d.ts.map +1 -0
- package/dist/vfs/ssh/config.js +33 -0
- package/dist/vfs/ssh/config.js.map +1 -0
- package/dist/vfs/ssh/prompt.d.ts +2 -0
- package/dist/vfs/ssh/prompt.d.ts.map +1 -0
- package/dist/vfs/ssh/prompt.js +18 -0
- package/dist/vfs/ssh/prompt.js.map +1 -0
- package/dist/vfs/ssh/ssh.d.ts +56 -0
- package/dist/vfs/ssh/ssh.d.ts.map +1 -0
- package/dist/vfs/ssh/ssh.js +161 -0
- package/dist/vfs/ssh/ssh.js.map +1 -0
- package/dist/vfs/supabase/config.d.ts +38 -0
- package/dist/vfs/supabase/config.d.ts.map +1 -0
- package/dist/vfs/supabase/config.js +63 -0
- package/dist/vfs/supabase/config.js.map +1 -0
- package/dist/vfs/supabase/prompt.d.ts +2 -0
- package/dist/vfs/supabase/prompt.d.ts.map +1 -0
- package/dist/vfs/supabase/prompt.js +19 -0
- package/dist/vfs/supabase/prompt.js.map +1 -0
- package/dist/vfs/supabase/supabase.d.ts +8 -0
- package/dist/vfs/supabase/supabase.d.ts.map +1 -0
- package/dist/vfs/supabase/supabase.js +24 -0
- package/dist/vfs/supabase/supabase.js.map +1 -0
- package/dist/vfs/tencent/config.d.ts.map +1 -0
- package/dist/vfs/tencent/config.js.map +1 -0
- package/dist/vfs/tencent/prompt.d.ts +2 -0
- package/dist/vfs/tencent/prompt.d.ts.map +1 -0
- package/dist/vfs/tencent/prompt.js +19 -0
- package/dist/vfs/tencent/prompt.js.map +1 -0
- package/dist/vfs/tencent/tencent.d.ts +8 -0
- package/dist/vfs/tencent/tencent.d.ts.map +1 -0
- package/dist/vfs/tencent/tencent.js +24 -0
- package/dist/vfs/tencent/tencent.js.map +1 -0
- package/dist/vfs/wasabi/config.d.ts +36 -0
- package/dist/vfs/wasabi/config.d.ts.map +1 -0
- package/dist/vfs/wasabi/config.js +60 -0
- package/dist/vfs/wasabi/config.js.map +1 -0
- package/dist/vfs/wasabi/prompt.d.ts +2 -0
- package/dist/vfs/wasabi/prompt.d.ts.map +1 -0
- package/dist/vfs/wasabi/prompt.js +19 -0
- package/dist/vfs/wasabi/prompt.js.map +1 -0
- package/dist/vfs/wasabi/wasabi.d.ts +8 -0
- package/dist/vfs/wasabi/wasabi.d.ts.map +1 -0
- package/dist/vfs/wasabi/wasabi.js +24 -0
- package/dist/vfs/wasabi/wasabi.js.map +1 -0
- package/dist/workspace/fuse.d.ts +28 -0
- package/dist/workspace/fuse.d.ts.map +1 -1
- package/dist/workspace/fuse.js +18 -20
- package/dist/workspace/fuse.js.map +1 -1
- package/dist/workspace/mount/namespace/disk.d.ts +26 -0
- package/dist/workspace/mount/namespace/disk.d.ts.map +1 -0
- package/dist/workspace/mount/namespace/disk.js +93 -0
- package/dist/workspace/mount/namespace/disk.js.map +1 -0
- package/dist/workspace/mount/namespace/redis.d.ts +27 -0
- package/dist/workspace/mount/namespace/redis.d.ts.map +1 -0
- package/dist/workspace/mount/namespace/redis.js +70 -0
- package/dist/workspace/mount/namespace/redis.js.map +1 -0
- package/dist/workspace/nfs.d.ts +29 -0
- package/dist/workspace/nfs.d.ts.map +1 -0
- package/dist/workspace/nfs.js +98 -0
- package/dist/workspace/nfs.js.map +1 -0
- package/dist/workspace/record/disk.d.ts +2 -2
- package/dist/workspace/record/disk.d.ts.map +1 -1
- package/dist/workspace/record/disk.js +16 -22
- package/dist/workspace/record/disk.js.map +1 -1
- package/dist/workspace/session/disk.d.ts +2 -11
- package/dist/workspace/session/disk.d.ts.map +1 -1
- package/dist/workspace/session/disk.js +3 -28
- package/dist/workspace/session/disk.js.map +1 -1
- package/dist/workspace/session/redis.d.ts +1 -2
- package/dist/workspace/session/redis.d.ts.map +1 -1
- package/dist/workspace/session/redis.js +10 -29
- package/dist/workspace/session/redis.js.map +1 -1
- package/dist/workspace/store/disk.d.ts +2 -1
- package/dist/workspace/store/disk.d.ts.map +1 -1
- package/dist/workspace/store/disk.js +19 -10
- package/dist/workspace/store/disk.js.map +1 -1
- package/dist/workspace/store/redis.d.ts +2 -3
- package/dist/workspace/store/redis.d.ts.map +1 -1
- package/dist/workspace/store/redis.js +15 -25
- package/dist/workspace/store/redis.js.map +1 -1
- package/dist/workspace/workspace/kernel_mounts.d.ts +7 -6
- package/dist/workspace/workspace/kernel_mounts.d.ts.map +1 -1
- package/dist/workspace/workspace/kernel_mounts.js +32 -15
- package/dist/workspace/workspace/kernel_mounts.js.map +1 -1
- package/dist/workspace.d.ts +15 -13
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +32 -29
- package/dist/workspace.js.map +1 -1
- package/package.json +13 -12
- package/dist/accessor/hf.d.ts +0 -38
- package/dist/accessor/hf.d.ts.map +0 -1
- package/dist/accessor/hf.js +0 -101
- package/dist/accessor/hf.js.map +0 -1
- package/dist/cache/file/add.lua +0 -16
- package/dist/commands/builtin/disk/index.d.ts +0 -3
- package/dist/commands/builtin/disk/index.d.ts.map +0 -1
- package/dist/commands/builtin/disk/index.js +0 -20
- package/dist/commands/builtin/disk/index.js.map +0 -1
- package/dist/commands/builtin/disk/io.d.ts +0 -4
- package/dist/commands/builtin/disk/io.d.ts.map +0 -1
- package/dist/commands/builtin/disk/io.js +0 -57
- package/dist/commands/builtin/disk/io.js.map +0 -1
- package/dist/commands/builtin/email/_provision.d.ts +0 -7
- package/dist/commands/builtin/email/_provision.d.ts.map +0 -1
- package/dist/commands/builtin/email/_provision.js +0 -42
- package/dist/commands/builtin/email/_provision.js.map +0 -1
- package/dist/commands/builtin/email/find.d.ts +0 -2
- package/dist/commands/builtin/email/find.d.ts.map +0 -1
- package/dist/commands/builtin/email/find.js +0 -51
- package/dist/commands/builtin/email/find.js.map +0 -1
- package/dist/commands/builtin/email/grep.d.ts +0 -4
- package/dist/commands/builtin/email/grep.d.ts.map +0 -1
- package/dist/commands/builtin/email/grep.js +0 -108
- package/dist/commands/builtin/email/grep.js.map +0 -1
- package/dist/commands/builtin/email/index.d.ts +0 -3
- package/dist/commands/builtin/email/index.d.ts.map +0 -1
- package/dist/commands/builtin/email/index.js +0 -31
- package/dist/commands/builtin/email/index.js.map +0 -1
- package/dist/commands/builtin/email/io.d.ts +0 -4
- package/dist/commands/builtin/email/io.d.ts.map +0 -1
- package/dist/commands/builtin/email/io.js +0 -28
- package/dist/commands/builtin/email/io.js.map +0 -1
- package/dist/commands/builtin/email/rg.d.ts +0 -2
- package/dist/commands/builtin/email/rg.d.ts.map +0 -1
- package/dist/commands/builtin/email/rg.js +0 -93
- package/dist/commands/builtin/email/rg.js.map +0 -1
- package/dist/commands/builtin/gridfs/index.d.ts +0 -3
- package/dist/commands/builtin/gridfs/index.d.ts.map +0 -1
- package/dist/commands/builtin/gridfs/index.js +0 -24
- package/dist/commands/builtin/gridfs/index.js.map +0 -1
- package/dist/commands/builtin/gridfs/io.d.ts +0 -4
- package/dist/commands/builtin/gridfs/io.d.ts.map +0 -1
- package/dist/commands/builtin/gridfs/io.js +0 -54
- package/dist/commands/builtin/gridfs/io.js.map +0 -1
- package/dist/commands/builtin/hf/find.d.ts +0 -2
- package/dist/commands/builtin/hf/find.d.ts.map +0 -1
- package/dist/commands/builtin/hf/find.js +0 -31
- package/dist/commands/builtin/hf/find.js.map +0 -1
- package/dist/commands/builtin/hf/index.d.ts +0 -3
- package/dist/commands/builtin/hf/index.d.ts.map +0 -1
- package/dist/commands/builtin/hf/index.js +0 -25
- package/dist/commands/builtin/hf/index.js.map +0 -1
- package/dist/commands/builtin/hf/io.d.ts +0 -4
- package/dist/commands/builtin/hf/io.d.ts.map +0 -1
- package/dist/commands/builtin/hf/io.js +0 -44
- package/dist/commands/builtin/hf/io.js.map +0 -1
- package/dist/commands/builtin/hf_hub/index.d.ts +0 -4
- package/dist/commands/builtin/hf_hub/index.d.ts.map +0 -1
- package/dist/commands/builtin/hf_hub/index.js +0 -30
- package/dist/commands/builtin/hf_hub/index.js.map +0 -1
- package/dist/commands/builtin/hf_hub/io.d.ts +0 -4
- package/dist/commands/builtin/hf_hub/io.d.ts.map +0 -1
- package/dist/commands/builtin/hf_hub/io.js +0 -54
- package/dist/commands/builtin/hf_hub/io.js.map +0 -1
- package/dist/commands/builtin/nextcloud/index.d.ts +0 -3
- package/dist/commands/builtin/nextcloud/index.d.ts.map +0 -1
- package/dist/commands/builtin/nextcloud/index.js +0 -7
- package/dist/commands/builtin/nextcloud/index.js.map +0 -1
- package/dist/commands/builtin/nextcloud/io.d.ts +0 -4
- package/dist/commands/builtin/nextcloud/io.d.ts.map +0 -1
- package/dist/commands/builtin/nextcloud/io.js +0 -41
- package/dist/commands/builtin/nextcloud/io.js.map +0 -1
- package/dist/commands/builtin/ssh/index.d.ts +0 -3
- package/dist/commands/builtin/ssh/index.d.ts.map +0 -1
- package/dist/commands/builtin/ssh/index.js +0 -20
- package/dist/commands/builtin/ssh/index.js.map +0 -1
- package/dist/commands/builtin/ssh/io.d.ts +0 -4
- package/dist/commands/builtin/ssh/io.d.ts.map +0 -1
- package/dist/commands/builtin/ssh/io.js +0 -58
- package/dist/commands/builtin/ssh/io.js.map +0 -1
- package/dist/commands/native_fixture.d.ts +0 -25
- package/dist/commands/native_fixture.d.ts.map +0 -1
- package/dist/commands/native_fixture.js +0 -186
- package/dist/commands/native_fixture.js.map +0 -1
- package/dist/core/disk/du/entries.d.ts +0 -4
- package/dist/core/disk/du/entries.d.ts.map +0 -1
- package/dist/core/disk/du/entries.js +0 -25
- package/dist/core/disk/du/entries.js.map +0 -1
- package/dist/core/disk/du/index.d.ts +0 -3
- package/dist/core/disk/du/index.d.ts.map +0 -1
- package/dist/core/disk/du/index.js +0 -16
- package/dist/core/disk/du/index.js.map +0 -1
- package/dist/core/disk/du/size.d.ts +0 -4
- package/dist/core/disk/du/size.d.ts.map +0 -1
- package/dist/core/disk/du/size.js +0 -21
- package/dist/core/disk/du/size.js.map +0 -1
- package/dist/core/disk/du/walk.d.ts +0 -4
- package/dist/core/disk/du/walk.d.ts.map +0 -1
- package/dist/core/disk/du/walk.js +0 -82
- package/dist/core/disk/du/walk.js.map +0 -1
- package/dist/core/disk/entry.d.ts +0 -11
- package/dist/core/disk/entry.d.ts.map +0 -1
- package/dist/core/disk/entry.js +0 -42
- package/dist/core/disk/entry.js.map +0 -1
- package/dist/core/disk/find.d.ts +0 -21
- package/dist/core/disk/find.d.ts.map +0 -1
- package/dist/core/disk/find.js +0 -143
- package/dist/core/disk/find.js.map +0 -1
- package/dist/core/disk/watch/constants.d.ts.map +0 -1
- package/dist/core/disk/watch/constants.js.map +0 -1
- package/dist/core/disk/watch/hook.d.ts +0 -54
- package/dist/core/disk/watch/hook.d.ts.map +0 -1
- package/dist/core/disk/watch/hook.js +0 -108
- package/dist/core/disk/watch/hook.js.map +0 -1
- package/dist/core/disk/watch/index.d.ts +0 -2
- package/dist/core/disk/watch/index.d.ts.map +0 -1
- package/dist/core/disk/watch/index.js +0 -15
- package/dist/core/disk/watch/index.js.map +0 -1
- package/dist/core/disk/watch/walk.d.ts +0 -22
- package/dist/core/disk/watch/walk.d.ts.map +0 -1
- package/dist/core/disk/watch/walk.js +0 -100
- package/dist/core/disk/watch/walk.js.map +0 -1
- package/dist/core/gridfs/du/entries.d.ts +0 -2
- package/dist/core/gridfs/du/entries.d.ts.map +0 -1
- package/dist/core/gridfs/du/entries.js +0 -17
- package/dist/core/gridfs/du/entries.js.map +0 -1
- package/dist/core/gridfs/du/index.d.ts +0 -3
- package/dist/core/gridfs/du/index.d.ts.map +0 -1
- package/dist/core/gridfs/du/index.js +0 -16
- package/dist/core/gridfs/du/index.js.map +0 -1
- package/dist/core/gridfs/du/size.d.ts +0 -2
- package/dist/core/gridfs/du/size.d.ts.map +0 -1
- package/dist/core/gridfs/du/size.js +0 -17
- package/dist/core/gridfs/du/size.js.map +0 -1
- package/dist/core/gridfs/find.d.ts +0 -2
- package/dist/core/gridfs/find.d.ts.map +0 -1
- package/dist/core/gridfs/find.js +0 -17
- package/dist/core/gridfs/find.js.map +0 -1
- package/dist/core/gridfs/watch.d.ts +0 -4
- package/dist/core/gridfs/watch.d.ts.map +0 -1
- package/dist/core/gridfs/watch.js +0 -68
- package/dist/core/gridfs/watch.js.map +0 -1
- package/dist/core/hf/constants.d.ts +0 -3
- package/dist/core/hf/constants.d.ts.map +0 -1
- package/dist/core/hf/constants.js +0 -16
- package/dist/core/hf/constants.js.map +0 -1
- package/dist/core/hf/create.d.ts +0 -2
- package/dist/core/hf/create.d.ts.map +0 -1
- package/dist/core/hf/create.js.map +0 -1
- package/dist/core/hf/driver.d.ts +0 -5
- package/dist/core/hf/driver.d.ts.map +0 -1
- package/dist/core/hf/driver.js +0 -222
- package/dist/core/hf/driver.js.map +0 -1
- package/dist/core/hf/du/entries.d.ts +0 -2
- package/dist/core/hf/du/entries.d.ts.map +0 -1
- package/dist/core/hf/du/entries.js +0 -17
- package/dist/core/hf/du/entries.js.map +0 -1
- package/dist/core/hf/du/index.d.ts +0 -3
- package/dist/core/hf/du/index.d.ts.map +0 -1
- package/dist/core/hf/du/index.js +0 -16
- package/dist/core/hf/du/index.js.map +0 -1
- package/dist/core/hf/du/size.d.ts +0 -2
- package/dist/core/hf/du/size.d.ts.map +0 -1
- package/dist/core/hf/du/size.js +0 -17
- package/dist/core/hf/du/size.js.map +0 -1
- package/dist/core/hf/exists.d.ts +0 -2
- package/dist/core/hf/exists.d.ts.map +0 -1
- package/dist/core/hf/exists.js.map +0 -1
- package/dist/core/hf/find.d.ts +0 -2
- package/dist/core/hf/find.d.ts.map +0 -1
- package/dist/core/hf/find.js +0 -17
- package/dist/core/hf/find.js.map +0 -1
- package/dist/core/hf/mkdir.d.ts +0 -2
- package/dist/core/hf/mkdir.d.ts.map +0 -1
- package/dist/core/hf/mkdir.js.map +0 -1
- package/dist/core/hf/mock.d.ts +0 -34
- package/dist/core/hf/mock.d.ts.map +0 -1
- package/dist/core/hf/mock.js +0 -147
- package/dist/core/hf/mock.js.map +0 -1
- package/dist/core/hf/read.d.ts +0 -9
- package/dist/core/hf/read.d.ts.map +0 -1
- package/dist/core/hf/read.js +0 -53
- package/dist/core/hf/read.js.map +0 -1
- package/dist/core/hf/readdir.d.ts +0 -2
- package/dist/core/hf/readdir.d.ts.map +0 -1
- package/dist/core/hf/readdir.js +0 -17
- package/dist/core/hf/readdir.js.map +0 -1
- package/dist/core/hf/rm.d.ts +0 -2
- package/dist/core/hf/rm.d.ts.map +0 -1
- package/dist/core/hf/rm.js.map +0 -1
- package/dist/core/hf/stat.d.ts +0 -2
- package/dist/core/hf/stat.d.ts.map +0 -1
- package/dist/core/hf/stat.js +0 -17
- package/dist/core/hf/stat.js.map +0 -1
- package/dist/core/hf/stream.d.ts +0 -6
- package/dist/core/hf/stream.d.ts.map +0 -1
- package/dist/core/hf/stream.js +0 -48
- package/dist/core/hf/stream.js.map +0 -1
- package/dist/core/hf/unlink.d.ts +0 -2
- package/dist/core/hf/unlink.d.ts.map +0 -1
- package/dist/core/hf/unlink.js.map +0 -1
- package/dist/core/hf/util.d.ts +0 -5
- package/dist/core/hf/util.d.ts.map +0 -1
- package/dist/core/hf/util.js +0 -30
- package/dist/core/hf/util.js.map +0 -1
- package/dist/core/hf/watch.d.ts +0 -12
- package/dist/core/hf/watch.d.ts.map +0 -1
- package/dist/core/hf/watch.js +0 -28
- package/dist/core/hf/watch.js.map +0 -1
- package/dist/core/hf/write.d.ts +0 -2
- package/dist/core/hf/write.d.ts.map +0 -1
- package/dist/core/hf/write.js +0 -17
- package/dist/core/hf/write.js.map +0 -1
- package/dist/core/hf_hub/watch.d.ts +0 -4
- package/dist/core/hf_hub/watch.d.ts.map +0 -1
- package/dist/core/hf_hub/watch.js +0 -63
- package/dist/core/hf_hub/watch.js.map +0 -1
- package/dist/core/nextcloud/du/entries.d.ts +0 -4
- package/dist/core/nextcloud/du/entries.d.ts.map +0 -1
- package/dist/core/nextcloud/du/entries.js +0 -36
- package/dist/core/nextcloud/du/entries.js.map +0 -1
- package/dist/core/nextcloud/du/index.d.ts +0 -3
- package/dist/core/nextcloud/du/index.d.ts.map +0 -1
- package/dist/core/nextcloud/du/index.js +0 -3
- package/dist/core/nextcloud/du/index.js.map +0 -1
- package/dist/core/nextcloud/du/size.d.ts +0 -4
- package/dist/core/nextcloud/du/size.d.ts.map +0 -1
- package/dist/core/nextcloud/du/size.js +0 -28
- package/dist/core/nextcloud/du/size.js.map +0 -1
- package/dist/core/nextcloud/du/walk.d.ts +0 -4
- package/dist/core/nextcloud/du/walk.d.ts.map +0 -1
- package/dist/core/nextcloud/du/walk.js +0 -12
- package/dist/core/nextcloud/du/walk.js.map +0 -1
- package/dist/core/nextcloud/find.d.ts +0 -5
- package/dist/core/nextcloud/find.d.ts.map +0 -1
- package/dist/core/nextcloud/find.js +0 -230
- package/dist/core/nextcloud/find.js.map +0 -1
- package/dist/core/nextcloud/mock.d.ts +0 -28
- package/dist/core/nextcloud/mock.d.ts.map +0 -1
- package/dist/core/nextcloud/mock.js +0 -117
- package/dist/core/nextcloud/mock.js.map +0 -1
- package/dist/core/nextcloud/watch.d.ts +0 -6
- package/dist/core/nextcloud/watch.d.ts.map +0 -1
- package/dist/core/nextcloud/watch.js +0 -22
- package/dist/core/nextcloud/watch.js.map +0 -1
- package/dist/core/opendal/types.d.ts +0 -5
- package/dist/core/opendal/types.d.ts.map +0 -1
- package/dist/core/opendal/types.js.map +0 -1
- package/dist/core/opendal/watch.d.ts +0 -23
- package/dist/core/opendal/watch.d.ts.map +0 -1
- package/dist/core/opendal/watch.js +0 -96
- package/dist/core/opendal/watch.js.map +0 -1
- package/dist/core/ssh/du/entries.d.ts +0 -4
- package/dist/core/ssh/du/entries.d.ts.map +0 -1
- package/dist/core/ssh/du/entries.js +0 -25
- package/dist/core/ssh/du/entries.js.map +0 -1
- package/dist/core/ssh/du/index.d.ts +0 -3
- package/dist/core/ssh/du/index.d.ts.map +0 -1
- package/dist/core/ssh/du/index.js +0 -16
- package/dist/core/ssh/du/index.js.map +0 -1
- package/dist/core/ssh/du/size.d.ts +0 -4
- package/dist/core/ssh/du/size.d.ts.map +0 -1
- package/dist/core/ssh/du/size.js +0 -20
- package/dist/core/ssh/du/size.js.map +0 -1
- package/dist/core/ssh/du/walk.d.ts +0 -4
- package/dist/core/ssh/du/walk.d.ts.map +0 -1
- package/dist/core/ssh/du/walk.js +0 -105
- package/dist/core/ssh/du/walk.js.map +0 -1
- package/dist/core/ssh/entry.d.ts +0 -11
- package/dist/core/ssh/entry.d.ts.map +0 -1
- package/dist/core/ssh/entry.js +0 -61
- package/dist/core/ssh/entry.js.map +0 -1
- package/dist/core/ssh/find.d.ts +0 -21
- package/dist/core/ssh/find.d.ts.map +0 -1
- package/dist/core/ssh/find.js +0 -139
- package/dist/core/ssh/find.js.map +0 -1
- package/dist/core/ssh/watch.d.ts +0 -4
- package/dist/core/ssh/watch.d.ts.map +0 -1
- package/dist/core/ssh/watch.js +0 -89
- package/dist/core/ssh/watch.js.map +0 -1
- package/dist/fs_monkey.d.ts +0 -11
- package/dist/fs_monkey.d.ts.map +0 -1
- package/dist/fs_monkey.js +0 -187
- package/dist/fs_monkey.js.map +0 -1
- package/dist/fuse/core.d.ts +0 -157
- package/dist/fuse/core.d.ts.map +0 -1
- package/dist/fuse/core.js +0 -478
- package/dist/fuse/core.js.map +0 -1
- package/dist/fuse/errors.d.ts +0 -31
- package/dist/fuse/errors.d.ts.map +0 -1
- package/dist/fuse/errors.js +0 -102
- package/dist/fuse/errors.js.map +0 -1
- package/dist/fuse/platform/macos.d.ts.map +0 -1
- package/dist/fuse/platform/macos.js.map +0 -1
- package/dist/ops/disk/index.d.ts +0 -3
- package/dist/ops/disk/index.d.ts.map +0 -1
- package/dist/ops/disk/index.js +0 -20
- package/dist/ops/disk/index.js.map +0 -1
- package/dist/ops/email/index.d.ts +0 -3
- package/dist/ops/email/index.d.ts.map +0 -1
- package/dist/ops/email/index.js +0 -18
- package/dist/ops/email/index.js.map +0 -1
- package/dist/ops/gridfs/index.d.ts +0 -3
- package/dist/ops/gridfs/index.d.ts.map +0 -1
- package/dist/ops/gridfs/index.js +0 -18
- package/dist/ops/gridfs/index.js.map +0 -1
- package/dist/ops/hf/index.d.ts +0 -3
- package/dist/ops/hf/index.d.ts.map +0 -1
- package/dist/ops/hf/index.js +0 -18
- package/dist/ops/hf/index.js.map +0 -1
- package/dist/ops/hf_hub/index.d.ts +0 -3
- package/dist/ops/hf_hub/index.d.ts.map +0 -1
- package/dist/ops/hf_hub/index.js +0 -18
- package/dist/ops/hf_hub/index.js.map +0 -1
- package/dist/ops/nextcloud/index.d.ts +0 -3
- package/dist/ops/nextcloud/index.d.ts.map +0 -1
- package/dist/ops/nextcloud/index.js +0 -5
- package/dist/ops/nextcloud/index.js.map +0 -1
- package/dist/ops/ssh/index.d.ts +0 -3
- package/dist/ops/ssh/index.d.ts.map +0 -1
- package/dist/ops/ssh/index.js +0 -20
- package/dist/ops/ssh/index.js.map +0 -1
- package/dist/resource/aliyun/aliyun.d.ts +0 -8
- package/dist/resource/aliyun/aliyun.d.ts.map +0 -1
- package/dist/resource/aliyun/aliyun.js +0 -24
- package/dist/resource/aliyun/aliyun.js.map +0 -1
- package/dist/resource/aliyun/config.d.ts.map +0 -1
- package/dist/resource/aliyun/config.js.map +0 -1
- package/dist/resource/aliyun/prompt.d.ts +0 -2
- package/dist/resource/aliyun/prompt.d.ts.map +0 -1
- package/dist/resource/aliyun/prompt.js +0 -19
- package/dist/resource/aliyun/prompt.js.map +0 -1
- package/dist/resource/backblaze/backblaze.d.ts +0 -8
- package/dist/resource/backblaze/backblaze.d.ts.map +0 -1
- package/dist/resource/backblaze/backblaze.js +0 -24
- package/dist/resource/backblaze/backblaze.js.map +0 -1
- package/dist/resource/backblaze/config.d.ts.map +0 -1
- package/dist/resource/backblaze/config.js.map +0 -1
- package/dist/resource/backblaze/prompt.d.ts +0 -2
- package/dist/resource/backblaze/prompt.d.ts.map +0 -1
- package/dist/resource/backblaze/prompt.js +0 -19
- package/dist/resource/backblaze/prompt.js.map +0 -1
- package/dist/resource/box/box.d.ts +0 -34
- package/dist/resource/box/box.d.ts.map +0 -1
- package/dist/resource/box/box.js +0 -99
- package/dist/resource/box/box.js.map +0 -1
- package/dist/resource/box/config.d.ts +0 -43
- package/dist/resource/box/config.d.ts.map +0 -1
- package/dist/resource/box/config.js +0 -39
- package/dist/resource/box/config.js.map +0 -1
- package/dist/resource/ceph/ceph.d.ts +0 -8
- package/dist/resource/ceph/ceph.d.ts.map +0 -1
- package/dist/resource/ceph/ceph.js +0 -24
- package/dist/resource/ceph/ceph.js.map +0 -1
- package/dist/resource/ceph/config.d.ts.map +0 -1
- package/dist/resource/ceph/config.js.map +0 -1
- package/dist/resource/ceph/prompt.d.ts +0 -2
- package/dist/resource/ceph/prompt.d.ts.map +0 -1
- package/dist/resource/ceph/prompt.js +0 -19
- package/dist/resource/ceph/prompt.js.map +0 -1
- package/dist/resource/databricks_volume/config.d.ts +0 -3
- package/dist/resource/databricks_volume/config.d.ts.map +0 -1
- package/dist/resource/databricks_volume/config.js +0 -15
- package/dist/resource/databricks_volume/config.js.map +0 -1
- package/dist/resource/databricks_volume/databricks_volume.d.ts +0 -45
- package/dist/resource/databricks_volume/databricks_volume.d.ts.map +0 -1
- package/dist/resource/databricks_volume/databricks_volume.js +0 -186
- package/dist/resource/databricks_volume/databricks_volume.js.map +0 -1
- package/dist/resource/databricks_volume/profile.d.ts +0 -7
- package/dist/resource/databricks_volume/profile.d.ts.map +0 -1
- package/dist/resource/databricks_volume/profile.js +0 -55
- package/dist/resource/databricks_volume/profile.js.map +0 -1
- package/dist/resource/digitalocean/config.d.ts.map +0 -1
- package/dist/resource/digitalocean/config.js.map +0 -1
- package/dist/resource/digitalocean/digitalocean.d.ts +0 -8
- package/dist/resource/digitalocean/digitalocean.d.ts.map +0 -1
- package/dist/resource/digitalocean/digitalocean.js +0 -24
- package/dist/resource/digitalocean/digitalocean.js.map +0 -1
- package/dist/resource/digitalocean/prompt.d.ts +0 -2
- package/dist/resource/digitalocean/prompt.d.ts.map +0 -1
- package/dist/resource/digitalocean/prompt.js +0 -19
- package/dist/resource/digitalocean/prompt.js.map +0 -1
- package/dist/resource/discord/discord.d.ts +0 -33
- package/dist/resource/discord/discord.d.ts.map +0 -1
- package/dist/resource/discord/discord.js +0 -87
- package/dist/resource/discord/discord.js.map +0 -1
- package/dist/resource/disk/disk.d.ts +0 -55
- package/dist/resource/disk/disk.d.ts.map +0 -1
- package/dist/resource/disk/disk.js +0 -218
- package/dist/resource/disk/disk.js.map +0 -1
- package/dist/resource/disk/prompt.d.ts +0 -2
- package/dist/resource/disk/prompt.d.ts.map +0 -1
- package/dist/resource/disk/prompt.js +0 -17
- package/dist/resource/disk/prompt.js.map +0 -1
- package/dist/resource/dropbox/config.d.ts +0 -34
- package/dist/resource/dropbox/config.d.ts.map +0 -1
- package/dist/resource/dropbox/config.js +0 -31
- package/dist/resource/dropbox/config.js.map +0 -1
- package/dist/resource/dropbox/dropbox.d.ts +0 -34
- package/dist/resource/dropbox/dropbox.d.ts.map +0 -1
- package/dist/resource/dropbox/dropbox.js +0 -95
- package/dist/resource/dropbox/dropbox.js.map +0 -1
- package/dist/resource/email/email.d.ts +0 -33
- package/dist/resource/email/email.d.ts.map +0 -1
- package/dist/resource/email/email.js +0 -89
- package/dist/resource/email/email.js.map +0 -1
- package/dist/resource/email/index.d.ts +0 -3
- package/dist/resource/email/index.d.ts.map +0 -1
- package/dist/resource/email/index.js +0 -16
- package/dist/resource/email/index.js.map +0 -1
- package/dist/resource/email/prompt.d.ts +0 -3
- package/dist/resource/email/prompt.d.ts.map +0 -1
- package/dist/resource/email/prompt.js +0 -26
- package/dist/resource/email/prompt.js.map +0 -1
- package/dist/resource/gcal/gcal.d.ts +0 -32
- package/dist/resource/gcal/gcal.d.ts.map +0 -1
- package/dist/resource/gcal/gcal.js +0 -87
- package/dist/resource/gcal/gcal.js.map +0 -1
- package/dist/resource/gcs/config.d.ts +0 -36
- package/dist/resource/gcs/config.d.ts.map +0 -1
- package/dist/resource/gcs/config.js +0 -55
- package/dist/resource/gcs/config.js.map +0 -1
- package/dist/resource/gcs/gcs.d.ts +0 -8
- package/dist/resource/gcs/gcs.d.ts.map +0 -1
- package/dist/resource/gcs/gcs.js +0 -24
- package/dist/resource/gcs/gcs.js.map +0 -1
- package/dist/resource/gcs/prompt.d.ts +0 -2
- package/dist/resource/gcs/prompt.d.ts.map +0 -1
- package/dist/resource/gcs/prompt.js +0 -19
- package/dist/resource/gcs/prompt.js.map +0 -1
- package/dist/resource/gdocs/gdocs.d.ts +0 -32
- package/dist/resource/gdocs/gdocs.d.ts.map +0 -1
- package/dist/resource/gdocs/gdocs.js +0 -84
- package/dist/resource/gdocs/gdocs.js.map +0 -1
- package/dist/resource/gdrive/gdrive.d.ts +0 -34
- package/dist/resource/gdrive/gdrive.d.ts.map +0 -1
- package/dist/resource/gdrive/gdrive.js +0 -89
- package/dist/resource/gdrive/gdrive.js.map +0 -1
- package/dist/resource/github/github.d.ts +0 -37
- package/dist/resource/github/github.d.ts.map +0 -1
- package/dist/resource/github/github.js +0 -119
- package/dist/resource/github/github.js.map +0 -1
- package/dist/resource/gmail/gmail.d.ts +0 -33
- package/dist/resource/gmail/gmail.d.ts.map +0 -1
- package/dist/resource/gmail/gmail.js +0 -88
- package/dist/resource/gmail/gmail.js.map +0 -1
- package/dist/resource/gridfs/config.d.ts +0 -20
- package/dist/resource/gridfs/config.d.ts.map +0 -1
- package/dist/resource/gridfs/config.js +0 -42
- package/dist/resource/gridfs/config.js.map +0 -1
- package/dist/resource/gridfs/gridfs.d.ts +0 -50
- package/dist/resource/gridfs/gridfs.d.ts.map +0 -1
- package/dist/resource/gridfs/gridfs.js +0 -190
- package/dist/resource/gridfs/gridfs.js.map +0 -1
- package/dist/resource/gridfs/prompt.d.ts +0 -2
- package/dist/resource/gridfs/prompt.d.ts.map +0 -1
- package/dist/resource/gridfs/prompt.js +0 -19
- package/dist/resource/gridfs/prompt.js.map +0 -1
- package/dist/resource/gsheets/gsheets.d.ts +0 -32
- package/dist/resource/gsheets/gsheets.d.ts.map +0 -1
- package/dist/resource/gsheets/gsheets.js +0 -84
- package/dist/resource/gsheets/gsheets.js.map +0 -1
- package/dist/resource/gslides/gslides.d.ts +0 -32
- package/dist/resource/gslides/gslides.d.ts.map +0 -1
- package/dist/resource/gslides/gslides.js +0 -84
- package/dist/resource/gslides/gslides.js.map +0 -1
- package/dist/resource/hf_buckets/base.d.ts +0 -34
- package/dist/resource/hf_buckets/base.d.ts.map +0 -1
- package/dist/resource/hf_buckets/base.js +0 -117
- package/dist/resource/hf_buckets/base.js.map +0 -1
- package/dist/resource/hf_buckets/config.d.ts +0 -58
- package/dist/resource/hf_buckets/config.d.ts.map +0 -1
- package/dist/resource/hf_buckets/config.js +0 -89
- package/dist/resource/hf_buckets/config.js.map +0 -1
- package/dist/resource/hf_buckets/hf_buckets.d.ts +0 -16
- package/dist/resource/hf_buckets/hf_buckets.d.ts.map +0 -1
- package/dist/resource/hf_buckets/hf_buckets.js +0 -46
- package/dist/resource/hf_buckets/hf_buckets.js.map +0 -1
- package/dist/resource/hf_buckets/prompt.d.ts +0 -2
- package/dist/resource/hf_buckets/prompt.d.ts.map +0 -1
- package/dist/resource/hf_buckets/prompt.js +0 -18
- package/dist/resource/hf_buckets/prompt.js.map +0 -1
- package/dist/resource/hf_datasets/hf_datasets.d.ts +0 -16
- package/dist/resource/hf_datasets/hf_datasets.d.ts.map +0 -1
- package/dist/resource/hf_datasets/hf_datasets.js +0 -46
- package/dist/resource/hf_datasets/hf_datasets.js.map +0 -1
- package/dist/resource/hf_datasets/prompt.d.ts +0 -2
- package/dist/resource/hf_datasets/prompt.d.ts.map +0 -1
- package/dist/resource/hf_datasets/prompt.js +0 -18
- package/dist/resource/hf_datasets/prompt.js.map +0 -1
- package/dist/resource/hf_hub/base.d.ts +0 -43
- package/dist/resource/hf_hub/base.d.ts.map +0 -1
- package/dist/resource/hf_hub/base.js +0 -111
- package/dist/resource/hf_hub/base.js.map +0 -1
- package/dist/resource/hf_models/config.d.ts.map +0 -1
- package/dist/resource/hf_models/config.js.map +0 -1
- package/dist/resource/hf_models/hf_models.d.ts +0 -16
- package/dist/resource/hf_models/hf_models.d.ts.map +0 -1
- package/dist/resource/hf_models/hf_models.js +0 -46
- package/dist/resource/hf_models/hf_models.js.map +0 -1
- package/dist/resource/hf_models/prompt.d.ts +0 -2
- package/dist/resource/hf_models/prompt.d.ts.map +0 -1
- package/dist/resource/hf_models/prompt.js +0 -18
- package/dist/resource/hf_models/prompt.js.map +0 -1
- package/dist/resource/hf_spaces/hf_spaces.d.ts +0 -16
- package/dist/resource/hf_spaces/hf_spaces.d.ts.map +0 -1
- package/dist/resource/hf_spaces/hf_spaces.js +0 -46
- package/dist/resource/hf_spaces/hf_spaces.js.map +0 -1
- package/dist/resource/hf_spaces/prompt.d.ts +0 -2
- package/dist/resource/hf_spaces/prompt.d.ts.map +0 -1
- package/dist/resource/hf_spaces/prompt.js +0 -18
- package/dist/resource/hf_spaces/prompt.js.map +0 -1
- package/dist/resource/jaeger/config.d.ts +0 -15
- package/dist/resource/jaeger/config.d.ts.map +0 -1
- package/dist/resource/jaeger/config.js +0 -28
- package/dist/resource/jaeger/config.js.map +0 -1
- package/dist/resource/jaeger/jaeger.d.ts +0 -32
- package/dist/resource/jaeger/jaeger.d.ts.map +0 -1
- package/dist/resource/jaeger/jaeger.js +0 -101
- package/dist/resource/jaeger/jaeger.js.map +0 -1
- package/dist/resource/lancedb/lancedb.d.ts +0 -37
- package/dist/resource/lancedb/lancedb.d.ts.map +0 -1
- package/dist/resource/lancedb/lancedb.js +0 -85
- package/dist/resource/lancedb/lancedb.js.map +0 -1
- package/dist/resource/lancedb/store.d.ts +0 -29
- package/dist/resource/lancedb/store.d.ts.map +0 -1
- package/dist/resource/lancedb/store.js +0 -159
- package/dist/resource/lancedb/store.js.map +0 -1
- package/dist/resource/langfuse/config.d.ts +0 -16
- package/dist/resource/langfuse/config.d.ts.map +0 -1
- package/dist/resource/langfuse/config.js +0 -29
- package/dist/resource/langfuse/config.js.map +0 -1
- package/dist/resource/langfuse/langfuse.d.ts +0 -31
- package/dist/resource/langfuse/langfuse.d.ts.map +0 -1
- package/dist/resource/langfuse/langfuse.js +0 -98
- package/dist/resource/langfuse/langfuse.js.map +0 -1
- package/dist/resource/linear/linear.d.ts +0 -33
- package/dist/resource/linear/linear.d.ts.map +0 -1
- package/dist/resource/linear/linear.js +0 -93
- package/dist/resource/linear/linear.js.map +0 -1
- package/dist/resource/loader.d.ts.map +0 -1
- package/dist/resource/loader.js.map +0 -1
- package/dist/resource/minio/config.d.ts.map +0 -1
- package/dist/resource/minio/config.js.map +0 -1
- package/dist/resource/minio/minio.d.ts +0 -8
- package/dist/resource/minio/minio.d.ts.map +0 -1
- package/dist/resource/minio/minio.js +0 -24
- package/dist/resource/minio/minio.js.map +0 -1
- package/dist/resource/minio/prompt.d.ts +0 -2
- package/dist/resource/minio/prompt.d.ts.map +0 -1
- package/dist/resource/minio/prompt.js +0 -19
- package/dist/resource/minio/prompt.js.map +0 -1
- package/dist/resource/mongodb/mongodb.d.ts +0 -39
- package/dist/resource/mongodb/mongodb.d.ts.map +0 -1
- package/dist/resource/mongodb/mongodb.js +0 -100
- package/dist/resource/mongodb/mongodb.js.map +0 -1
- package/dist/resource/mongodb/store.d.ts +0 -71
- package/dist/resource/mongodb/store.d.ts.map +0 -1
- package/dist/resource/mongodb/store.js +0 -148
- package/dist/resource/mongodb/store.js.map +0 -1
- package/dist/resource/nextcloud/config.d.ts +0 -14
- package/dist/resource/nextcloud/config.d.ts.map +0 -1
- package/dist/resource/nextcloud/config.js +0 -17
- package/dist/resource/nextcloud/config.js.map +0 -1
- package/dist/resource/nextcloud/nextcloud.d.ts +0 -48
- package/dist/resource/nextcloud/nextcloud.d.ts.map +0 -1
- package/dist/resource/nextcloud/nextcloud.js +0 -157
- package/dist/resource/nextcloud/nextcloud.js.map +0 -1
- package/dist/resource/nextcloud/prompt.d.ts +0 -2
- package/dist/resource/nextcloud/prompt.d.ts.map +0 -1
- package/dist/resource/nextcloud/prompt.js +0 -2
- package/dist/resource/nextcloud/prompt.js.map +0 -1
- package/dist/resource/notion/notion.d.ts +0 -32
- package/dist/resource/notion/notion.d.ts.map +0 -1
- package/dist/resource/notion/notion.js +0 -90
- package/dist/resource/notion/notion.js.map +0 -1
- package/dist/resource/oci/config.d.ts +0 -37
- package/dist/resource/oci/config.d.ts.map +0 -1
- package/dist/resource/oci/config.js +0 -60
- package/dist/resource/oci/config.js.map +0 -1
- package/dist/resource/oci/oci.d.ts +0 -8
- package/dist/resource/oci/oci.d.ts.map +0 -1
- package/dist/resource/oci/oci.js +0 -24
- package/dist/resource/oci/oci.js.map +0 -1
- package/dist/resource/oci/prompt.d.ts +0 -2
- package/dist/resource/oci/prompt.d.ts.map +0 -1
- package/dist/resource/oci/prompt.js +0 -19
- package/dist/resource/oci/prompt.js.map +0 -1
- package/dist/resource/postgres/postgres.d.ts +0 -39
- package/dist/resource/postgres/postgres.d.ts.map +0 -1
- package/dist/resource/postgres/postgres.js +0 -98
- package/dist/resource/postgres/postgres.js.map +0 -1
- package/dist/resource/postgres/store.d.ts +0 -21
- package/dist/resource/postgres/store.d.ts.map +0 -1
- package/dist/resource/postgres/store.js +0 -53
- package/dist/resource/postgres/store.js.map +0 -1
- package/dist/resource/qingstor/config.d.ts.map +0 -1
- package/dist/resource/qingstor/config.js.map +0 -1
- package/dist/resource/qingstor/prompt.d.ts +0 -2
- package/dist/resource/qingstor/prompt.d.ts.map +0 -1
- package/dist/resource/qingstor/prompt.js +0 -19
- package/dist/resource/qingstor/prompt.js.map +0 -1
- package/dist/resource/qingstor/qingstor.d.ts +0 -8
- package/dist/resource/qingstor/qingstor.d.ts.map +0 -1
- package/dist/resource/qingstor/qingstor.js +0 -24
- package/dist/resource/qingstor/qingstor.js.map +0 -1
- package/dist/resource/r2/config.d.ts +0 -37
- package/dist/resource/r2/config.d.ts.map +0 -1
- package/dist/resource/r2/config.js +0 -63
- package/dist/resource/r2/config.js.map +0 -1
- package/dist/resource/r2/prompt.d.ts +0 -2
- package/dist/resource/r2/prompt.d.ts.map +0 -1
- package/dist/resource/r2/prompt.js +0 -19
- package/dist/resource/r2/prompt.js.map +0 -1
- package/dist/resource/r2/r2.d.ts +0 -8
- package/dist/resource/r2/r2.d.ts.map +0 -1
- package/dist/resource/r2/r2.js +0 -24
- package/dist/resource/r2/r2.js.map +0 -1
- package/dist/resource/redis/redis.d.ts +0 -30
- package/dist/resource/redis/redis.d.ts.map +0 -1
- package/dist/resource/redis/redis.js +0 -37
- package/dist/resource/redis/redis.js.map +0 -1
- package/dist/resource/redis/store.d.ts +0 -63
- package/dist/resource/redis/store.d.ts.map +0 -1
- package/dist/resource/redis/store.js +0 -246
- package/dist/resource/redis/store.js.map +0 -1
- package/dist/resource/registry.d.ts +0 -42
- package/dist/resource/registry.d.ts.map +0 -1
- package/dist/resource/registry.js +0 -410
- package/dist/resource/registry.js.map +0 -1
- package/dist/resource/s3/config.d.ts +0 -36
- package/dist/resource/s3/config.d.ts.map +0 -1
- package/dist/resource/s3/config.js +0 -61
- package/dist/resource/s3/config.js.map +0 -1
- package/dist/resource/s3/mock.d.ts +0 -17
- package/dist/resource/s3/mock.d.ts.map +0 -1
- package/dist/resource/s3/mock.js +0 -214
- package/dist/resource/s3/mock.js.map +0 -1
- package/dist/resource/s3/s3.d.ts +0 -50
- package/dist/resource/s3/s3.d.ts.map +0 -1
- package/dist/resource/s3/s3.js +0 -201
- package/dist/resource/s3/s3.js.map +0 -1
- package/dist/resource/s3_alias.d.ts +0 -112
- package/dist/resource/s3_alias.d.ts.map +0 -1
- package/dist/resource/s3_alias.js +0 -155
- package/dist/resource/s3_alias.js.map +0 -1
- package/dist/resource/scaleway/config.d.ts.map +0 -1
- package/dist/resource/scaleway/config.js.map +0 -1
- package/dist/resource/scaleway/prompt.d.ts +0 -2
- package/dist/resource/scaleway/prompt.d.ts.map +0 -1
- package/dist/resource/scaleway/prompt.js +0 -19
- package/dist/resource/scaleway/prompt.js.map +0 -1
- package/dist/resource/scaleway/scaleway.d.ts +0 -8
- package/dist/resource/scaleway/scaleway.d.ts.map +0 -1
- package/dist/resource/scaleway/scaleway.js +0 -24
- package/dist/resource/scaleway/scaleway.js.map +0 -1
- package/dist/resource/seaweedfs/config.d.ts.map +0 -1
- package/dist/resource/seaweedfs/config.js.map +0 -1
- package/dist/resource/seaweedfs/prompt.d.ts +0 -2
- package/dist/resource/seaweedfs/prompt.d.ts.map +0 -1
- package/dist/resource/seaweedfs/prompt.js +0 -19
- package/dist/resource/seaweedfs/prompt.js.map +0 -1
- package/dist/resource/seaweedfs/seaweedfs.d.ts +0 -8
- package/dist/resource/seaweedfs/seaweedfs.d.ts.map +0 -1
- package/dist/resource/seaweedfs/seaweedfs.js +0 -24
- package/dist/resource/seaweedfs/seaweedfs.js.map +0 -1
- package/dist/resource/slack/slack.d.ts +0 -33
- package/dist/resource/slack/slack.d.ts.map +0 -1
- package/dist/resource/slack/slack.js +0 -88
- package/dist/resource/slack/slack.js.map +0 -1
- package/dist/resource/ssh/config.d.ts +0 -20
- package/dist/resource/ssh/config.d.ts.map +0 -1
- package/dist/resource/ssh/config.js +0 -33
- package/dist/resource/ssh/config.js.map +0 -1
- package/dist/resource/ssh/prompt.d.ts +0 -2
- package/dist/resource/ssh/prompt.d.ts.map +0 -1
- package/dist/resource/ssh/prompt.js +0 -18
- package/dist/resource/ssh/prompt.js.map +0 -1
- package/dist/resource/ssh/ssh.d.ts +0 -51
- package/dist/resource/ssh/ssh.d.ts.map +0 -1
- package/dist/resource/ssh/ssh.js +0 -169
- package/dist/resource/ssh/ssh.js.map +0 -1
- package/dist/resource/supabase/config.d.ts +0 -38
- package/dist/resource/supabase/config.d.ts.map +0 -1
- package/dist/resource/supabase/config.js +0 -63
- package/dist/resource/supabase/config.js.map +0 -1
- package/dist/resource/supabase/prompt.d.ts +0 -2
- package/dist/resource/supabase/prompt.d.ts.map +0 -1
- package/dist/resource/supabase/prompt.js +0 -19
- package/dist/resource/supabase/prompt.js.map +0 -1
- package/dist/resource/supabase/supabase.d.ts +0 -8
- package/dist/resource/supabase/supabase.d.ts.map +0 -1
- package/dist/resource/supabase/supabase.js +0 -24
- package/dist/resource/supabase/supabase.js.map +0 -1
- package/dist/resource/tencent/config.d.ts.map +0 -1
- package/dist/resource/tencent/config.js.map +0 -1
- package/dist/resource/tencent/prompt.d.ts +0 -2
- package/dist/resource/tencent/prompt.d.ts.map +0 -1
- package/dist/resource/tencent/prompt.js +0 -19
- package/dist/resource/tencent/prompt.js.map +0 -1
- package/dist/resource/tencent/tencent.d.ts +0 -8
- package/dist/resource/tencent/tencent.d.ts.map +0 -1
- package/dist/resource/tencent/tencent.js +0 -24
- package/dist/resource/tencent/tencent.js.map +0 -1
- package/dist/resource/trello/config.d.ts +0 -15
- package/dist/resource/trello/config.d.ts.map +0 -1
- package/dist/resource/trello/config.js +0 -28
- package/dist/resource/trello/config.js.map +0 -1
- package/dist/resource/trello/trello.d.ts +0 -32
- package/dist/resource/trello/trello.d.ts.map +0 -1
- package/dist/resource/trello/trello.js +0 -94
- package/dist/resource/trello/trello.js.map +0 -1
- package/dist/resource/wasabi/config.d.ts +0 -36
- package/dist/resource/wasabi/config.d.ts.map +0 -1
- package/dist/resource/wasabi/config.js +0 -60
- package/dist/resource/wasabi/config.js.map +0 -1
- package/dist/resource/wasabi/prompt.d.ts +0 -2
- package/dist/resource/wasabi/prompt.d.ts.map +0 -1
- package/dist/resource/wasabi/prompt.js +0 -19
- package/dist/resource/wasabi/prompt.js.map +0 -1
- package/dist/resource/wasabi/wasabi.d.ts +0 -8
- package/dist/resource/wasabi/wasabi.d.ts.map +0 -1
- package/dist/resource/wasabi/wasabi.js +0 -24
- package/dist/resource/wasabi/wasabi.js.map +0 -1
- package/dist/runtime/python/local.d.ts +0 -25
- package/dist/runtime/python/local.d.ts.map +0 -1
- package/dist/runtime/python/local.js +0 -105
- package/dist/runtime/python/local.js.map +0 -1
- package/dist/runtime/sandbox/e2b/config.d.ts +0 -2
- package/dist/runtime/sandbox/e2b/config.d.ts.map +0 -1
- package/dist/runtime/sandbox/e2b/config.js +0 -15
- package/dist/runtime/sandbox/e2b/config.js.map +0 -1
- package/dist/runtime/sandbox/e2b/runtime.d.ts +0 -2
- package/dist/runtime/sandbox/e2b/runtime.d.ts.map +0 -1
- package/dist/runtime/sandbox/e2b/runtime.js +0 -15
- package/dist/runtime/sandbox/e2b/runtime.js.map +0 -1
- package/dist/test-utils.d.ts +0 -11
- package/dist/test-utils.d.ts.map +0 -1
- package/dist/test-utils.js +0 -38
- package/dist/test-utils.js.map +0 -1
- package/dist/workspace/namespace/disk.d.ts +0 -28
- package/dist/workspace/namespace/disk.d.ts.map +0 -1
- package/dist/workspace/namespace/disk.js +0 -110
- package/dist/workspace/namespace/disk.js.map +0 -1
- package/dist/workspace/namespace/redis.d.ts +0 -31
- package/dist/workspace/namespace/redis.d.ts.map +0 -1
- package/dist/workspace/namespace/redis.js +0 -99
- package/dist/workspace/namespace/redis.js.map +0 -1
- /package/dist/core/disk/{watch → events}/constants.d.ts +0 -0
- /package/dist/core/disk/{watch → events}/constants.js +0 -0
- /package/dist/core/{hf → hf_buckets}/create.js +0 -0
- /package/dist/core/{hf → hf_buckets}/exists.js +0 -0
- /package/dist/core/{hf → hf_buckets}/mkdir.js +0 -0
- /package/dist/core/{hf → hf_buckets}/rm.js +0 -0
- /package/dist/core/{hf → hf_buckets}/unlink.js +0 -0
- /package/dist/{fuse → mount}/platform/macos.d.ts +0 -0
- /package/dist/{fuse → mount}/platform/macos.js +0 -0
- /package/dist/{core/opendal → mount}/types.js +0 -0
- /package/dist/{resource → utils}/loader.d.ts +0 -0
- /package/dist/{resource → utils}/loader.js +0 -0
- /package/dist/{resource → vfs}/aliyun/config.d.ts +0 -0
- /package/dist/{resource → vfs}/aliyun/config.js +0 -0
- /package/dist/{resource → vfs}/backblaze/config.d.ts +0 -0
- /package/dist/{resource → vfs}/backblaze/config.js +0 -0
- /package/dist/{resource → vfs}/ceph/config.d.ts +0 -0
- /package/dist/{resource → vfs}/ceph/config.js +0 -0
- /package/dist/{resource → vfs}/digitalocean/config.d.ts +0 -0
- /package/dist/{resource → vfs}/digitalocean/config.js +0 -0
- /package/dist/{resource → vfs}/hf_models/config.d.ts +0 -0
- /package/dist/{resource → vfs}/hf_models/config.js +0 -0
- /package/dist/{resource → vfs}/minio/config.d.ts +0 -0
- /package/dist/{resource → vfs}/minio/config.js +0 -0
- /package/dist/{resource → vfs}/qingstor/config.d.ts +0 -0
- /package/dist/{resource → vfs}/qingstor/config.js +0 -0
- /package/dist/{resource → vfs}/scaleway/config.d.ts +0 -0
- /package/dist/{resource → vfs}/scaleway/config.js +0 -0
- /package/dist/{resource → vfs}/seaweedfs/config.d.ts +0 -0
- /package/dist/{resource → vfs}/seaweedfs/config.js +0 -0
- /package/dist/{resource → vfs}/tencent/config.d.ts +0 -0
- /package/dist/{resource → vfs}/tencent/config.js +0 -0
|
@@ -0,0 +1,978 @@
|
|
|
1
|
+
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
|
14
|
+
import { Buffer } from 'node:buffer';
|
|
15
|
+
import { constants } from 'node:fs';
|
|
16
|
+
import { createRequire } from 'node:module';
|
|
17
|
+
import { posix } from 'node:path';
|
|
18
|
+
import { fileURLToPath } from 'node:url';
|
|
19
|
+
import { classify } from '@struktoai/mirage-core/errors/classify';
|
|
20
|
+
import { ebadf, einval, isMissingPath } from '@struktoai/mirage-core/errors/fs';
|
|
21
|
+
import { posixErrno, posixPhrase } from '@struktoai/mirage-core/errors/posix';
|
|
22
|
+
import { workspaceBridge } from '@struktoai/mirage-core/runtime/binding';
|
|
23
|
+
import { RuntimeFiles } from '@struktoai/mirage-core/runtime/files';
|
|
24
|
+
import { posixStat } from '@struktoai/mirage-core/runtime/stat';
|
|
25
|
+
import { PrefixResolver } from '@struktoai/mirage-core/runtime/resolver';
|
|
26
|
+
import { MountMode } from '@struktoai/mirage-core/types';
|
|
27
|
+
import { entryName } from '@struktoai/mirage-core/utils/remnants';
|
|
28
|
+
import { DESCRIPTOR_CALLS, LISTENED_CALLS, PATH_ARGS, REFUSED_CALLS, ROUTED_CALLS, } from "./constants.js";
|
|
29
|
+
import { Descriptors, openFlags, readAt, readOn } from "./descriptors.js";
|
|
30
|
+
const fs = createRequire(import.meta.url)('node:fs');
|
|
31
|
+
const { S_IFMT, S_IFREG, S_IFDIR, S_IFCHR, S_IFLNK, W_OK, X_OK, COPYFILE_EXCL } = constants;
|
|
32
|
+
/** `path` as a string a mount could serve, or null: a descriptor and a
|
|
33
|
+
* Buffer are host spellings no mount uses. */
|
|
34
|
+
function spelled(path) {
|
|
35
|
+
if (typeof path === 'string')
|
|
36
|
+
return path;
|
|
37
|
+
if (path instanceof URL && path.protocol === 'file:')
|
|
38
|
+
return fileURLToPath(path);
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
/** A stamp in nanoseconds, as node's BigIntStats spells one. */
|
|
42
|
+
function ns(date) {
|
|
43
|
+
return BigInt(date.getTime()) * 1000000n;
|
|
44
|
+
}
|
|
45
|
+
/** A refusal spelled the way node's own fs spells an error. */
|
|
46
|
+
function refusal(condition, syscall, path) {
|
|
47
|
+
const err = new Error(`${condition}: ${posixPhrase(condition).toLowerCase()}, ${syscall} '${path}'`);
|
|
48
|
+
err.code = condition;
|
|
49
|
+
err.errno = -posixErrno(condition);
|
|
50
|
+
err.syscall = syscall;
|
|
51
|
+
err.path = path;
|
|
52
|
+
return err;
|
|
53
|
+
}
|
|
54
|
+
function fsError(error, syscall, path) {
|
|
55
|
+
const condition = classify(error);
|
|
56
|
+
if (condition === null)
|
|
57
|
+
return error instanceof Error ? error : new Error(String(error), { cause: error });
|
|
58
|
+
const converted = refusal(condition, syscall, path ?? '');
|
|
59
|
+
if (path === undefined) {
|
|
60
|
+
converted.message = `${condition}: ${posixPhrase(condition).toLowerCase()}, ${syscall}`;
|
|
61
|
+
delete converted.path;
|
|
62
|
+
}
|
|
63
|
+
return Object.assign(converted, { cause: error });
|
|
64
|
+
}
|
|
65
|
+
function syncRefusal(name, path) {
|
|
66
|
+
const err = refusal('ENOTSUP', name, path);
|
|
67
|
+
err.message = `mirage.patchNodeFs: sync fs methods not supported on a mounted path; use fs.promises.${name.replace(/Sync$/, '')} ('${path}')`;
|
|
68
|
+
return err;
|
|
69
|
+
}
|
|
70
|
+
/** An options argument's fields; node takes null, a number (a mode)
|
|
71
|
+
* and a string (an encoding) there too, which name none of them. */
|
|
72
|
+
function fieldsOf(options) {
|
|
73
|
+
return typeof options === 'object' && options !== null ? options : {};
|
|
74
|
+
}
|
|
75
|
+
function encodingOf(options) {
|
|
76
|
+
if (typeof options === 'string')
|
|
77
|
+
return options;
|
|
78
|
+
return (fieldsOf(options).encoding ?? undefined);
|
|
79
|
+
}
|
|
80
|
+
function bytesOf(data, options) {
|
|
81
|
+
if (typeof data === 'string')
|
|
82
|
+
return Buffer.from(data, encodingOf(options) ?? 'utf8');
|
|
83
|
+
if (ArrayBuffer.isView(data))
|
|
84
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
85
|
+
throw new TypeError('mirage.patchNodeFs: data must be a string or an ArrayBufferView');
|
|
86
|
+
}
|
|
87
|
+
/** An async iterator whose first read throws `err`: the shape node's
|
|
88
|
+
* `fs.promises.glob` and `watch` answer in, failures included. */
|
|
89
|
+
function refusedIterator(err) {
|
|
90
|
+
return {
|
|
91
|
+
next: () => Promise.reject(err),
|
|
92
|
+
[Symbol.asyncIterator]() {
|
|
93
|
+
return this;
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** A time argument (seconds, a numeric string, a Date) as the ISO stamp
|
|
98
|
+
* setattr stores. */
|
|
99
|
+
function stampOf(time) {
|
|
100
|
+
const ms = time instanceof Date ? time.getTime() : Number(time) * 1000;
|
|
101
|
+
return new Date(ms).toISOString();
|
|
102
|
+
}
|
|
103
|
+
/** Refuse an integer argument outside `[min, max]` as node does. */
|
|
104
|
+
function checkRange(name, value, max, min = 0) {
|
|
105
|
+
if (!Number.isInteger(value) || value < min || value > max) {
|
|
106
|
+
throw Object.assign(new RangeError(`The value of "${name}" is out of range. It must be >= ${String(min)} && <= ${String(max)}. Received ${String(value)}`), { code: 'ERR_OUT_OF_RANGE' });
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/** A read's buffer, where in it to put the bytes, how many to read and
|
|
110
|
+
* from where, out of any of node's read spellings: `(buffer, offset,
|
|
111
|
+
* length, position)`, `(buffer, options)`, `(options)` or nothing, then
|
|
112
|
+
* the caller's own buffer object, which node hands back. A null position
|
|
113
|
+
* reads at the descriptor's position and advances it. */
|
|
114
|
+
function readArgs(args) {
|
|
115
|
+
const [first, ...rest] = args;
|
|
116
|
+
const view = ArrayBuffer.isView(first);
|
|
117
|
+
const options = fieldsOf((view ? rest[0] : first));
|
|
118
|
+
const given = view ? first : options.buffer;
|
|
119
|
+
const original = ArrayBuffer.isView(given) ? given : Buffer.alloc(16384);
|
|
120
|
+
const buffer = new Uint8Array(original.buffer, original.byteOffset, original.byteLength);
|
|
121
|
+
const positional = view && typeof rest[0] !== 'object';
|
|
122
|
+
const offset = Number((positional ? rest[0] : options.offset) ?? 0);
|
|
123
|
+
const length = Number((positional ? rest[1] : options.length) ?? buffer.byteLength - offset);
|
|
124
|
+
const position = (positional ? rest[2] : options.position);
|
|
125
|
+
checkRange('offset', offset, buffer.length);
|
|
126
|
+
checkRange('length', length, buffer.length - offset);
|
|
127
|
+
if (typeof position === 'number' || typeof position === 'bigint')
|
|
128
|
+
checkRange('position', Number(position), Number.MAX_SAFE_INTEGER, -1);
|
|
129
|
+
return [buffer, offset, length, positionOf(position), original];
|
|
130
|
+
}
|
|
131
|
+
/** A write's bytes and where they go, out of node's write spellings:
|
|
132
|
+
* `(buffer, offset, length, position)`, `(buffer, options)` and
|
|
133
|
+
* `(string, position, encoding)`. */
|
|
134
|
+
function writeArgs(data, rest) {
|
|
135
|
+
if (typeof data === 'string') {
|
|
136
|
+
const encoding = (typeof rest[1] === 'string' ? rest[1] : 'utf8');
|
|
137
|
+
return [Buffer.from(data, encoding), positionOf(rest[0])];
|
|
138
|
+
}
|
|
139
|
+
const bytes = bytesOf(data, null);
|
|
140
|
+
const options = typeof rest[0] === 'object' ? fieldsOf(rest[0]) : null;
|
|
141
|
+
const offset = Number((options === null ? rest[0] : options.offset) ?? 0);
|
|
142
|
+
const length = Number((options === null ? rest[1] : options.length) ?? bytes.byteLength - offset);
|
|
143
|
+
const position = (options === null ? rest[2] : options.position);
|
|
144
|
+
return [bytes.subarray(offset, offset + length), positionOf(position)];
|
|
145
|
+
}
|
|
146
|
+
// The routed calls that take a descriptor or a FileHandle in the path
|
|
147
|
+
// slot as well as a path.
|
|
148
|
+
const FILE_CALLS = new Set(['appendFile', 'readFile', 'writeFile']);
|
|
149
|
+
/** Answer a node callback from a promise of what follows its error slot. */
|
|
150
|
+
function answer(work, done) {
|
|
151
|
+
work.then((values) => {
|
|
152
|
+
done(null, ...values);
|
|
153
|
+
}, (err) => {
|
|
154
|
+
done(err);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/** A position argument as an offset, or null for "at the position": node
|
|
158
|
+
* reads anything but a number there (`fs.write(fd, 'x', 'utf8', cb)`'s
|
|
159
|
+
* encoding included) and a negative one as the descriptor's position. */
|
|
160
|
+
function positionOf(position) {
|
|
161
|
+
if (typeof position !== 'number' && typeof position !== 'bigint')
|
|
162
|
+
return null;
|
|
163
|
+
const at = Number(position);
|
|
164
|
+
return Number.isNaN(at) || at < 0 ? null : at;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The `FileHandle` `fs.promises.open` answers a mounted path with: node's
|
|
168
|
+
* own methods over a descriptor of the patch's, whose writes land at
|
|
169
|
+
* `close` or `sync`. It holds the descriptor it opened, not just its
|
|
170
|
+
* number: once that is closed, here or through `fs.close`, every call is
|
|
171
|
+
* EBADF, even after a later open takes the number.
|
|
172
|
+
*/
|
|
173
|
+
class MountedFileHandle {
|
|
174
|
+
host;
|
|
175
|
+
fd;
|
|
176
|
+
desc;
|
|
177
|
+
closed = false;
|
|
178
|
+
constructor(host, fd, desc) {
|
|
179
|
+
this.host = host;
|
|
180
|
+
this.fd = fd;
|
|
181
|
+
this.desc = desc;
|
|
182
|
+
}
|
|
183
|
+
/** Whether the descriptor this handle opened is still open. */
|
|
184
|
+
live() {
|
|
185
|
+
return (!this.closed && this.desc !== undefined && this.host.descriptors.get(this.fd) === this.desc);
|
|
186
|
+
}
|
|
187
|
+
/** A descriptor call on this handle's descriptor; EBADF once it closed. */
|
|
188
|
+
call(name, ...args) {
|
|
189
|
+
if (!this.live())
|
|
190
|
+
return Promise.reject(fsError(ebadf(String(this.fd)), name));
|
|
191
|
+
return this.host.descriptorCall(name, [this.fd, ...args]);
|
|
192
|
+
}
|
|
193
|
+
async read(...args) {
|
|
194
|
+
const [bytesRead, buffer] = await this.call('read', ...args);
|
|
195
|
+
return { bytesRead: bytesRead, buffer };
|
|
196
|
+
}
|
|
197
|
+
async readv(buffers, position) {
|
|
198
|
+
const [bytesRead] = await this.call('readv', buffers, position);
|
|
199
|
+
return { bytesRead: bytesRead, buffers };
|
|
200
|
+
}
|
|
201
|
+
async write(...args) {
|
|
202
|
+
const [bytesWritten, buffer] = await this.call('write', ...args);
|
|
203
|
+
return { bytesWritten: bytesWritten, buffer };
|
|
204
|
+
}
|
|
205
|
+
async writev(buffers, position) {
|
|
206
|
+
const [bytesWritten] = await this.call('writev', buffers, position);
|
|
207
|
+
return { bytesWritten: bytesWritten, buffers };
|
|
208
|
+
}
|
|
209
|
+
readFile(options) {
|
|
210
|
+
return this.host.fileCall('readFile', this, [options]);
|
|
211
|
+
}
|
|
212
|
+
async writeFile(data, options) {
|
|
213
|
+
await this.host.fileCall('writeFile', this, [data, options]);
|
|
214
|
+
}
|
|
215
|
+
appendFile(data, options) {
|
|
216
|
+
return this.writeFile(data, options);
|
|
217
|
+
}
|
|
218
|
+
async stat(options) {
|
|
219
|
+
return (await this.call('fstat', options))[0];
|
|
220
|
+
}
|
|
221
|
+
async truncate(len = 0) {
|
|
222
|
+
await this.call('ftruncate', len);
|
|
223
|
+
}
|
|
224
|
+
async sync() {
|
|
225
|
+
await this.call('fsync');
|
|
226
|
+
}
|
|
227
|
+
async datasync() {
|
|
228
|
+
await this.call('fdatasync');
|
|
229
|
+
}
|
|
230
|
+
async chmod(mode) {
|
|
231
|
+
await this.call('fchmod', mode);
|
|
232
|
+
}
|
|
233
|
+
async chown(uid, gid) {
|
|
234
|
+
await this.call('fchown', uid, gid);
|
|
235
|
+
}
|
|
236
|
+
async utimes(atime, mtime) {
|
|
237
|
+
await this.call('futimes', atime, mtime);
|
|
238
|
+
}
|
|
239
|
+
async close() {
|
|
240
|
+
const live = this.live();
|
|
241
|
+
this.closed = true;
|
|
242
|
+
if (live)
|
|
243
|
+
await this.host.descriptorCall('close', [this.fd]);
|
|
244
|
+
}
|
|
245
|
+
[Symbol.asyncDispose]() {
|
|
246
|
+
return this.close();
|
|
247
|
+
}
|
|
248
|
+
// node's streams call back through `fs.read`, `fs.write` and `fs.close`,
|
|
249
|
+
// which the patch answers for this descriptor.
|
|
250
|
+
createReadStream(options) {
|
|
251
|
+
if (!this.live())
|
|
252
|
+
throw ebadf(String(this.fd));
|
|
253
|
+
return fs.createReadStream(null, { ...fieldsOf(options), fd: this.fd });
|
|
254
|
+
}
|
|
255
|
+
createWriteStream(options) {
|
|
256
|
+
if (!this.live())
|
|
257
|
+
throw ebadf(String(this.fd));
|
|
258
|
+
return fs.createWriteStream(null, { ...fieldsOf(options), fd: this.fd });
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Every routed fs call, answered on a mount: python's `HostFs` for
|
|
263
|
+
* node. One method per name in `ROUTED_CALLS`, each taking the call's
|
|
264
|
+
* own arguments with its path arguments already spelled as strings. The
|
|
265
|
+
* calls ride `RuntimeFiles` over `ws.vfs.dispatch`, so they run as the
|
|
266
|
+
* facade's session and land on `ws.vfs.records`. A call with one end on
|
|
267
|
+
* a mount and the other on the host reaches the host through `native`,
|
|
268
|
+
* node's own functions as they were before the patch.
|
|
269
|
+
*/
|
|
270
|
+
class HostFs {
|
|
271
|
+
ws;
|
|
272
|
+
native;
|
|
273
|
+
files;
|
|
274
|
+
// The descriptors `open` hands out for mounted paths (descriptors.ts).
|
|
275
|
+
descriptors;
|
|
276
|
+
// One stamp for the patch's life, the choice python's HostFs makes: a
|
|
277
|
+
// backend that reports no mtime would otherwise answer a new time on
|
|
278
|
+
// every stat, and "did it change?" heuristics fire on that.
|
|
279
|
+
born = Date.now();
|
|
280
|
+
constructor(ws, native) {
|
|
281
|
+
this.ws = ws;
|
|
282
|
+
this.native = native;
|
|
283
|
+
this.files = new RuntimeFiles(workspaceBridge(async (name, path, args, kwargs) => {
|
|
284
|
+
try {
|
|
285
|
+
const [value] = await ws.vfs.dispatch(name, path, args, kwargs);
|
|
286
|
+
return value;
|
|
287
|
+
}
|
|
288
|
+
catch (err) {
|
|
289
|
+
if (classify(err) !== null)
|
|
290
|
+
throw err;
|
|
291
|
+
// An op that fails with no condition (an upstream 502 a REST
|
|
292
|
+
// mount throws as it came) answers EIO, the kernel's word for a
|
|
293
|
+
// device that failed, as a guest's file adapter does; the original
|
|
294
|
+
// rides along as the cause.
|
|
295
|
+
throw Object.assign(refusal('EIO', name, path), { cause: err });
|
|
296
|
+
}
|
|
297
|
+
}), new PrefixResolver(() => [], (directory) => ws.namespace.linkNamesUnder(directory)));
|
|
298
|
+
this.descriptors = new Descriptors(this.files, native, ws.namespace);
|
|
299
|
+
}
|
|
300
|
+
/** Whether `path` is under a mount the patch answers for. The synthetic
|
|
301
|
+
* root anchor matches every path but backs no files, so a path only it
|
|
302
|
+
* catches stays on the host; a mount the caller put at `/` is honored.
|
|
303
|
+
* A relative path names the process's working directory, which stays
|
|
304
|
+
* node's whatever is mounted, and a `Buffer` spelling is the host's,
|
|
305
|
+
* as a bytes path is on the python entry point. */
|
|
306
|
+
mounted(path) {
|
|
307
|
+
if (typeof path !== 'string' || !path.startsWith('/'))
|
|
308
|
+
return false;
|
|
309
|
+
const mount = this.ws.registry.tryMountFor(path);
|
|
310
|
+
if (mount === null)
|
|
311
|
+
return false;
|
|
312
|
+
return !(this.ws.syntheticRoot && mount === this.ws.registry.rootMount);
|
|
313
|
+
}
|
|
314
|
+
statsOf(path, st, options, unlinked = false) {
|
|
315
|
+
// The stat every runtime shares; an owner the row lacks is this
|
|
316
|
+
// process's own.
|
|
317
|
+
const posix = posixStat(st, path, this.ws.registry.tryMountFor(path)?.prefix ?? '/', {
|
|
318
|
+
uid: process.getuid?.() ?? 0,
|
|
319
|
+
gid: process.getgid?.() ?? 0,
|
|
320
|
+
unknownMs: this.born,
|
|
321
|
+
});
|
|
322
|
+
const kind = posix.mode & S_IFMT;
|
|
323
|
+
const mtime = new Date(posix.mtimeMs);
|
|
324
|
+
const atime = new Date(posix.atimeMs);
|
|
325
|
+
const kinds = {
|
|
326
|
+
isFile: () => kind === S_IFREG,
|
|
327
|
+
isDirectory: () => kind === S_IFDIR,
|
|
328
|
+
isBlockDevice: () => false,
|
|
329
|
+
isCharacterDevice: () => kind === S_IFCHR,
|
|
330
|
+
isSymbolicLink: () => kind === S_IFLNK,
|
|
331
|
+
isFIFO: () => false,
|
|
332
|
+
isSocket: () => false,
|
|
333
|
+
};
|
|
334
|
+
const dates = { atime, mtime, ctime: mtime, birthtime: mtime };
|
|
335
|
+
const fields = {
|
|
336
|
+
dev: posix.dev,
|
|
337
|
+
ino: posix.ino,
|
|
338
|
+
mode: posix.mode,
|
|
339
|
+
nlink: unlinked ? 0 : posix.nlink,
|
|
340
|
+
uid: posix.uid,
|
|
341
|
+
gid: posix.gid,
|
|
342
|
+
rdev: posix.rdev,
|
|
343
|
+
size: posix.size,
|
|
344
|
+
blksize: posix.blksize,
|
|
345
|
+
blocks: posix.blocks,
|
|
346
|
+
atimeMs: posix.atimeMs,
|
|
347
|
+
mtimeMs: posix.mtimeMs,
|
|
348
|
+
ctimeMs: posix.ctimeMs,
|
|
349
|
+
birthtimeMs: posix.mtimeMs,
|
|
350
|
+
};
|
|
351
|
+
if (fieldsOf(options).bigint !== true)
|
|
352
|
+
return { ...kinds, ...fields, ...dates };
|
|
353
|
+
// node's BigIntStats: every number a bigint, plus the stamps in ns.
|
|
354
|
+
const big = Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, BigInt(Math.trunc(v))]));
|
|
355
|
+
return {
|
|
356
|
+
...kinds,
|
|
357
|
+
...big,
|
|
358
|
+
atimeNs: ns(atime),
|
|
359
|
+
mtimeNs: ns(mtime),
|
|
360
|
+
ctimeNs: ns(mtime),
|
|
361
|
+
birthtimeNs: ns(mtime),
|
|
362
|
+
...dates,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
direntOf(directory, row) {
|
|
366
|
+
const kind = row.isLink === true ? S_IFLNK : row.isDir ? S_IFDIR : (row.mode ?? 0) & S_IFMT;
|
|
367
|
+
return {
|
|
368
|
+
name: entryName(row.path),
|
|
369
|
+
parentPath: directory,
|
|
370
|
+
path: directory,
|
|
371
|
+
isFile: () => kind === S_IFREG,
|
|
372
|
+
isDirectory: () => kind === S_IFDIR,
|
|
373
|
+
isBlockDevice: () => false,
|
|
374
|
+
isCharacterDevice: () => kind === S_IFCHR,
|
|
375
|
+
isSymbolicLink: () => kind === S_IFLNK,
|
|
376
|
+
isFIFO: () => false,
|
|
377
|
+
isSocket: () => false,
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
nativeCall(name, ...args) {
|
|
381
|
+
return this.native.promises[name](...args);
|
|
382
|
+
}
|
|
383
|
+
async access(path, mode = 0) {
|
|
384
|
+
const st = await this.files.stat(path);
|
|
385
|
+
// Write is the mount's mode, mirage's access control; a session's own
|
|
386
|
+
// narrower grant answers when the write happens, as POSIX leaves
|
|
387
|
+
// access(2) advisory. Execute is the one question the bits answer.
|
|
388
|
+
if (mode & W_OK && this.ws.registry.tryMountFor(path)?.mode === MountMode.READ) {
|
|
389
|
+
throw refusal('EACCES', 'access', path);
|
|
390
|
+
}
|
|
391
|
+
if (mode & X_OK && (st.mode & 0o111) === 0)
|
|
392
|
+
throw refusal('EACCES', 'access', path);
|
|
393
|
+
}
|
|
394
|
+
async appendFile(path, data, options) {
|
|
395
|
+
await this.put(path, data, options, 'a');
|
|
396
|
+
}
|
|
397
|
+
async chmod(path, mode) {
|
|
398
|
+
await this.files.setattr(path, { mode: typeof mode === 'string' ? parseInt(mode, 8) : mode });
|
|
399
|
+
}
|
|
400
|
+
async lchmod(path, mode) {
|
|
401
|
+
const bits = typeof mode === 'string' ? parseInt(mode, 8) : mode;
|
|
402
|
+
await this.files.setattr(path, { mode: bits, nofollow: true });
|
|
403
|
+
}
|
|
404
|
+
async chown(path, uid, gid, nofollow = false) {
|
|
405
|
+
// -1 is POSIX's "leave this one alone"; passing it on would store it.
|
|
406
|
+
const attrs = nofollow ? { nofollow: true } : {};
|
|
407
|
+
if (uid !== -1)
|
|
408
|
+
attrs.uid = uid;
|
|
409
|
+
if (gid !== -1)
|
|
410
|
+
attrs.gid = gid;
|
|
411
|
+
await this.files.setattr(path, attrs);
|
|
412
|
+
}
|
|
413
|
+
async lchown(path, uid, gid) {
|
|
414
|
+
await this.chown(path, uid, gid, true);
|
|
415
|
+
}
|
|
416
|
+
async copyFile(src, dst, mode = 0) {
|
|
417
|
+
// The stored bytes, as cp copies them: a rendering is what a read
|
|
418
|
+
// shows, not what the file holds.
|
|
419
|
+
const data = this.mounted(src)
|
|
420
|
+
? await this.files.read(src, { raw: true })
|
|
421
|
+
: await this.nativeCall('readFile', src);
|
|
422
|
+
const exclusive = (mode & COPYFILE_EXCL) !== 0;
|
|
423
|
+
if (!this.mounted(dst)) {
|
|
424
|
+
// O_EXCL on the host: the write itself refuses a name already
|
|
425
|
+
// there, a dangling link included.
|
|
426
|
+
await this.nativeCall('writeFile', dst, data, exclusive ? { flag: 'wx' } : undefined);
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
// A mount has no exclusive create, so the name is looked up as `wx`
|
|
430
|
+
// looks it up, the link itself rather than its target.
|
|
431
|
+
if (exclusive && (await this.files.statOrNull(dst, true)) !== null) {
|
|
432
|
+
throw refusal('EEXIST', 'copyfile', dst);
|
|
433
|
+
}
|
|
434
|
+
await this.files.write(dst, data);
|
|
435
|
+
}
|
|
436
|
+
async exists(path) {
|
|
437
|
+
if (!this.mounted(path)) {
|
|
438
|
+
return this.nativeCall('access', path).then(() => true, (err) => {
|
|
439
|
+
console.debug(`exists: ${String(err)}`);
|
|
440
|
+
return false;
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
// exists answers a boolean for any failure, as node's does.
|
|
444
|
+
try {
|
|
445
|
+
return (await this.files.statOrNull(path)) !== null;
|
|
446
|
+
}
|
|
447
|
+
catch (err) {
|
|
448
|
+
console.debug(`exists: ${path}: ${String(err)}`);
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
async lstat(path, options) {
|
|
453
|
+
return this.statsOf(path, await this.files.stat(path, true), options);
|
|
454
|
+
}
|
|
455
|
+
async lutimes(path, atime, mtime) {
|
|
456
|
+
await this.files.setattr(path, { atime: stampOf(atime), mtime: stampOf(mtime), nofollow: true });
|
|
457
|
+
}
|
|
458
|
+
async mkdir(path, options) {
|
|
459
|
+
if (fieldsOf(options).recursive !== true) {
|
|
460
|
+
await this.files.mkdir(path);
|
|
461
|
+
return undefined;
|
|
462
|
+
}
|
|
463
|
+
// Each missing ancestor in turn, stopping at the mount root, as
|
|
464
|
+
// python's makedirs does: a backend's mkdir is one level, and the
|
|
465
|
+
// mount root is the deployment's own and refused (EBUSY).
|
|
466
|
+
const root = (this.ws.registry.tryMountFor(path)?.prefix ?? '/').replace(/\/$/, '');
|
|
467
|
+
const missing = [];
|
|
468
|
+
for (let probe = path.replace(/\/$/, ''); probe !== '' && probe !== '/' && probe !== root;) {
|
|
469
|
+
const st = await this.files.statOrNull(probe);
|
|
470
|
+
if (st !== null) {
|
|
471
|
+
if (!st.isDir)
|
|
472
|
+
throw refusal('ENOTDIR', 'mkdir', probe);
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
missing.push(probe);
|
|
476
|
+
probe = posix.dirname(probe);
|
|
477
|
+
}
|
|
478
|
+
// node answers the first directory it made, undefined for none.
|
|
479
|
+
missing.reverse();
|
|
480
|
+
for (const dir of missing)
|
|
481
|
+
await this.files.mkdir(dir);
|
|
482
|
+
return missing[0];
|
|
483
|
+
}
|
|
484
|
+
async readFile(path, options) {
|
|
485
|
+
const bytes = Buffer.from(await this.files.read(path));
|
|
486
|
+
const encoding = encodingOf(options);
|
|
487
|
+
return encoding === undefined ? bytes : bytes.toString(encoding);
|
|
488
|
+
}
|
|
489
|
+
async readdir(path, options) {
|
|
490
|
+
const typed = fieldsOf(options).withFileTypes === true;
|
|
491
|
+
const recursive = fieldsOf(options).recursive === true;
|
|
492
|
+
const out = [];
|
|
493
|
+
const walk = async (directory, prefix) => {
|
|
494
|
+
for (const row of await this.files.readdir(directory, typed || recursive)) {
|
|
495
|
+
const name = entryName(row.path);
|
|
496
|
+
out.push(typed ? this.direntOf(directory, row) : prefix + name);
|
|
497
|
+
if (recursive && row.isDir && row.isLink !== true) {
|
|
498
|
+
await walk(posix.join(directory, name), `${prefix}${name}/`);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
await walk(path, '');
|
|
503
|
+
return out;
|
|
504
|
+
}
|
|
505
|
+
async readlink(path, options) {
|
|
506
|
+
const target = await this.files.readlink(path);
|
|
507
|
+
const encoding = encodingOf(options);
|
|
508
|
+
if (encoding === undefined || encoding === 'utf8')
|
|
509
|
+
return target;
|
|
510
|
+
const bytes = Buffer.from(target);
|
|
511
|
+
return encoding === 'buffer' ? bytes : bytes.toString(encoding);
|
|
512
|
+
}
|
|
513
|
+
async rename(src, dst) {
|
|
514
|
+
// A move between a mount and the host is EXDEV, the kernel's answer
|
|
515
|
+
// for two filesystems and the errno a mover retries as copy + delete.
|
|
516
|
+
if (!this.mounted(src) || !this.mounted(dst))
|
|
517
|
+
throw refusal('EXDEV', 'rename', src);
|
|
518
|
+
// Both ends as the walk names them before the rename, which may move a
|
|
519
|
+
// link the walk takes. A rename onto its own name changes nothing, its
|
|
520
|
+
// descriptors included.
|
|
521
|
+
const from = this.descriptors.walked(src, false);
|
|
522
|
+
const to = this.descriptors.walked(dst, false);
|
|
523
|
+
const held = from === to ? [] : await this.descriptors.hold(dst);
|
|
524
|
+
await this.files.rename(src, dst);
|
|
525
|
+
this.descriptors.keep(held);
|
|
526
|
+
this.descriptors.moved(from, to);
|
|
527
|
+
}
|
|
528
|
+
/** Remove a file, the descriptors open on it keeping the bytes it had. */
|
|
529
|
+
async removeFile(path) {
|
|
530
|
+
const held = await this.descriptors.hold(path);
|
|
531
|
+
await this.files.unlink(path);
|
|
532
|
+
this.descriptors.keep(held);
|
|
533
|
+
}
|
|
534
|
+
async rm(path, options) {
|
|
535
|
+
const force = fieldsOf(options).force === true;
|
|
536
|
+
const recursive = fieldsOf(options).recursive === true;
|
|
537
|
+
// A mount root is refused however it is spelled (`/data/.`), before
|
|
538
|
+
// the stat a backend may answer for that spelling or not.
|
|
539
|
+
if (this.ws.registry.isMountRoot(posix.normalize(path)))
|
|
540
|
+
throw refusal('EBUSY', 'rm', path);
|
|
541
|
+
let st;
|
|
542
|
+
try {
|
|
543
|
+
st = await this.files.stat(path, true);
|
|
544
|
+
}
|
|
545
|
+
catch (err) {
|
|
546
|
+
if (!force || !isMissingPath(err))
|
|
547
|
+
throw err;
|
|
548
|
+
console.debug(`rm: ${path} is already gone: ${String(err)}`);
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
if (!st.isDir) {
|
|
552
|
+
await this.removeFile(path);
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (!recursive)
|
|
556
|
+
throw refusal('EISDIR', 'rm', path);
|
|
557
|
+
const doomed = [];
|
|
558
|
+
await this.plan(path, true, doomed, path, this.ws.namespace.follow(path));
|
|
559
|
+
// A name another writer removed since the plan is already gone, as
|
|
560
|
+
// node's own recursive rm counts it.
|
|
561
|
+
for (const [name, isDir, where] of doomed) {
|
|
562
|
+
this.held(posix.dirname(name), posix.dirname(where));
|
|
563
|
+
try {
|
|
564
|
+
if (isDir)
|
|
565
|
+
await this.files.rmdir(name);
|
|
566
|
+
else
|
|
567
|
+
await this.removeFile(name);
|
|
568
|
+
}
|
|
569
|
+
catch (err) {
|
|
570
|
+
if (!isMissingPath(err) || name === path)
|
|
571
|
+
throw err;
|
|
572
|
+
console.debug(`rm: ${name} went before its turn: ${String(err)}`);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
/** Every name under `path` onto `out`, children before their directory,
|
|
577
|
+
* each with where it resolved when planned. The whole tree is planned
|
|
578
|
+
* before anything goes, as the agent adapters plan it, so a mount root
|
|
579
|
+
* anywhere in it refuses the call with nothing removed. */
|
|
580
|
+
async plan(path, isDir, out, top, where) {
|
|
581
|
+
if (this.ws.registry.isMountRoot(posix.normalize(path)))
|
|
582
|
+
throw refusal('EBUSY', 'rm', path);
|
|
583
|
+
if (isDir) {
|
|
584
|
+
this.held(path, where);
|
|
585
|
+
let rows;
|
|
586
|
+
try {
|
|
587
|
+
rows = await this.files.readdir(path);
|
|
588
|
+
}
|
|
589
|
+
catch (err) {
|
|
590
|
+
if (!isMissingPath(err) || path === top)
|
|
591
|
+
throw err;
|
|
592
|
+
console.debug(`rm: ${path} went while the tree was planned: ${String(err)}`);
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
for (const row of rows) {
|
|
596
|
+
const name = entryName(row.path);
|
|
597
|
+
const isChildDir = row.isDir && row.isLink !== true;
|
|
598
|
+
await this.plan(posix.join(path, name), isChildDir, out, top, posix.join(where, name));
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
out.push([path, isDir, where]);
|
|
602
|
+
}
|
|
603
|
+
/** Refuse to act in `directory` once it resolves elsewhere than `where`,
|
|
604
|
+
* where the plan found it: swapped for a link, or under an ancestor
|
|
605
|
+
* that was, a name in it would reach the link's target. A name is all
|
|
606
|
+
* a mount gives, so this check stands in for the descriptor a host
|
|
607
|
+
* walk would hold. */
|
|
608
|
+
held(directory, where) {
|
|
609
|
+
if (posix.normalize(this.ws.namespace.follow(directory)) !== posix.normalize(where)) {
|
|
610
|
+
throw refusal('ELOOP', 'rm', directory);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
async rmdir(path) {
|
|
614
|
+
// rmdir(2) on a mount point is EBUSY. A mount root is the
|
|
615
|
+
// deployment's own, which the shell's rm refuses the same way.
|
|
616
|
+
if (this.ws.registry.isMountRoot(posix.normalize(path))) {
|
|
617
|
+
throw refusal('EBUSY', 'rmdir', path);
|
|
618
|
+
}
|
|
619
|
+
await this.files.rmdir(path);
|
|
620
|
+
}
|
|
621
|
+
async stat(path, options) {
|
|
622
|
+
return this.statsOf(path, await this.files.stat(path), options);
|
|
623
|
+
}
|
|
624
|
+
async symlink(target, path) {
|
|
625
|
+
await this.files.symlink(path, String(target));
|
|
626
|
+
}
|
|
627
|
+
async truncate(path, length = 0) {
|
|
628
|
+
// truncate(2) names a file that is there; the op creates a missing
|
|
629
|
+
// one, as GNU truncate does without -c.
|
|
630
|
+
await this.files.stat(path);
|
|
631
|
+
await this.descriptors.landPath(path);
|
|
632
|
+
await this.files.truncate(path, length);
|
|
633
|
+
}
|
|
634
|
+
async unlink(path) {
|
|
635
|
+
await this.removeFile(path);
|
|
636
|
+
}
|
|
637
|
+
async utimes(path, atime, mtime) {
|
|
638
|
+
// Writes a descriptor still owes land first, or landing them at its
|
|
639
|
+
// close would stamp over the times set here.
|
|
640
|
+
await this.descriptors.landPath(path);
|
|
641
|
+
await this.files.setattr(path, { atime: stampOf(atime), mtime: stampOf(mtime) });
|
|
642
|
+
}
|
|
643
|
+
async writeFile(path, data, options) {
|
|
644
|
+
await this.put(path, data, options, 'w');
|
|
645
|
+
}
|
|
646
|
+
/** readFile, writeFile or appendFile given a mounted descriptor or
|
|
647
|
+
* FileHandle: from and at its position, as node's are on a descriptor. */
|
|
648
|
+
async fileCall(name, target, rest) {
|
|
649
|
+
if (target instanceof MountedFileHandle && !target.live())
|
|
650
|
+
throw ebadf(String(target.fd));
|
|
651
|
+
const fd = target instanceof MountedFileHandle ? target.fd : target;
|
|
652
|
+
if (name === 'readFile') {
|
|
653
|
+
const read = () => readOn(this.descriptors.file(fd, true, false), -1);
|
|
654
|
+
const bytes = Buffer.from(await this.descriptors.serial(fd, read));
|
|
655
|
+
const encoding = encodingOf(rest[0]);
|
|
656
|
+
return encoding === undefined ? bytes : bytes.toString(encoding);
|
|
657
|
+
}
|
|
658
|
+
await this.fdWrite(fd, bytesOf(rest[0], rest[1]), null);
|
|
659
|
+
return undefined;
|
|
660
|
+
}
|
|
661
|
+
/** A mounted path's `FileHandle`, as `fs.promises.open` answers. */
|
|
662
|
+
async open(path, flags) {
|
|
663
|
+
try {
|
|
664
|
+
const fd = await this.descriptors.open(path, openFlags(flags));
|
|
665
|
+
return new MountedFileHandle(this, fd, this.descriptors.get(fd));
|
|
666
|
+
}
|
|
667
|
+
catch (error) {
|
|
668
|
+
throw fsError(error, 'open', path);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
/** A read into `buffer` at `offset`, at `position` or, when null, at the
|
|
672
|
+
* descriptor's own position, advancing it. The caller holds its queue. */
|
|
673
|
+
async readInto(fd, buffer, offset, length, position) {
|
|
674
|
+
const handle = this.descriptors.file(fd, true, false);
|
|
675
|
+
const bytes = position === null ? await readOn(handle, length) : await readAt(handle, position, length);
|
|
676
|
+
buffer.set(bytes, offset);
|
|
677
|
+
return bytes.byteLength;
|
|
678
|
+
}
|
|
679
|
+
/** A write through a mounted descriptor, in its turn on the descriptor. */
|
|
680
|
+
fdWrite(fd, bytes, position) {
|
|
681
|
+
return this.descriptors.serial(fd, () => {
|
|
682
|
+
const handle = this.descriptors.file(fd, false, true);
|
|
683
|
+
// Linux appends a positioned write on an O_APPEND descriptor,
|
|
684
|
+
// whatever the position, and leaves the position where it was.
|
|
685
|
+
if (position === null)
|
|
686
|
+
handle.write(bytes.slice());
|
|
687
|
+
else
|
|
688
|
+
handle.pwrite(handle.append ? handle.size : position, bytes.slice());
|
|
689
|
+
return Promise.resolve(bytes.byteLength);
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
/** A descriptor call on a mounted descriptor, answered with what node's
|
|
693
|
+
* callback gets after its error slot. */
|
|
694
|
+
async descriptorCall(name, args) {
|
|
695
|
+
try {
|
|
696
|
+
const fd = args[0];
|
|
697
|
+
const rest = args.slice(1);
|
|
698
|
+
const desc = this.descriptors.get(fd);
|
|
699
|
+
if (desc === undefined)
|
|
700
|
+
throw ebadf(String(fd));
|
|
701
|
+
switch (name) {
|
|
702
|
+
case 'read': {
|
|
703
|
+
const [buffer, offset, length, position, original] = readArgs(rest);
|
|
704
|
+
const read = () => this.readInto(fd, buffer, offset, length, position);
|
|
705
|
+
return [await this.descriptors.serial(fd, read), original];
|
|
706
|
+
}
|
|
707
|
+
case 'write': {
|
|
708
|
+
const [bytes, position] = writeArgs(rest[0], rest.slice(1));
|
|
709
|
+
return [await this.fdWrite(fd, bytes, position), rest[0]];
|
|
710
|
+
}
|
|
711
|
+
case 'readv':
|
|
712
|
+
return await this.descriptors.serial(fd, async () => {
|
|
713
|
+
const buffers = rest[0];
|
|
714
|
+
let at = positionOf(rest[1]);
|
|
715
|
+
let total = 0;
|
|
716
|
+
for (const buffer of buffers) {
|
|
717
|
+
const got = await this.readInto(fd, buffer, 0, buffer.byteLength, at);
|
|
718
|
+
total += got;
|
|
719
|
+
if (at !== null)
|
|
720
|
+
at += got;
|
|
721
|
+
if (got < buffer.byteLength)
|
|
722
|
+
break;
|
|
723
|
+
}
|
|
724
|
+
return [total, buffers];
|
|
725
|
+
});
|
|
726
|
+
case 'writev': {
|
|
727
|
+
const buffers = rest[0];
|
|
728
|
+
const position = positionOf(rest[1]);
|
|
729
|
+
const joined = Buffer.concat(buffers.map((b) => bytesOf(b, null)));
|
|
730
|
+
return [await this.fdWrite(fd, joined, position), buffers];
|
|
731
|
+
}
|
|
732
|
+
case 'fstat': {
|
|
733
|
+
const st = desc.kept !== null && desc.stat !== null ? desc.stat : await this.files.stat(desc.path);
|
|
734
|
+
const size = desc.handle?.size ?? st.size;
|
|
735
|
+
return [
|
|
736
|
+
this.statsOf(desc.opened, { ...st, size }, rest[0], desc.kept !== null),
|
|
737
|
+
];
|
|
738
|
+
}
|
|
739
|
+
case 'ftruncate':
|
|
740
|
+
if (!desc.mode.writable)
|
|
741
|
+
throw einval(desc.path);
|
|
742
|
+
await this.descriptors.serial(fd, () => {
|
|
743
|
+
this.descriptors.file(fd, false, true).truncate(Math.max(0, Number(rest[0] ?? 0)));
|
|
744
|
+
return Promise.resolve();
|
|
745
|
+
});
|
|
746
|
+
return [];
|
|
747
|
+
case 'fsync':
|
|
748
|
+
case 'fdatasync':
|
|
749
|
+
await this.descriptors.serial(fd, () => this.descriptors.land(desc));
|
|
750
|
+
return [];
|
|
751
|
+
case 'close':
|
|
752
|
+
await this.descriptors.close(fd);
|
|
753
|
+
return [];
|
|
754
|
+
case 'fchmod':
|
|
755
|
+
await this.chmod(desc.path, rest[0]);
|
|
756
|
+
return [];
|
|
757
|
+
case 'fchown':
|
|
758
|
+
await this.chown(desc.path, rest[0], rest[1]);
|
|
759
|
+
return [];
|
|
760
|
+
case 'futimes':
|
|
761
|
+
await this.utimes(desc.path, rest[0], rest[1]);
|
|
762
|
+
return [];
|
|
763
|
+
default:
|
|
764
|
+
throw new TypeError(`mirage.patchNodeFs: ${name} is not a descriptor call`);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
catch (error) {
|
|
768
|
+
throw fsError(error, name);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
/** writeFile and appendFile, which differ only in the flag they default
|
|
772
|
+
* to. An exclusive flag (`wx`, `ax`) refuses a name already there
|
|
773
|
+
* before anything is written. */
|
|
774
|
+
async put(path, data, options, fallback) {
|
|
775
|
+
const given = fieldsOf(options).flag;
|
|
776
|
+
const flag = typeof given === 'string' ? given : fallback;
|
|
777
|
+
const bytes = bytesOf(data, options);
|
|
778
|
+
if (flag.includes('x') && (await this.files.statOrNull(path, true)) !== null) {
|
|
779
|
+
throw refusal('EEXIST', 'open', path);
|
|
780
|
+
}
|
|
781
|
+
// What descriptors on the file still owe lands first, so their older
|
|
782
|
+
// writes never land over this one.
|
|
783
|
+
await this.descriptors.landPath(path);
|
|
784
|
+
if (flag.startsWith('a'))
|
|
785
|
+
await this.files.append(path, bytes);
|
|
786
|
+
else
|
|
787
|
+
await this.files.write(path, bytes);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Point node's own `fs` at the workspace for every mounted path.
|
|
792
|
+
*
|
|
793
|
+
* Each name in `constants.ts` is swapped on the CommonJS `fs` object
|
|
794
|
+
* and on `fs.promises`, in all the spellings node has: a routed call
|
|
795
|
+
* goes through the workspace, a refused one answers its condition, and
|
|
796
|
+
* a sync spelling refuses a mounted path, since the workspace answers
|
|
797
|
+
* asynchronously. A path no mount owns reaches node's own function in
|
|
798
|
+
* every spelling, so the rest of the process keeps its filesystem. ESM
|
|
799
|
+
* named imports of `node:fs/promises` keep node's functions: an ES
|
|
800
|
+
* module binds them at link time, which is also why a node backend's
|
|
801
|
+
* own host I/O never routes back into the workspace.
|
|
802
|
+
*
|
|
803
|
+
* Returns a `restore()` that puts every swapped function back.
|
|
804
|
+
*/
|
|
805
|
+
export function patchNodeFs(ws) {
|
|
806
|
+
const native = { ...fs, promises: { ...fs.promises } };
|
|
807
|
+
const host = new HostFs(ws, native);
|
|
808
|
+
const swapped = [];
|
|
809
|
+
const swap = (target, name, make) => {
|
|
810
|
+
const original = target[name];
|
|
811
|
+
if (typeof original !== 'function')
|
|
812
|
+
return;
|
|
813
|
+
swapped.push([target, name, original]);
|
|
814
|
+
const wrapped = make(original);
|
|
815
|
+
// node hangs helpers off a few functions (`realpath.native`, the
|
|
816
|
+
// promisify hooks), and they stay: a named one is swapped the same
|
|
817
|
+
// way, a symbol one is node's and calls back through `fs`.
|
|
818
|
+
for (const key of Reflect.ownKeys(original)) {
|
|
819
|
+
if (key === 'length' || key === 'name' || key === 'prototype')
|
|
820
|
+
continue;
|
|
821
|
+
const helper = Reflect.get(original, key);
|
|
822
|
+
const own = typeof key === 'string' && typeof helper === 'function';
|
|
823
|
+
Reflect.set(wrapped, key, own ? make(helper) : helper);
|
|
824
|
+
}
|
|
825
|
+
target[name] = wrapped;
|
|
826
|
+
};
|
|
827
|
+
// The paths a call names. glob names one per pattern, a relative one
|
|
828
|
+
// under its `cwd`.
|
|
829
|
+
const namedPaths = (name, args) => {
|
|
830
|
+
if (name !== 'glob')
|
|
831
|
+
return (PATH_ARGS[name] ?? [0]).map((index) => spelled(args[index]));
|
|
832
|
+
const cwd = spelled(fieldsOf(args[1]).cwd);
|
|
833
|
+
const patterns = Array.isArray(args[0]) ? args[0] : [args[0]];
|
|
834
|
+
return patterns.map((pattern) => {
|
|
835
|
+
const path = spelled(pattern);
|
|
836
|
+
if (path === null || cwd === null || posix.isAbsolute(path))
|
|
837
|
+
return path;
|
|
838
|
+
return posix.join(cwd, path);
|
|
839
|
+
});
|
|
840
|
+
};
|
|
841
|
+
// The mounted path a call names, or null when every path it takes is
|
|
842
|
+
// the host's, which leaves the call to node.
|
|
843
|
+
const mountedIn = (name, args) => namedPaths(name, args).find((path) => host.mounted(path)) ?? null;
|
|
844
|
+
const spellPaths = (name, args) => {
|
|
845
|
+
const positions = PATH_ARGS[name] ?? [0];
|
|
846
|
+
return args.map((arg, index) => (positions.includes(index) ? (spelled(arg) ?? arg) : arg));
|
|
847
|
+
};
|
|
848
|
+
// readFile, writeFile and appendFile take a descriptor or a FileHandle
|
|
849
|
+
// where they take a path: a mounted one of the patch's is answered here.
|
|
850
|
+
const byDescriptor = (name, args) => FILE_CALLS.has(name) &&
|
|
851
|
+
(host.descriptors.get(args[0]) !== undefined || args[0] instanceof MountedFileHandle);
|
|
852
|
+
for (const name of ROUTED_CALLS) {
|
|
853
|
+
const route = (args) => host[name].call(host, ...spellPaths(name, args));
|
|
854
|
+
swap(fs.promises, name, (original) => (...args) => {
|
|
855
|
+
if (byDescriptor(name, args))
|
|
856
|
+
return host.fileCall(name, args[0], args.slice(1));
|
|
857
|
+
return mountedIn(name, args) === null ? original(...args) : route(args);
|
|
858
|
+
});
|
|
859
|
+
swap(fs, name, (original) => (...args) => {
|
|
860
|
+
const done = args.at(-1);
|
|
861
|
+
const rest = args.slice(0, -1);
|
|
862
|
+
if (typeof done === 'function' && byDescriptor(name, rest)) {
|
|
863
|
+
answer(host.fileCall(name, rest[0], rest.slice(1)).then((v) => (v === undefined ? [] : [v])), done);
|
|
864
|
+
return undefined;
|
|
865
|
+
}
|
|
866
|
+
if (typeof done !== 'function' || mountedIn(name, rest) === null)
|
|
867
|
+
return original(...args);
|
|
868
|
+
const callback = done;
|
|
869
|
+
// `exists` is the one callback without an error slot.
|
|
870
|
+
route(rest).then((value) => {
|
|
871
|
+
if (name === 'exists')
|
|
872
|
+
callback(value);
|
|
873
|
+
else
|
|
874
|
+
callback(null, value);
|
|
875
|
+
}, (err) => {
|
|
876
|
+
if (name === 'exists')
|
|
877
|
+
callback(false);
|
|
878
|
+
else
|
|
879
|
+
callback(err);
|
|
880
|
+
});
|
|
881
|
+
return undefined;
|
|
882
|
+
});
|
|
883
|
+
swap(fs, `${name}Sync`, (original) => (...args) => {
|
|
884
|
+
const desc = host.descriptors.get(args[0]);
|
|
885
|
+
if (desc !== undefined && FILE_CALLS.has(name))
|
|
886
|
+
throw syncRefusal(`${name}Sync`, desc.path);
|
|
887
|
+
const path = mountedIn(name, args);
|
|
888
|
+
if (path === null)
|
|
889
|
+
return original(...args);
|
|
890
|
+
// existsSync answers false where it cannot look, as node's does for
|
|
891
|
+
// any path whose stat fails; a mount's root is the one name it
|
|
892
|
+
// knows is there without asking.
|
|
893
|
+
if (name === 'exists')
|
|
894
|
+
return ws.registry.isMountRoot(path);
|
|
895
|
+
throw syncRefusal(`${name}Sync`, path);
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
// open hands a mounted path a descriptor of the patch's own, which the
|
|
899
|
+
// descriptor calls below answer for; the promise spelling a FileHandle.
|
|
900
|
+
swap(fs.promises, 'open', (original) => (...args) => {
|
|
901
|
+
const path = mountedIn('open', args);
|
|
902
|
+
return path === null ? original(...args) : host.open(path, args[1]);
|
|
903
|
+
});
|
|
904
|
+
swap(fs, 'open', (original) => (...args) => {
|
|
905
|
+
const done = args.at(-1);
|
|
906
|
+
const rest = args.slice(0, -1);
|
|
907
|
+
const path = mountedIn('open', rest);
|
|
908
|
+
if (typeof done !== 'function' || path === null)
|
|
909
|
+
return original(...args);
|
|
910
|
+
answer(host.open(path, rest[1]).then((handle) => [handle.fd]), done);
|
|
911
|
+
return undefined;
|
|
912
|
+
});
|
|
913
|
+
swap(fs, 'openSync', (original) => (...args) => {
|
|
914
|
+
const path = mountedIn('open', args);
|
|
915
|
+
if (path !== null)
|
|
916
|
+
throw syncRefusal('openSync', path);
|
|
917
|
+
return original(...args);
|
|
918
|
+
});
|
|
919
|
+
for (const name of DESCRIPTOR_CALLS) {
|
|
920
|
+
swap(fs, name, (original) => (...args) => {
|
|
921
|
+
if (host.descriptors.get(args[0]) === undefined)
|
|
922
|
+
return original(...args);
|
|
923
|
+
const done = args.at(-1);
|
|
924
|
+
// fs.close is the one whose callback node lets a caller leave out;
|
|
925
|
+
// node throws an unhandled close error on the next turn.
|
|
926
|
+
const callback = typeof done === 'function'
|
|
927
|
+
? done
|
|
928
|
+
: (err) => {
|
|
929
|
+
if (err !== null)
|
|
930
|
+
process.nextTick(() => {
|
|
931
|
+
throw err instanceof Error ? err : new Error('close failed', { cause: err });
|
|
932
|
+
});
|
|
933
|
+
};
|
|
934
|
+
answer(host.descriptorCall(name, typeof done === 'function' ? args.slice(0, -1) : args), callback);
|
|
935
|
+
return undefined;
|
|
936
|
+
});
|
|
937
|
+
swap(fs, `${name}Sync`, (original) => (...args) => {
|
|
938
|
+
const desc = host.descriptors.get(args[0]);
|
|
939
|
+
if (desc !== undefined)
|
|
940
|
+
throw syncRefusal(`${name}Sync`, desc.path);
|
|
941
|
+
return original(...args);
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
for (const [name, condition] of Object.entries(REFUSED_CALLS)) {
|
|
945
|
+
swap(fs.promises, name, (original) => {
|
|
946
|
+
const iterated = Object.prototype.toString.call(original) === '[object AsyncGeneratorFunction]';
|
|
947
|
+
return (...args) => {
|
|
948
|
+
const path = mountedIn(name, args);
|
|
949
|
+
if (path === null)
|
|
950
|
+
return original(...args);
|
|
951
|
+
const err = refusal(condition, name, path);
|
|
952
|
+
return iterated ? refusedIterator(err) : Promise.reject(err);
|
|
953
|
+
};
|
|
954
|
+
});
|
|
955
|
+
swap(fs, name, (original) => (...args) => {
|
|
956
|
+
const path = mountedIn(name, args);
|
|
957
|
+
if (path === null)
|
|
958
|
+
return original(...args);
|
|
959
|
+
const err = refusal(condition, name, path);
|
|
960
|
+
const done = args.at(-1);
|
|
961
|
+
if (typeof done !== 'function' || LISTENED_CALLS.has(name))
|
|
962
|
+
throw err;
|
|
963
|
+
process.nextTick(done, err);
|
|
964
|
+
return undefined;
|
|
965
|
+
});
|
|
966
|
+
swap(fs, `${name}Sync`, (original) => (...args) => {
|
|
967
|
+
const path = mountedIn(name, args);
|
|
968
|
+
if (path !== null)
|
|
969
|
+
throw refusal(condition, `${name}Sync`, path);
|
|
970
|
+
return original(...args);
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
return function restore() {
|
|
974
|
+
for (const [target, name, original] of swapped.reverse())
|
|
975
|
+
target[name] = original;
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
//# sourceMappingURL=fs.js.map
|