@pipobscure/bundle 0.0.1
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/HISTORY.md +1924 -0
- package/README.md +623 -0
- package/bundle.run +0 -0
- package/dist/api.d.ts +147 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +174 -0
- package/dist/api.js.map +1 -0
- package/dist/archive.d.ts +115 -0
- package/dist/archive.d.ts.map +1 -0
- package/dist/archive.js +188 -0
- package/dist/archive.js.map +1 -0
- package/dist/audit.d.ts +78 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +119 -0
- package/dist/audit.js.map +1 -0
- package/dist/cli.d.ts +23 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +555 -0
- package/dist/cli.js.map +1 -0
- package/dist/files.d.ts +53 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +118 -0
- package/dist/files.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/launch.d.ts +97 -0
- package/dist/launch.d.ts.map +1 -0
- package/dist/launch.js +267 -0
- package/dist/launch.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +19 -0
- package/dist/main.js.map +1 -0
- package/dist/manifest.d.ts +139 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +504 -0
- package/dist/manifest.js.map +1 -0
- package/dist/oidc.d.ts +40 -0
- package/dist/oidc.d.ts.map +1 -0
- package/dist/oidc.js +320 -0
- package/dist/oidc.js.map +1 -0
- package/dist/preload.d.ts +14 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.js +38 -0
- package/dist/preload.js.map +1 -0
- package/dist/provider.d.ts +83 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +206 -0
- package/dist/provider.js.map +1 -0
- package/dist/record.d.ts +2 -0
- package/dist/record.d.ts.map +1 -0
- package/dist/record.js +23 -0
- package/dist/record.js.map +1 -0
- package/dist/recorder.d.ts +64 -0
- package/dist/recorder.d.ts.map +1 -0
- package/dist/recorder.js +111 -0
- package/dist/recorder.js.map +1 -0
- package/dist/register.d.ts +2 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +28 -0
- package/dist/register.js.map +1 -0
- package/dist/sea.d.ts +97 -0
- package/dist/sea.d.ts.map +1 -0
- package/dist/sea.js +220 -0
- package/dist/sea.js.map +1 -0
- package/dist/sigstore.d.ts +112 -0
- package/dist/sigstore.d.ts.map +1 -0
- package/dist/sigstore.js +385 -0
- package/dist/sigstore.js.map +1 -0
- package/dist/skill.d.ts +36 -0
- package/dist/skill.d.ts.map +1 -0
- package/dist/skill.js +108 -0
- package/dist/skill.js.map +1 -0
- package/package.json +84 -0
- package/shell-base +2 -0
- package/skills/audit-bundle/SKILL.md +271 -0
- package/src/api.ts +293 -0
- package/src/archive.ts +312 -0
- package/src/audit.ts +206 -0
- package/src/cli.ts +575 -0
- package/src/files.ts +156 -0
- package/src/index.ts +114 -0
- package/src/launch.ts +336 -0
- package/src/main.ts +20 -0
- package/src/manifest.ts +615 -0
- package/src/oidc.ts +372 -0
- package/src/preload.ts +40 -0
- package/src/provider.ts +270 -0
- package/src/record.ts +25 -0
- package/src/recorder.ts +166 -0
- package/src/register.ts +30 -0
- package/src/sea.ts +341 -0
- package/src/sigstore.ts +492 -0
- package/src/skill.ts +132 -0
- package/src/types/node-vfs.d.ts +90 -0
- package/src/types/node-zip.d.ts +85 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// The parts of `node:vfs` that @types/node's own `vfs.d.ts` does not yet carry:
|
|
2
|
+
// provider registration, the ZIP provider, the provider methods a subclass
|
|
3
|
+
// overrides, and mounting. Declarations merge with the shipped ones, so only
|
|
4
|
+
// the gaps are filled here.
|
|
5
|
+
declare module "node:vfs" {
|
|
6
|
+
import type { Stats } from "node:fs";
|
|
7
|
+
import type { FileHandle } from "node:fs/promises";
|
|
8
|
+
import type { ZipBuffer, ZipFile } from "node:zlib";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* How `--vfs-load` picks a provider for the source it mounts: the first
|
|
12
|
+
* registered provider whose `canHandle()` accepts it wins, ahead of node's
|
|
13
|
+
* built-ins.
|
|
14
|
+
*/
|
|
15
|
+
interface ProviderRegistration {
|
|
16
|
+
/** Reported in diagnostics. */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Whether this provider should back `resolvedPath`. */
|
|
19
|
+
canHandle(resolvedPath: string, stats: Stats): boolean;
|
|
20
|
+
/** Build the provider for a source this registration claimed. */
|
|
21
|
+
create(resolvedPath: string): VirtualProvider;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function registerProvider(registration: ProviderRegistration): void;
|
|
25
|
+
|
|
26
|
+
// `VirtualProvider` is declared as a class with no members; this interface
|
|
27
|
+
// merges the fs-like surface a provider implements onto it.
|
|
28
|
+
interface VirtualProvider {
|
|
29
|
+
open(path: string, flags?: string | number, mode?: number): Promise<FileHandle>;
|
|
30
|
+
openSync(path: string, flags?: string | number, mode?: number): number;
|
|
31
|
+
stat(path: string): Promise<Stats>;
|
|
32
|
+
statSync(path: string): Stats;
|
|
33
|
+
lstat(path: string): Promise<Stats>;
|
|
34
|
+
lstatSync(path: string): Stats;
|
|
35
|
+
readdir(path: string): Promise<string[]>;
|
|
36
|
+
readdirSync(path: string): string[];
|
|
37
|
+
mkdir(path: string, options?: { recursive?: boolean; mode?: number }): Promise<string | undefined>;
|
|
38
|
+
mkdirSync(path: string, options?: { recursive?: boolean; mode?: number }): string | undefined;
|
|
39
|
+
rmdir(path: string): Promise<void>;
|
|
40
|
+
rmdirSync(path: string): void;
|
|
41
|
+
unlink(path: string): Promise<void>;
|
|
42
|
+
unlinkSync(path: string): void;
|
|
43
|
+
rename(from: string, to: string): Promise<void>;
|
|
44
|
+
renameSync(from: string, to: string): void;
|
|
45
|
+
readFile(path: string, options?: unknown): Promise<Buffer>;
|
|
46
|
+
readFileSync(path: string, options?: unknown): Buffer;
|
|
47
|
+
writeFile(path: string, data: unknown, options?: unknown): Promise<void>;
|
|
48
|
+
writeFileSync(path: string, data: unknown, options?: unknown): void;
|
|
49
|
+
appendFile(path: string, data: unknown, options?: unknown): Promise<void>;
|
|
50
|
+
appendFileSync(path: string, data: unknown, options?: unknown): void;
|
|
51
|
+
exists(path: string): Promise<boolean>;
|
|
52
|
+
existsSync(path: string): boolean;
|
|
53
|
+
copyFile(from: string, to: string, mode?: number): Promise<void>;
|
|
54
|
+
copyFileSync(from: string, to: string, mode?: number): void;
|
|
55
|
+
realpath(path: string): Promise<string>;
|
|
56
|
+
realpathSync(path: string): string;
|
|
57
|
+
access(path: string, mode?: number): Promise<void>;
|
|
58
|
+
accessSync(path: string, mode?: number): void;
|
|
59
|
+
link(existing: string, path: string): Promise<void>;
|
|
60
|
+
linkSync(existing: string, path: string): void;
|
|
61
|
+
readlink(path: string): Promise<string>;
|
|
62
|
+
readlinkSync(path: string): string;
|
|
63
|
+
symlink(target: string, path: string): Promise<void>;
|
|
64
|
+
symlinkSync(target: string, path: string): void;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface MemoryProvider extends VirtualProvider {}
|
|
68
|
+
interface RealFSProvider extends VirtualProvider {}
|
|
69
|
+
|
|
70
|
+
/** node's built-in ZIP provider — the base the verifying provider extends. */
|
|
71
|
+
class ZipProvider extends VirtualProvider {
|
|
72
|
+
constructor(archive: ZipFile | ZipBuffer);
|
|
73
|
+
close(): Promise<void>;
|
|
74
|
+
closeSync(): void;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface VirtualFileSystem {
|
|
78
|
+
/**
|
|
79
|
+
* Mount this VFS and return the mount point, which node assigns. There
|
|
80
|
+
* is no choosing it and no naming it: the reserved root belongs to
|
|
81
|
+
* node, the `--vfs-load` source has its own layer in it, and every
|
|
82
|
+
* mount a program makes is numbered after that one.
|
|
83
|
+
*/
|
|
84
|
+
mount(): string;
|
|
85
|
+
unmount(): void;
|
|
86
|
+
readonly mounted: boolean;
|
|
87
|
+
readonly mountPoint: string | undefined;
|
|
88
|
+
readonly mountPointURL: string | undefined;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// The ZIP half of `node:zlib` (Node >= 26) that @types/node does not yet carry.
|
|
2
|
+
// Only what this package uses is declared; the shapes were checked against the
|
|
3
|
+
// running runtime rather than transcribed from documentation.
|
|
4
|
+
declare module "node:zlib" {
|
|
5
|
+
import type { Readable } from "node:stream";
|
|
6
|
+
|
|
7
|
+
type ZipSource = Buffer | NodeJS.TypedArray | DataView | ArrayBuffer;
|
|
8
|
+
|
|
9
|
+
interface ZipEntryCreateOptions {
|
|
10
|
+
comment?: string | undefined;
|
|
11
|
+
mode?: number | undefined;
|
|
12
|
+
modified?: Date | undefined;
|
|
13
|
+
method?: "deflate" | "store" | "zstd" | undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ZipArchiveOptions {
|
|
17
|
+
comment?: string | undefined;
|
|
18
|
+
/** Seeds the archive's absolute offsets, for appending after a prefix. */
|
|
19
|
+
baseOffset?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* One member of an archive. Instances come either from `ZipEntry.create()`
|
|
24
|
+
* (about to be written) or from reading an archive (already written), and
|
|
25
|
+
* carry the same surface either way.
|
|
26
|
+
*/
|
|
27
|
+
class ZipEntry {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly nameBuffer: Buffer;
|
|
30
|
+
/** The member's ZIP entry comment; this package stores a content digest here. */
|
|
31
|
+
readonly comment: string;
|
|
32
|
+
readonly size: number;
|
|
33
|
+
readonly compressedSize: number;
|
|
34
|
+
readonly crc32: number;
|
|
35
|
+
readonly method: number;
|
|
36
|
+
readonly flags: number;
|
|
37
|
+
readonly compressed: boolean;
|
|
38
|
+
readonly modified: Date;
|
|
39
|
+
readonly mode: number;
|
|
40
|
+
readonly isSymlink: boolean;
|
|
41
|
+
readonly isFile: boolean;
|
|
42
|
+
readonly isDirectory: boolean;
|
|
43
|
+
content(): Promise<Buffer>;
|
|
44
|
+
contentSync(): Buffer;
|
|
45
|
+
contentIterator(): AsyncIterableIterator<Buffer>;
|
|
46
|
+
static create(filename: string, data: ZipSource, options?: ZipEntryCreateOptions): Promise<ZipEntry>;
|
|
47
|
+
static createSync(filename: string, data: ZipSource, options?: ZipEntryCreateOptions): ZipEntry;
|
|
48
|
+
static createStream(filename: string, data: Readable, options?: ZipEntryCreateOptions): ZipEntry;
|
|
49
|
+
static createSymlink(filename: string, target: string, options?: ZipEntryCreateOptions): ZipEntry;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** An archive read from a file descriptor; members are decompressed lazily. */
|
|
53
|
+
class ZipFile {
|
|
54
|
+
static open(path: string): Promise<ZipFile>;
|
|
55
|
+
static openSync(path: string): ZipFile;
|
|
56
|
+
readonly writable: boolean;
|
|
57
|
+
readonly comment: string;
|
|
58
|
+
readonly size: number;
|
|
59
|
+
has(name: string): boolean;
|
|
60
|
+
get(name: string): Promise<ZipEntry>;
|
|
61
|
+
getSync(name: string): ZipEntry;
|
|
62
|
+
keys(): IterableIterator<string>;
|
|
63
|
+
valuesSync(): IterableIterator<ZipEntry>;
|
|
64
|
+
entriesSync(): IterableIterator<[string, ZipEntry]>;
|
|
65
|
+
close(): Promise<void>;
|
|
66
|
+
closeSync(): void;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** An archive already wholly in memory. Note: its accessors are synchronous. */
|
|
70
|
+
class ZipBuffer {
|
|
71
|
+
constructor(buffer: ZipSource);
|
|
72
|
+
readonly writable: boolean;
|
|
73
|
+
readonly comment: string;
|
|
74
|
+
readonly size: number;
|
|
75
|
+
has(name: string): boolean;
|
|
76
|
+
get(name: string): ZipEntry;
|
|
77
|
+
keys(): IterableIterator<string>;
|
|
78
|
+
values(): IterableIterator<ZipEntry>;
|
|
79
|
+
entries(): IterableIterator<[string, ZipEntry]>;
|
|
80
|
+
toBufferSync(): Buffer;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function createZipArchive(entries: Iterable<ZipEntry> | AsyncIterable<ZipEntry>, options?: ZipArchiveOptions): Readable;
|
|
84
|
+
function createZipArchiveSync(entries: Iterable<ZipEntry>, options?: ZipArchiveOptions): IterableIterator<Buffer>;
|
|
85
|
+
}
|