@poe-platform/safe-bash 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/safe-bash/browser.js +9 -9
- package/dist/safe-bash/commands/safejs/types.d.ts +1 -1
- package/dist/safe-bash/contracts/errors.d.ts +2 -2
- package/dist/safe-bash/contracts/errors.js +1 -1
- package/dist/safe-bash/contracts/filesystem.d.ts +2 -2
- package/dist/safe-bash/contracts/filesystem.js +1 -1
- package/dist/safe-bash/contracts/io.d.ts +3 -3
- package/dist/safe-bash/contracts/io.js +2 -2
- package/dist/safe-bash/contracts/path.d.ts +1 -1
- package/dist/safe-bash/contracts/path.js +1 -1
- package/dist/safe-bash/fs/memory/index.d.ts +1 -1
- package/dist/safe-bash/fs/memory/index.js +1 -1
- package/dist/safe-bash/fs/mount/index.d.ts +2 -2
- package/dist/safe-bash/fs/mount/index.js +1 -1
- package/dist/safe-bash/fs/overlay/index.d.ts +2 -2
- package/dist/safe-bash/fs/overlay/index.js +1 -1
- package/dist/safe-bash/fs/readonly/index.d.ts +1 -1
- package/dist/safe-bash/fs/readonly/index.js +1 -1
- package/dist/safe-bash/fs/real/index.d.ts +2 -2
- package/dist/safe-bash/fs/real/index.js +1 -1
- package/dist/safe-bash/fs/s3/http/index.d.ts +2 -2
- package/dist/safe-bash/fs/s3/http/index.js +1 -1
- package/dist/safe-bash/fs/s3/index.d.ts +2 -2
- package/dist/safe-bash/fs/s3/index.js +1 -1
- package/dist/safe-bash/fs/webdav/index.d.ts +2 -2
- package/dist/safe-bash/fs/webdav/index.js +1 -1
- package/dist/safe-bash/integrations/safejs/filesystem.d.ts +3 -3
- package/dist/safe-bash/integrations/safejs/filesystem.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ required. The regular `@poe-platform/safe-bash` entry remains the Node API.
|
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
52
|
import { Shell, browserCommands } from "@poe-platform/safe-bash/browser";
|
|
53
|
-
import { createMemoryFileSystem } from "@poe-platform/safe-
|
|
53
|
+
import { createMemoryFileSystem } from "@poe-platform/safe-fs/core";
|
|
54
54
|
|
|
55
55
|
const fs = createMemoryFileSystem();
|
|
56
56
|
const shell = new Shell({ fs, limits: { maxCommands: 100, maxOutputBytes: 65536 } })
|
|
@@ -71,7 +71,9 @@ try {
|
|
|
71
71
|
|
|
72
72
|
Shell builtins, virtual scripts, pipelines, budgets, cancellation, and disposal
|
|
73
73
|
remain available. Inject a canonical filesystem or compose memory/read-only/mount
|
|
74
|
-
adapters from `@poe-platform/safe-
|
|
74
|
+
adapters from `@poe-platform/safe-fs/core`; matching scoped packages share filesystem
|
|
75
|
+
and error identity. Legacy `poe-code` imports use a separate runtime; see the
|
|
76
|
+
[filesystem migration boundary](../safe-fs/README.md#entry-points-and-shared-identity).
|
|
75
77
|
The core's portable `posixPath` exposes `basename`, `dirname`, `extname`, `join`,
|
|
76
78
|
and `isAbsolute`. Node-only adapters and command packs are not included;
|
|
77
79
|
`[[ … =~ … ]]` explicitly returns status 2. Use the Node entry for regex-worker
|
|
@@ -2220,17 +2220,17 @@ function validateExitCode(exitCode) {
|
|
|
2220
2220
|
|
|
2221
2221
|
// packages/safe-bash/src/contracts/errors.ts
|
|
2222
2222
|
init_platform();
|
|
2223
|
-
import { isErrnoCode, isFsError, toFsError, FsError } from "@poe-platform/safe-
|
|
2223
|
+
import { isErrnoCode, isFsError, toFsError, FsError } from "@poe-platform/safe-fs/core";
|
|
2224
2224
|
|
|
2225
2225
|
// packages/safe-bash/src/contracts/filesystem.ts
|
|
2226
2226
|
init_platform();
|
|
2227
|
-
import { ACCESS_MODES } from "@poe-platform/safe-
|
|
2227
|
+
import { ACCESS_MODES } from "@poe-platform/safe-fs/core";
|
|
2228
2228
|
|
|
2229
2229
|
// packages/safe-bash/src/contracts/io.ts
|
|
2230
2230
|
init_platform();
|
|
2231
2231
|
init_platform();
|
|
2232
|
-
import { collectBytes, readBytes } from "@poe-platform/safe-
|
|
2233
|
-
import { collectBytes as collectBytes2, readBytes as readBytes2, toByteSource } from "@poe-platform/safe-
|
|
2232
|
+
import { collectBytes, readBytes } from "@poe-platform/safe-fs/core";
|
|
2233
|
+
import { collectBytes as collectBytes2, readBytes as readBytes2, toByteSource } from "@poe-platform/safe-fs/core";
|
|
2234
2234
|
function createBytePipe(options2 = {}) {
|
|
2235
2235
|
const highWaterMark = options2.highWaterMark ?? 64 * 1024;
|
|
2236
2236
|
const signal = options2.signal;
|
|
@@ -2500,7 +2500,7 @@ function createOutputOperation(context, destination) {
|
|
|
2500
2500
|
|
|
2501
2501
|
// packages/safe-bash/src/contracts/path.ts
|
|
2502
2502
|
init_platform();
|
|
2503
|
-
import { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, posixPath, basename, dirname, extname, joinPath, isAbsolutePath } from "@poe-platform/safe-
|
|
2503
|
+
import { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, posixPath, basename, dirname, extname, joinPath, isAbsolutePath } from "@poe-platform/safe-fs/core";
|
|
2504
2504
|
|
|
2505
2505
|
// packages/safe-bash/src/contracts/plugin.ts
|
|
2506
2506
|
init_platform();
|
|
@@ -14377,19 +14377,19 @@ shell: -c: line ${line}: \`${source.split("\n")[line - 1] ?? ""}'
|
|
|
14377
14377
|
|
|
14378
14378
|
// packages/safe-bash/src/fs/memory/index.ts
|
|
14379
14379
|
init_platform();
|
|
14380
|
-
import { createMemoryFileSystem, MemoryFileSystem } from "@poe-platform/safe-
|
|
14380
|
+
import { createMemoryFileSystem, MemoryFileSystem } from "@poe-platform/safe-fs/core";
|
|
14381
14381
|
|
|
14382
14382
|
// packages/safe-bash/src/fs/readonly/index.ts
|
|
14383
14383
|
init_platform();
|
|
14384
|
-
import { createReadOnlyFileSystem, ReadOnlyFileSystem } from "@poe-platform/safe-
|
|
14384
|
+
import { createReadOnlyFileSystem, ReadOnlyFileSystem } from "@poe-platform/safe-fs/core";
|
|
14385
14385
|
|
|
14386
14386
|
// packages/safe-bash/src/fs/mount/index.ts
|
|
14387
14387
|
init_platform();
|
|
14388
|
-
import { createMountFileSystem, MountFileSystem } from "@poe-platform/safe-
|
|
14388
|
+
import { createMountFileSystem, MountFileSystem } from "@poe-platform/safe-fs/core";
|
|
14389
14389
|
|
|
14390
14390
|
// packages/safe-bash/src/fs/overlay/index.ts
|
|
14391
14391
|
init_platform();
|
|
14392
|
-
import { createOverlayFileSystem, OverlayFileSystem } from "@poe-platform/safe-
|
|
14392
|
+
import { createOverlayFileSystem, OverlayFileSystem } from "@poe-platform/safe-fs/core";
|
|
14393
14393
|
|
|
14394
14394
|
// packages/safe-bash/src/browser.ts
|
|
14395
14395
|
function createBrowserCommands() {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { isErrnoCode, isFsError, toFsError, FsError } from "@poe-platform/safe-
|
|
2
|
-
export type { ErrnoCode, FsErrorOptions } from "@poe-platform/safe-
|
|
1
|
+
export { isErrnoCode, isFsError, toFsError, FsError } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { ErrnoCode, FsErrorOptions } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { isErrnoCode, isFsError, toFsError, FsError } from "@poe-platform/safe-
|
|
1
|
+
export { isErrnoCode, isFsError, toFsError, FsError } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ACCESS_MODES } from "@poe-platform/safe-
|
|
2
|
-
export type { FileType, EntryComparison, FileStat, DirectoryEntry, FileSystemCapabilities, FsOptions, ReadFileOptions, WriteFileOptions, AppendFileOptions, MkdirOptions, RemoveOptions, CopyFileOptions, ReadStreamOptions, FileSystem, FileSystemFactory } from "@poe-platform/safe-
|
|
1
|
+
export { ACCESS_MODES } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { FileType, EntryComparison, FileStat, DirectoryEntry, FileSystemCapabilities, FsOptions, ReadFileOptions, WriteFileOptions, AppendFileOptions, MkdirOptions, RemoveOptions, CopyFileOptions, ReadStreamOptions, FileSystem, FileSystemFactory } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=filesystem.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ACCESS_MODES } from "@poe-platform/safe-
|
|
1
|
+
export { ACCESS_MODES } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=filesystem.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ByteSource, CollectOptions } from "@poe-platform/safe-
|
|
2
|
-
export { collectBytes, readBytes, toByteSource } from "@poe-platform/safe-
|
|
3
|
-
export type { ByteSource, CollectOptions } from "@poe-platform/safe-
|
|
1
|
+
import type { ByteSource, CollectOptions } from "@poe-platform/safe-fs";
|
|
2
|
+
export { collectBytes, readBytes, toByteSource } from "@poe-platform/safe-fs";
|
|
3
|
+
export type { ByteSource, CollectOptions } from "@poe-platform/safe-fs";
|
|
4
4
|
export interface ByteSink {
|
|
5
5
|
write(chunk: Uint8Array): Promise<void>;
|
|
6
6
|
readonly ownedOutput?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { collectBytes, readBytes } from "@poe-platform/safe-
|
|
2
|
-
export { collectBytes, readBytes, toByteSource } from "@poe-platform/safe-
|
|
1
|
+
import { collectBytes, readBytes } from "@poe-platform/safe-fs";
|
|
2
|
+
export { collectBytes, readBytes, toByteSource } from "@poe-platform/safe-fs";
|
|
3
3
|
import { TransformStream } from "node:stream/web";
|
|
4
4
|
import { FsError } from "./errors.js";
|
|
5
5
|
export function createBytePipe(options = {}) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, posixPath, basename, dirname, extname, joinPath, isAbsolutePath } from "@poe-platform/safe-
|
|
1
|
+
export { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, posixPath, basename, dirname, extname, joinPath, isAbsolutePath } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=path.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, posixPath, basename, dirname, extname, joinPath, isAbsolutePath } from "@poe-platform/safe-
|
|
1
|
+
export { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, posixPath, basename, dirname, extname, joinPath, isAbsolutePath } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=path.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createMemoryFileSystem, MemoryFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createMemoryFileSystem, MemoryFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createMemoryFileSystem, MemoryFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createMemoryFileSystem, MemoryFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createMountFileSystem, MountFileSystem } from "@poe-platform/safe-
|
|
2
|
-
export type { MountFileSystemOptions } from "@poe-platform/safe-
|
|
1
|
+
export { createMountFileSystem, MountFileSystem } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { MountFileSystemOptions } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createMountFileSystem, MountFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createMountFileSystem, MountFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createOverlayFileSystem, OverlayFileSystem } from "@poe-platform/safe-
|
|
2
|
-
export type { OverlayFileSystemOptions } from "@poe-platform/safe-
|
|
1
|
+
export { createOverlayFileSystem, OverlayFileSystem } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { OverlayFileSystemOptions } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createOverlayFileSystem, OverlayFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createOverlayFileSystem, OverlayFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createReadOnlyFileSystem, ReadOnlyFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createReadOnlyFileSystem, ReadOnlyFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createReadOnlyFileSystem, ReadOnlyFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createReadOnlyFileSystem, ReadOnlyFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createRealFileSystem, RealFileSystem } from "@poe-platform/safe-
|
|
2
|
-
export type { RealFileSystemOptions } from "@poe-platform/safe-
|
|
1
|
+
export { createRealFileSystem, RealFileSystem } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { RealFileSystemOptions } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createRealFileSystem, RealFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { createRealFileSystem, RealFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createS3HttpTransport } from "@poe-platform/safe-
|
|
2
|
-
export type { S3HttpCredentials, S3HttpCredentialProvider, S3HttpRequestFactory, S3HttpTransportOptions } from "@poe-platform/safe-
|
|
1
|
+
export { createS3HttpTransport } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { S3HttpCredentials, S3HttpCredentialProvider, S3HttpRequestFactory, S3HttpTransportOptions } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createS3HttpTransport } from "@poe-platform/safe-
|
|
1
|
+
export { createS3HttpTransport } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { S3FileSystem, S3RenameError, MockS3Client, createS3Transport, encodeCopySource, S3ServiceError } from "@poe-platform/safe-
|
|
2
|
-
export type { S3FileSystemOptions, MockS3ClientOptions, MockS3Operation, MockS3Request, S3Body, S3Client, S3CopyInput, S3CopyOutput, S3DeleteInput, S3GetOutput, S3HeadOutput, S3ListInput, S3ListOutput, S3ObjectInput, S3ObjectSummary, S3PutInput, S3RequestOptions, S3Transport, S3TransportCapabilities } from "@poe-platform/safe-
|
|
1
|
+
export { S3FileSystem, S3RenameError, MockS3Client, createS3Transport, encodeCopySource, S3ServiceError } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { S3FileSystemOptions, MockS3ClientOptions, MockS3Operation, MockS3Request, S3Body, S3Client, S3CopyInput, S3CopyOutput, S3DeleteInput, S3GetOutput, S3HeadOutput, S3ListInput, S3ListOutput, S3ObjectInput, S3ObjectSummary, S3PutInput, S3RequestOptions, S3Transport, S3TransportCapabilities } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { S3FileSystem, S3RenameError, MockS3Client, createS3Transport, encodeCopySource, S3ServiceError } from "@poe-platform/safe-
|
|
1
|
+
export { S3FileSystem, S3RenameError, MockS3Client, createS3Transport, encodeCopySource, S3ServiceError } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { WebDavFileSystem } from "@poe-platform/safe-
|
|
2
|
-
export type { WebDavFileSystemOptions, WebDavFetch, WebDavAtomicEmptyDirectoryBinding, WebDavAtomicEmptyDirectoryRequest, WebDavAtomicEmptyDirectoryResult } from "@poe-platform/safe-
|
|
1
|
+
export { WebDavFileSystem } from "@poe-platform/safe-fs";
|
|
2
|
+
export type { WebDavFileSystemOptions, WebDavFetch, WebDavAtomicEmptyDirectoryBinding, WebDavAtomicEmptyDirectoryRequest, WebDavAtomicEmptyDirectoryResult } from "@poe-platform/safe-fs";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { WebDavFileSystem } from "@poe-platform/safe-
|
|
1
|
+
export { WebDavFileSystem } from "@poe-platform/safe-fs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FileSystem, NodeFsBridgeOptions } from "@poe-platform/safe-
|
|
2
|
-
export { createNodeFsBridge } from "@poe-platform/safe-
|
|
3
|
-
export type { NodeFsBridgeFileSystem, NodeFsBridgeOptions, NodeFsImplementation as SafeJsFsImplementation } from "@poe-platform/safe-
|
|
1
|
+
import type { FileSystem, NodeFsBridgeOptions } from "@poe-platform/safe-fs";
|
|
2
|
+
export { createNodeFsBridge } from "@poe-platform/safe-fs";
|
|
3
|
+
export type { NodeFsBridgeFileSystem, NodeFsBridgeOptions, NodeFsImplementation as SafeJsFsImplementation } from "@poe-platform/safe-fs";
|
|
4
4
|
export declare function makeSafeJsFsModule<Module>(makeFsModule: (options: {
|
|
5
5
|
adapter: FileSystem;
|
|
6
6
|
} & NodeFsBridgeOptions) => Module, fs: FileSystem, options?: NodeFsBridgeOptions): Module;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-bash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Extensible virtual shell with pluggable filesystems and streaming commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"access": "public"
|
|
138
138
|
},
|
|
139
139
|
"dependencies": {
|
|
140
|
-
"@poe-platform/safe-
|
|
140
|
+
"@poe-platform/safe-fs": "0.1.4",
|
|
141
141
|
"@types/node": "^25.2.2"
|
|
142
142
|
}
|
|
143
143
|
}
|