poe-code 12.0.2 → 12.0.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 +24 -0
- package/dist/index.js +430 -6
- package/dist/index.js.map +4 -4
- package/dist/metafile.json +1 -1
- package/package.json +8 -2
- package/packages/package-lint/dist/bundle-policy.d.ts +45 -0
- package/packages/package-lint/dist/bundle-policy.js +169 -0
- package/packages/package-lint/dist/model.d.ts +4 -10
- package/packages/package-lint/dist/model.js +4 -2
- package/packages/package-lint/dist/packlist.js +5 -1
- package/packages/package-lint/dist/rules/bundle-self-contained.js +11 -25
- package/packages/safe-fs/dist/contracts/abort.d.ts +5 -0
- package/packages/safe-fs/dist/contracts/cleanup.d.ts +1 -0
- package/packages/safe-fs/dist/contracts/errors.d.ts +49 -0
- package/packages/safe-fs/dist/contracts/filesystem.d.ts +96 -0
- package/packages/safe-fs/dist/contracts/index.d.ts +4 -0
- package/packages/safe-fs/dist/contracts/io.d.ts +8 -0
- package/packages/safe-fs/dist/contracts/path.d.ts +13 -0
- package/packages/safe-fs/dist/fs/memory/index.d.ts +58 -0
- package/packages/safe-fs/dist/fs/mount/comparison.d.ts +18 -0
- package/packages/safe-fs/dist/fs/mount/identity.d.ts +2 -0
- package/packages/safe-fs/dist/fs/mount/index.d.ts +44 -0
- package/packages/safe-fs/dist/fs/overlay/index.d.ts +72 -0
- package/packages/safe-fs/dist/fs/readonly/index.d.ts +30 -0
- package/packages/safe-fs/dist/fs/real/allocation.d.ts +1 -0
- package/packages/safe-fs/dist/fs/real/index.d.ts +76 -0
- package/packages/safe-fs/dist/fs/s3/authority.d.ts +13 -0
- package/packages/safe-fs/dist/fs/s3/filesystem.d.ts +93 -0
- package/packages/safe-fs/dist/fs/s3/http/index.d.ts +2 -0
- package/packages/safe-fs/dist/fs/s3/http/request.d.ts +16 -0
- package/packages/safe-fs/dist/fs/s3/http/signature.d.ts +20 -0
- package/packages/safe-fs/dist/fs/s3/http/transport.d.ts +3 -0
- package/packages/safe-fs/dist/fs/s3/http/types.d.ts +30 -0
- package/packages/safe-fs/dist/fs/s3/http/xml.d.ts +11 -0
- package/packages/safe-fs/dist/fs/s3/index.d.ts +6 -0
- package/packages/safe-fs/dist/fs/s3/mock.d.ts +48 -0
- package/packages/safe-fs/dist/fs/s3/transport.d.ts +103 -0
- package/packages/safe-fs/dist/fs/webdav/index.d.ts +2 -0
- package/packages/safe-fs/dist/fs/webdav/resource-id.d.ts +18 -0
- package/packages/safe-fs/dist/fs/webdav/webdav.d.ts +98 -0
- package/packages/safe-fs/dist/fs/webdav/xml.d.ts +15 -0
- package/packages/safe-fs/dist/index.d.ts +11 -0
- package/packages/safe-fs/dist/node/filesystem.d.ts +11 -0
- package/packages/safe-fs/dist/node/index.d.ts +2 -0
- package/packages/safe-fs/dist/node/stats.d.ts +4 -0
- package/packages/safe-fs/dist/node/values.d.ts +6 -0
- package/packages/safejs/dist/chunks/{chunk-T55OILHA.js → chunk-LF5LY5O3.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-Z3ZMLYCK.js → chunk-XBRQ72W6.js} +387 -5
- package/packages/safejs/dist/chunks/chunk-XBRQ72W6.js.map +7 -0
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/float32.d.ts +16 -0
- package/packages/safejs/dist/interp/float32.js +65 -0
- package/packages/safejs/dist/interp/globals/float32array.d.ts +6 -0
- package/packages/safejs/dist/interp/globals/float32array.js +130 -0
- package/packages/safejs/dist/interp/globals/object-array.js +6 -0
- package/packages/safejs/dist/interp/host-bridge.js +18 -0
- package/packages/safejs/dist/interp/host-call.js +15 -0
- package/packages/safejs/dist/interp/interpreter.js +17 -1
- package/packages/safejs/dist/interp/iteration.js +4 -0
- package/packages/safejs/dist/interp/values.d.ts +1 -1
- package/packages/safejs/dist/interp/values.js +56 -0
- package/packages/safejs/dist/lint/rules/known-globals.d.ts +1 -1
- package/packages/safejs/dist/lint/rules/known-globals.js +1 -0
- package/packages/safejs/dist/run.js +2 -0
- package/packages/safejs/dist/safe-fs.js +6476 -0
- package/packages/safejs/dist/safe-fs.js.map +7 -0
- package/packages/safejs/dist/snapshot/dump-format.js +20 -2
- package/packages/safejs/dist/snapshot/float32array.d.ts +12 -0
- package/packages/safejs/dist/snapshot/float32array.js +46 -0
- package/packages/safejs/dist/snapshot/replay-data.d.ts +5 -1
- package/packages/safejs/dist/snapshot/replay-data.js +29 -0
- package/packages/safejs/dist/snapshot/restore.js +14 -0
- package/packages/safejs/dist/snapshot/serialize.d.ts +5 -2
- package/packages/safejs/dist/snapshot/serialize.js +17 -2
- package/packages/safejs/dist/snapshot/validation.js +11 -1
- package/packages/safejs/dist/chunks/chunk-Z3ZMLYCK.js.map +0 -7
- /package/packages/safejs/dist/chunks/{chunk-T55OILHA.js.map → chunk-LF5LY5O3.js.map} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ByteSource } from "../../contracts/io.js";
|
|
2
|
+
import type { AppendFileOptions, CopyFileOptions, DirectoryEntry, EntryComparison, FileStat, FileSystem, FsOptions, MkdirOptions, ReadFileOptions, ReadStreamOptions, RemoveOptions, WriteFileOptions } from "../../contracts/filesystem.js";
|
|
3
|
+
export type WebDavFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
4
|
+
export interface WebDavAtomicEmptyDirectoryRequest {
|
|
5
|
+
readonly operation: "atomic-empty-rmdir/v1";
|
|
6
|
+
readonly namespaceUrl: string;
|
|
7
|
+
readonly path: string;
|
|
8
|
+
readonly signal?: AbortSignal;
|
|
9
|
+
}
|
|
10
|
+
export interface WebDavAtomicEmptyDirectoryResult {
|
|
11
|
+
readonly operation: "atomic-empty-rmdir/v1";
|
|
12
|
+
readonly namespaceUrl: string;
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly outcome: "removed";
|
|
15
|
+
}
|
|
16
|
+
export interface WebDavAtomicEmptyDirectoryBinding {
|
|
17
|
+
readonly namespaceUrl: string;
|
|
18
|
+
readonly removeEmptyDirectory: (request: WebDavAtomicEmptyDirectoryRequest) => Promise<WebDavAtomicEmptyDirectoryResult>;
|
|
19
|
+
}
|
|
20
|
+
export interface WebDavFileSystemOptions {
|
|
21
|
+
readonly baseUrl: string;
|
|
22
|
+
readonly fetch: WebDavFetch;
|
|
23
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
24
|
+
readonly maxResponseBytes?: number;
|
|
25
|
+
readonly maxXmlBytes?: number;
|
|
26
|
+
readonly maxEntries?: number;
|
|
27
|
+
readonly timeoutMs?: number;
|
|
28
|
+
readonly overwritePolicy?: "lock" | "etag";
|
|
29
|
+
readonly atomicEmptyDirectory?: WebDavAtomicEmptyDirectoryBinding;
|
|
30
|
+
readonly compareEntry?: (this: FileSystem, ...args: Parameters<NonNullable<FileSystem["compareEntry"]>>) => ReturnType<NonNullable<FileSystem["compareEntry"]>>;
|
|
31
|
+
}
|
|
32
|
+
export declare class WebDavFileSystem implements FileSystem {
|
|
33
|
+
readonly capabilities: Readonly<{
|
|
34
|
+
symlinks: false;
|
|
35
|
+
hardlinks: false;
|
|
36
|
+
permissions: false;
|
|
37
|
+
timestamps: true;
|
|
38
|
+
atomicRename: false;
|
|
39
|
+
streamingRead: true;
|
|
40
|
+
streamingWrite: true;
|
|
41
|
+
}>;
|
|
42
|
+
private readonly base;
|
|
43
|
+
private readonly baseSegments;
|
|
44
|
+
private readonly transport;
|
|
45
|
+
private readonly headers;
|
|
46
|
+
private readonly maxResponseBytes;
|
|
47
|
+
private readonly maxXmlBytes;
|
|
48
|
+
private readonly maxEntries;
|
|
49
|
+
private readonly timeoutMs;
|
|
50
|
+
private readonly overwritePolicy;
|
|
51
|
+
private readonly configuredComparison;
|
|
52
|
+
private readonly atomicEmptyDirectory;
|
|
53
|
+
private readonly etags;
|
|
54
|
+
constructor(options: WebDavFileSystemOptions);
|
|
55
|
+
compareEntry(path: string, peer: FileSystem, peerPath: string, options?: FsOptions): Promise<EntryComparison>;
|
|
56
|
+
private resourceId;
|
|
57
|
+
private url;
|
|
58
|
+
private hrefPath;
|
|
59
|
+
private httpError;
|
|
60
|
+
private request;
|
|
61
|
+
private requestStream;
|
|
62
|
+
private bytes;
|
|
63
|
+
private bodyChunks;
|
|
64
|
+
private xml;
|
|
65
|
+
private multistatus;
|
|
66
|
+
private lockFailure;
|
|
67
|
+
private entryStat;
|
|
68
|
+
private entries;
|
|
69
|
+
private mutation;
|
|
70
|
+
private unsupported;
|
|
71
|
+
private maybeStat;
|
|
72
|
+
stat(path: string, options?: FsOptions): Promise<FileStat>;
|
|
73
|
+
lstat(path: string, options?: FsOptions): Promise<FileStat>;
|
|
74
|
+
readdir(path: string, options?: FsOptions): Promise<DirectoryEntry[]>;
|
|
75
|
+
readFile(path: string, options?: ReadFileOptions): Promise<Uint8Array>;
|
|
76
|
+
readStream(path: string, options?: ReadStreamOptions): AsyncGenerator<Uint8Array>;
|
|
77
|
+
private prepareWrite;
|
|
78
|
+
writeFile(path: string, data: Uint8Array, options?: WriteFileOptions): Promise<void>;
|
|
79
|
+
writeStream(path: string, source: ByteSource, options?: WriteFileOptions): Promise<void>;
|
|
80
|
+
appendFile(path: string, data: Uint8Array, options?: AppendFileOptions): Promise<void>;
|
|
81
|
+
mkdir(path: string, options?: MkdirOptions): Promise<void>;
|
|
82
|
+
rmdir(path: string, options?: FsOptions): Promise<void>;
|
|
83
|
+
private atomicRmdir;
|
|
84
|
+
rm(path: string, options?: RemoveOptions): Promise<void>;
|
|
85
|
+
private guardTransferIdentity;
|
|
86
|
+
private transfer;
|
|
87
|
+
private withDestinationLock;
|
|
88
|
+
rename(source: string, destination: string, options?: FsOptions): Promise<void>;
|
|
89
|
+
copyFile(source: string, destination: string, options?: CopyFileOptions): Promise<void>;
|
|
90
|
+
realpath(path: string, options?: FsOptions): Promise<string>;
|
|
91
|
+
access(path: string, mode?: number, options?: FsOptions): Promise<void>;
|
|
92
|
+
readlink(path: string, _options?: FsOptions): Promise<string>;
|
|
93
|
+
symlink(_target: string, path: string, _options?: FsOptions): Promise<void>;
|
|
94
|
+
link(_source: string, path: string, _options?: FsOptions): Promise<void>;
|
|
95
|
+
chmod(path: string, _mode: number, _options?: FsOptions): Promise<void>;
|
|
96
|
+
utimes(path: string, atimeMs: number, mtimeMs: number, options?: FsOptions): Promise<void>;
|
|
97
|
+
truncate(path: string, _length?: number, _options?: FsOptions): Promise<void>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface XmlElement {
|
|
2
|
+
readonly namespace: string;
|
|
3
|
+
readonly localName: string;
|
|
4
|
+
readonly children: XmlElement[];
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface XmlLimits {
|
|
8
|
+
readonly maxDepth?: number;
|
|
9
|
+
readonly maxNodes?: number;
|
|
10
|
+
readonly maxAttributes?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function parseXml(input: string, limits?: XmlLimits): XmlElement;
|
|
13
|
+
export declare function davChildren(element: XmlElement, localName: string): XmlElement[];
|
|
14
|
+
export declare function davChild(element: XmlElement, localName: string): XmlElement | undefined;
|
|
15
|
+
export declare function scalar(element: XmlElement): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./contracts/index.js";
|
|
2
|
+
export * from "./fs/memory/index.js";
|
|
3
|
+
export * from "./fs/real/index.js";
|
|
4
|
+
export * from "./fs/s3/index.js";
|
|
5
|
+
export type { S3StreamGetInput, S3StreamGetOutput, S3StreamPutInput } from "./fs/s3/transport.js";
|
|
6
|
+
export * from "./fs/s3/http/index.js";
|
|
7
|
+
export * from "./fs/webdav/index.js";
|
|
8
|
+
export * from "./fs/readonly/index.js";
|
|
9
|
+
export * from "./fs/mount/index.js";
|
|
10
|
+
export * from "./fs/overlay/index.js";
|
|
11
|
+
export * from "./node/index.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as FsPromises from "node:fs/promises";
|
|
2
|
+
import type { FileSystem, FsOptions } from "../contracts/filesystem.js";
|
|
3
|
+
export type NodeFsImplementation = Pick<typeof FsPromises, "access" | "appendFile" | "chmod" | "copyFile" | "cp" | "link" | "lstat" | "mkdir" | "mkdtemp" | "readFile" | "readdir" | "readlink" | "realpath" | "rename" | "rm" | "rmdir" | "stat" | "symlink" | "truncate" | "utimes" | "writeFile">;
|
|
4
|
+
export interface NodeFsBridgeOptions {
|
|
5
|
+
readonly cwd?: string;
|
|
6
|
+
readonly signal?: AbortSignal;
|
|
7
|
+
}
|
|
8
|
+
export interface NodeFsBridgeFileSystem extends FileSystem {
|
|
9
|
+
rmdir?(path: string, options?: FsOptions): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createNodeFsBridge(fs: FileSystem, options?: NodeFsBridgeOptions): NodeFsImplementation;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Dirent, Stats } from "node:fs";
|
|
2
|
+
import type { FileStat, FileType } from "../contracts/filesystem.js";
|
|
3
|
+
export declare function nodeStats(stat: FileStat): Stats;
|
|
4
|
+
export declare function nodeDirent<Name extends string | Buffer>(name: Name, parentPath: string, type: FileType): Dirent<Name>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function record(value: unknown, name: string): Record<string, unknown>;
|
|
2
|
+
export declare function onlyKeys(value: Record<string, unknown>, allowed: readonly string[]): void;
|
|
3
|
+
export declare function booleanValue(value: unknown, fallback?: boolean): boolean;
|
|
4
|
+
export declare function abortError(): Error;
|
|
5
|
+
export declare function checkSignal(signal: AbortSignal | undefined): void;
|
|
6
|
+
export declare function withSignal<Value>(signal: AbortSignal | undefined, operation: () => Promise<Value>): Promise<Value>;
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XBRQ72W6.js";
|
|
31
31
|
|
|
32
32
|
// packages/safejs/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8055,4 +8055,4 @@ export {
|
|
|
8055
8055
|
parseMcpConfig,
|
|
8056
8056
|
makeMcpModule
|
|
8057
8057
|
};
|
|
8058
|
-
//# sourceMappingURL=chunk-
|
|
8058
|
+
//# sourceMappingURL=chunk-LF5LY5O3.js.map
|