@opys/core 0.1.2
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 +121 -0
- package/dist/index.cjs +413 -0
- package/dist/index.d.cts +256 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +256 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +351 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +36 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as napi from "@opys/core-binding";
|
|
3
|
+
|
|
4
|
+
//#region lib/fetch.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Wrap `fetch()` with bounded retry on transient network failures and
|
|
7
|
+
* 5xx-class responses. Errors that won't recover from a retry (4xx,
|
|
8
|
+
* `AbortError`, JSON parse failures downstream of the response) are
|
|
9
|
+
* surfaced unchanged so callers handle them with their own logic.
|
|
10
|
+
*
|
|
11
|
+
* Network-level retries cover the AggregateError ETIMEDOUT / ECONNRESET
|
|
12
|
+
* / ENOTFOUND / EAI_AGAIN / ECONNREFUSED cases that node:undici reports
|
|
13
|
+
* as `TypeError: fetch failed` with a populated `cause`. Without this
|
|
14
|
+
* one DNS hiccup mid-`opys launch` aborts the whole config evaluation.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Default `User-Agent` for every opys HTTP request. The bare `undici`
|
|
18
|
+
* agent gets rejected or rate-limited by some CDNs and by the CurseForge
|
|
19
|
+
* API, so we identify ourselves. The patch component is omitted so the
|
|
20
|
+
* string doesn't churn against `package.json` on every release.
|
|
21
|
+
*/
|
|
22
|
+
declare const OPYS_USER_AGENT = "opys/1.0";
|
|
23
|
+
interface FetchRetryOptions {
|
|
24
|
+
/** Total attempts including the first. Default 4 (so up to 3 retries). */
|
|
25
|
+
attempts?: number;
|
|
26
|
+
/** Initial delay before retry #2, in ms. Default 250. */
|
|
27
|
+
baseDelayMs?: number;
|
|
28
|
+
/** Cap on per-attempt delay, in ms. Default 5000. */
|
|
29
|
+
maxDelayMs?: number;
|
|
30
|
+
/** HTTP status codes that trigger a retry. Default 408, 425, 429, 500, 502, 503, 504. */
|
|
31
|
+
retryStatuses?: ReadonlySet<number> | readonly number[];
|
|
32
|
+
/** Forward to the underlying `fetch`'s signal — abort cancels remaining retries. */
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
/** Callback for diagnostics / logging on each retry. */
|
|
35
|
+
onRetry?: (info: {
|
|
36
|
+
attempt: number;
|
|
37
|
+
delayMs: number;
|
|
38
|
+
error?: unknown;
|
|
39
|
+
status?: number;
|
|
40
|
+
}) => void;
|
|
41
|
+
}
|
|
42
|
+
declare function fetchWithRetry(input: string | URL, init?: RequestInit, retry?: FetchRetryOptions): Promise<Response>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region lib/index.d.ts
|
|
45
|
+
declare const OsNameSchema: z.ZodEnum<{
|
|
46
|
+
linux: "linux";
|
|
47
|
+
windows: "windows";
|
|
48
|
+
osx: "osx";
|
|
49
|
+
}>;
|
|
50
|
+
declare const OsArchSchema: z.ZodEnum<{
|
|
51
|
+
x86: "x86";
|
|
52
|
+
x86_64: "x86_64";
|
|
53
|
+
arm: "arm";
|
|
54
|
+
aarch64: "aarch64";
|
|
55
|
+
any: "any";
|
|
56
|
+
}>;
|
|
57
|
+
declare const RuleSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
+
action: z.ZodEnum<{
|
|
59
|
+
allow: "allow";
|
|
60
|
+
disallow: "disallow";
|
|
61
|
+
}>;
|
|
62
|
+
os: z.ZodObject<{
|
|
63
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
linux: "linux";
|
|
65
|
+
windows: "windows";
|
|
66
|
+
osx: "osx";
|
|
67
|
+
}>>;
|
|
68
|
+
version: z.ZodOptional<z.ZodString>;
|
|
69
|
+
arch: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
x86: "x86";
|
|
71
|
+
x86_64: "x86_64";
|
|
72
|
+
arm: "arm";
|
|
73
|
+
aarch64: "aarch64";
|
|
74
|
+
any: "any";
|
|
75
|
+
}>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
action: z.ZodEnum<{
|
|
79
|
+
allow: "allow";
|
|
80
|
+
disallow: "disallow";
|
|
81
|
+
}>;
|
|
82
|
+
features: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
action: z.ZodEnum<{
|
|
85
|
+
allow: "allow";
|
|
86
|
+
disallow: "disallow";
|
|
87
|
+
}>;
|
|
88
|
+
}, z.core.$strip>]>;
|
|
89
|
+
declare function decodeManifest(wire: unknown): Manifest;
|
|
90
|
+
declare function encodeManifest(domain: Manifest): unknown;
|
|
91
|
+
declare function parseManifest(input: string): Manifest;
|
|
92
|
+
declare function filterManifest(manifest: Manifest, platform: OsOptions, features?: string[]): Manifest;
|
|
93
|
+
declare function resolveVars(vars: Record<string, string>): Record<string, string>;
|
|
94
|
+
declare function interpolate(template: string, vars: Record<string, string>): string;
|
|
95
|
+
declare function resolvedArgs(launch: Launch, platform: OsOptions, features?: string[]): string[];
|
|
96
|
+
declare function resolvedEnvs(launch: Launch, platform: OsOptions, features?: string[]): Record<string, string>;
|
|
97
|
+
declare function satisfiesRuleset(rules: Ruleset | string | unknown, platform: OsOptions, features?: string[]): boolean;
|
|
98
|
+
declare function globBase(glob: string): string;
|
|
99
|
+
declare function globToRegexSource(glob: string): string;
|
|
100
|
+
/** Compile a glob to a real `RegExp` (the binding returns the source string). */
|
|
101
|
+
declare function globToRegex(glob: string): RegExp;
|
|
102
|
+
type OsOptions = napi.OsOptions;
|
|
103
|
+
type OsName = 'linux' | 'windows' | 'osx';
|
|
104
|
+
type OsArch = 'x86' | 'x86_64' | 'arm' | 'aarch64' | 'any';
|
|
105
|
+
interface OsConstraint {
|
|
106
|
+
readonly name?: OsName;
|
|
107
|
+
readonly version?: string;
|
|
108
|
+
readonly arch?: OsArch;
|
|
109
|
+
}
|
|
110
|
+
type RuleAction = 'allow' | 'disallow';
|
|
111
|
+
type FeatureConstraint = Record<string, boolean>;
|
|
112
|
+
type Rule = {
|
|
113
|
+
action: RuleAction;
|
|
114
|
+
os: OsConstraint;
|
|
115
|
+
} | {
|
|
116
|
+
action: RuleAction;
|
|
117
|
+
features: FeatureConstraint;
|
|
118
|
+
} | {
|
|
119
|
+
action: RuleAction;
|
|
120
|
+
};
|
|
121
|
+
type Ruleset = Rule[];
|
|
122
|
+
type Source = {
|
|
123
|
+
readonly kind: 'url';
|
|
124
|
+
readonly url: string;
|
|
125
|
+
} | {
|
|
126
|
+
readonly kind: 'file';
|
|
127
|
+
readonly file: string;
|
|
128
|
+
} | {
|
|
129
|
+
readonly kind: 'string';
|
|
130
|
+
readonly string: string;
|
|
131
|
+
} | {
|
|
132
|
+
readonly kind: 'bytes';
|
|
133
|
+
readonly bytes: string;
|
|
134
|
+
} | {
|
|
135
|
+
readonly kind: 'pointer';
|
|
136
|
+
readonly pointer: string;
|
|
137
|
+
};
|
|
138
|
+
type HashEntry = {
|
|
139
|
+
sha1: string;
|
|
140
|
+
} | {
|
|
141
|
+
sha256: string;
|
|
142
|
+
} | {
|
|
143
|
+
md5: string;
|
|
144
|
+
};
|
|
145
|
+
type Integrity = HashEntry | HashEntry[];
|
|
146
|
+
type HashAlgo = 'sha1' | 'sha256' | 'md5';
|
|
147
|
+
type HashRef = {
|
|
148
|
+
readonly sha256: string;
|
|
149
|
+
} | {
|
|
150
|
+
readonly sha1: string;
|
|
151
|
+
} | {
|
|
152
|
+
readonly md5: string;
|
|
153
|
+
};
|
|
154
|
+
interface IntegrityProbes {
|
|
155
|
+
readonly header?: HashRef;
|
|
156
|
+
readonly url?: HashRef;
|
|
157
|
+
}
|
|
158
|
+
interface SizeProbes {
|
|
159
|
+
readonly header?: string;
|
|
160
|
+
}
|
|
161
|
+
interface Discovery {
|
|
162
|
+
readonly integrity?: IntegrityProbes;
|
|
163
|
+
readonly size?: SizeProbes;
|
|
164
|
+
}
|
|
165
|
+
interface ExtractPick {
|
|
166
|
+
readonly kind: 'pick';
|
|
167
|
+
readonly file: string;
|
|
168
|
+
readonly into: string;
|
|
169
|
+
}
|
|
170
|
+
interface ExtractScan {
|
|
171
|
+
readonly kind: 'scan';
|
|
172
|
+
readonly matches: string;
|
|
173
|
+
readonly into: string;
|
|
174
|
+
readonly strip?: string[];
|
|
175
|
+
readonly includes?: string[];
|
|
176
|
+
readonly excludes?: string[];
|
|
177
|
+
}
|
|
178
|
+
interface ExtractDump {
|
|
179
|
+
readonly kind: 'dump';
|
|
180
|
+
readonly into: string;
|
|
181
|
+
readonly clean?: boolean;
|
|
182
|
+
readonly includes?: string[];
|
|
183
|
+
readonly excludes?: string[];
|
|
184
|
+
}
|
|
185
|
+
type ExtractRule = ExtractPick | ExtractScan | ExtractDump;
|
|
186
|
+
interface Artifact {
|
|
187
|
+
readonly path: string;
|
|
188
|
+
readonly source: Source;
|
|
189
|
+
readonly size?: number;
|
|
190
|
+
readonly rules: Ruleset;
|
|
191
|
+
readonly integrity?: Integrity;
|
|
192
|
+
readonly discovery?: Discovery;
|
|
193
|
+
readonly metadata?: unknown;
|
|
194
|
+
readonly extract?: ExtractRule[];
|
|
195
|
+
}
|
|
196
|
+
interface Val {
|
|
197
|
+
readonly rules: Ruleset;
|
|
198
|
+
readonly value: string[];
|
|
199
|
+
}
|
|
200
|
+
type Valset = Val[];
|
|
201
|
+
interface ConditionalVal {
|
|
202
|
+
readonly value: string;
|
|
203
|
+
readonly rules: Ruleset;
|
|
204
|
+
}
|
|
205
|
+
type ValDefs = Readonly<Record<string, string | readonly ConditionalVal[]>>;
|
|
206
|
+
interface Launch {
|
|
207
|
+
readonly command: string;
|
|
208
|
+
readonly workdir: string;
|
|
209
|
+
readonly args: Valset;
|
|
210
|
+
readonly envs: ValDefs;
|
|
211
|
+
}
|
|
212
|
+
interface Manifest {
|
|
213
|
+
readonly vars: ValDefs;
|
|
214
|
+
readonly launch?: Launch;
|
|
215
|
+
readonly artifacts: ReadonlyArray<Artifact>;
|
|
216
|
+
readonly restrict?: ReadonlyArray<string>;
|
|
217
|
+
}
|
|
218
|
+
interface PointerDescriptor {
|
|
219
|
+
readonly source: Source;
|
|
220
|
+
readonly integrity?: Integrity;
|
|
221
|
+
readonly size?: number;
|
|
222
|
+
}
|
|
223
|
+
declare const sourceUrl: (url: string) => Source;
|
|
224
|
+
declare const sourceFile: (file: string) => Source;
|
|
225
|
+
declare const sourceString: (string: string) => Source;
|
|
226
|
+
declare const sourcePointer: (pointer: string) => Source;
|
|
227
|
+
declare const sourceBytes: (bytes: Uint8Array) => Source;
|
|
228
|
+
declare const isSourceUrl: (s: Source) => s is Extract<Source, {
|
|
229
|
+
kind: "url";
|
|
230
|
+
}>;
|
|
231
|
+
declare const isSourceFile: (s: Source) => s is Extract<Source, {
|
|
232
|
+
kind: "file";
|
|
233
|
+
}>;
|
|
234
|
+
declare const isSourceString: (s: Source) => s is Extract<Source, {
|
|
235
|
+
kind: "string";
|
|
236
|
+
}>;
|
|
237
|
+
declare const isSourceBytes: (s: Source) => s is Extract<Source, {
|
|
238
|
+
kind: "bytes";
|
|
239
|
+
}>;
|
|
240
|
+
declare const isSourcePointer: (s: Source) => s is Extract<Source, {
|
|
241
|
+
kind: "pointer";
|
|
242
|
+
}>;
|
|
243
|
+
declare const extractPick: (file: string, into: string) => ExtractPick;
|
|
244
|
+
declare const extractScan: (matches: string, into: string, opts?: Omit<ExtractScan, "kind" | "matches" | "into">) => ExtractScan;
|
|
245
|
+
declare const extractDump: (into: string, opts?: Omit<ExtractDump, "kind" | "into">) => ExtractDump;
|
|
246
|
+
declare const emptyRuleset: () => Ruleset;
|
|
247
|
+
declare const allowOsRuleset: (name: OsName) => Ruleset;
|
|
248
|
+
/** Deduplicate by normalized (posix) path; later entries win. */
|
|
249
|
+
declare function deduplicateArtifacts(artifacts: Artifact[]): Artifact[];
|
|
250
|
+
type RawSingle = string | Rule;
|
|
251
|
+
type RawRuleset = RawSingle | RawSingle[];
|
|
252
|
+
declare function parseShortRuleset(raw: RawRuleset): Ruleset;
|
|
253
|
+
declare function parseValset(raw: unknown): Valset;
|
|
254
|
+
//#endregion
|
|
255
|
+
export { Artifact, ConditionalVal, Discovery, ExtractDump, ExtractPick, ExtractRule, ExtractScan, FeatureConstraint, type FetchRetryOptions, HashAlgo, HashEntry, HashRef, Integrity, IntegrityProbes, Launch, Manifest, OPYS_USER_AGENT, OsArch, OsArchSchema, OsConstraint, OsName, OsNameSchema, OsOptions, PointerDescriptor, Rule, RuleAction, RuleSchema, Ruleset, SizeProbes, Source, Val, ValDefs, Valset, allowOsRuleset, decodeManifest, deduplicateArtifacts, emptyRuleset, encodeManifest, extractDump, extractPick, extractScan, fetchWithRetry, filterManifest, globBase, globToRegex, globToRegexSource, interpolate, isSourceBytes, isSourceFile, isSourcePointer, isSourceString, isSourceUrl, parseManifest, parseShortRuleset, parseValset, resolveVars, resolvedArgs, resolvedEnvs, satisfiesRuleset, sourceBytes, sourceFile, sourcePointer, sourceString, sourceUrl };
|
|
256
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../lib/fetch.ts","../lib/index.ts"],"mappings":";;;;;;;;AAkBA;;;;;AAEA;;;;;;;;cAFa,eAAA;AAAA,UAEI,iBAAA;EAUN;EART,QAAA;EAWE;EATF,WAAA;EAWE;EATF,UAAA;EAMW;EAJX,aAAA,GAAgB,WAAA;EASf;EAPD,MAAA,GAAS,WAAA;EA+EyB;EA7ElC,OAAA,IAAW,IAAA;IACT,OAAA;IACA,OAAA;IACA,KAAA;IACA,MAAA;EAAA;AAAA;AAAA,iBAyEkB,cAAA,CACpB,KAAA,WAAgB,GAAA,EAChB,IAAA,GAAM,WAAA,EACN,KAA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AA;AAAA,cACb,aAAA,GACX,CAAA,EAAG,MAAA,KACF,CAAA,IAAK,OAAA,CAAQ,MAAA;EAAU,IAAA;AAAA;AAAA,cACb,eAAA,GACX,CAAA,EAAG,MAAA,KACF,CAAA,IAAK,OAAA,CAAQ,MAAA;EAAU,IAAA;AAAA;AAAA,cAEb,WAAA,GAAe,IAAA,UAAc,IAAA,aAAe,WAAA;AAAA,cAK5C,WAAA,GACX,OAAA,UACA,IAAA,UACA,IAAA,GAAO,IAAA,CAAK,WAAA,mCACX,WAAA;AAAA,cACU,WAAA,GACX,IAAA,UACA,IAAA,GAAO,IAAA,CAAK,WAAA,uBACX,WAAA;AAAA,cAEU,YAAA,QAAmB,OAAA;AAAA,cACnB,cAAA,GAAkB,IAAA,EAAM,MAAA,KAAS,OAAA;;iBAK9B,oBAAA,CAAqB,SAAA,EAAW,QAAA,KAAa,QAAA;AAAA,KAyBxD,SAAA,YAAqB,IAAA;AAAA,KACrB,UAAA,GAAa,SAAA,GAAY,SAAA;AAAA,iBAwCd,iBAAA,CAAkB,GAAA,EAAK,UAAA,GAAa,OAAA;AAAA,iBAUpC,WAAA,CAAY,GAAA,YAAe,MAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as napi from "@opys/core-binding";
|
|
3
|
+
|
|
4
|
+
//#region lib/fetch.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Wrap `fetch()` with bounded retry on transient network failures and
|
|
7
|
+
* 5xx-class responses. Errors that won't recover from a retry (4xx,
|
|
8
|
+
* `AbortError`, JSON parse failures downstream of the response) are
|
|
9
|
+
* surfaced unchanged so callers handle them with their own logic.
|
|
10
|
+
*
|
|
11
|
+
* Network-level retries cover the AggregateError ETIMEDOUT / ECONNRESET
|
|
12
|
+
* / ENOTFOUND / EAI_AGAIN / ECONNREFUSED cases that node:undici reports
|
|
13
|
+
* as `TypeError: fetch failed` with a populated `cause`. Without this
|
|
14
|
+
* one DNS hiccup mid-`opys launch` aborts the whole config evaluation.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Default `User-Agent` for every opys HTTP request. The bare `undici`
|
|
18
|
+
* agent gets rejected or rate-limited by some CDNs and by the CurseForge
|
|
19
|
+
* API, so we identify ourselves. The patch component is omitted so the
|
|
20
|
+
* string doesn't churn against `package.json` on every release.
|
|
21
|
+
*/
|
|
22
|
+
declare const OPYS_USER_AGENT = "opys/1.0";
|
|
23
|
+
interface FetchRetryOptions {
|
|
24
|
+
/** Total attempts including the first. Default 4 (so up to 3 retries). */
|
|
25
|
+
attempts?: number;
|
|
26
|
+
/** Initial delay before retry #2, in ms. Default 250. */
|
|
27
|
+
baseDelayMs?: number;
|
|
28
|
+
/** Cap on per-attempt delay, in ms. Default 5000. */
|
|
29
|
+
maxDelayMs?: number;
|
|
30
|
+
/** HTTP status codes that trigger a retry. Default 408, 425, 429, 500, 502, 503, 504. */
|
|
31
|
+
retryStatuses?: ReadonlySet<number> | readonly number[];
|
|
32
|
+
/** Forward to the underlying `fetch`'s signal — abort cancels remaining retries. */
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
/** Callback for diagnostics / logging on each retry. */
|
|
35
|
+
onRetry?: (info: {
|
|
36
|
+
attempt: number;
|
|
37
|
+
delayMs: number;
|
|
38
|
+
error?: unknown;
|
|
39
|
+
status?: number;
|
|
40
|
+
}) => void;
|
|
41
|
+
}
|
|
42
|
+
declare function fetchWithRetry(input: string | URL, init?: RequestInit, retry?: FetchRetryOptions): Promise<Response>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region lib/index.d.ts
|
|
45
|
+
declare const OsNameSchema: z.ZodEnum<{
|
|
46
|
+
linux: "linux";
|
|
47
|
+
windows: "windows";
|
|
48
|
+
osx: "osx";
|
|
49
|
+
}>;
|
|
50
|
+
declare const OsArchSchema: z.ZodEnum<{
|
|
51
|
+
x86: "x86";
|
|
52
|
+
x86_64: "x86_64";
|
|
53
|
+
arm: "arm";
|
|
54
|
+
aarch64: "aarch64";
|
|
55
|
+
any: "any";
|
|
56
|
+
}>;
|
|
57
|
+
declare const RuleSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
+
action: z.ZodEnum<{
|
|
59
|
+
allow: "allow";
|
|
60
|
+
disallow: "disallow";
|
|
61
|
+
}>;
|
|
62
|
+
os: z.ZodObject<{
|
|
63
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
linux: "linux";
|
|
65
|
+
windows: "windows";
|
|
66
|
+
osx: "osx";
|
|
67
|
+
}>>;
|
|
68
|
+
version: z.ZodOptional<z.ZodString>;
|
|
69
|
+
arch: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
x86: "x86";
|
|
71
|
+
x86_64: "x86_64";
|
|
72
|
+
arm: "arm";
|
|
73
|
+
aarch64: "aarch64";
|
|
74
|
+
any: "any";
|
|
75
|
+
}>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
action: z.ZodEnum<{
|
|
79
|
+
allow: "allow";
|
|
80
|
+
disallow: "disallow";
|
|
81
|
+
}>;
|
|
82
|
+
features: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
action: z.ZodEnum<{
|
|
85
|
+
allow: "allow";
|
|
86
|
+
disallow: "disallow";
|
|
87
|
+
}>;
|
|
88
|
+
}, z.core.$strip>]>;
|
|
89
|
+
declare function decodeManifest(wire: unknown): Manifest;
|
|
90
|
+
declare function encodeManifest(domain: Manifest): unknown;
|
|
91
|
+
declare function parseManifest(input: string): Manifest;
|
|
92
|
+
declare function filterManifest(manifest: Manifest, platform: OsOptions, features?: string[]): Manifest;
|
|
93
|
+
declare function resolveVars(vars: Record<string, string>): Record<string, string>;
|
|
94
|
+
declare function interpolate(template: string, vars: Record<string, string>): string;
|
|
95
|
+
declare function resolvedArgs(launch: Launch, platform: OsOptions, features?: string[]): string[];
|
|
96
|
+
declare function resolvedEnvs(launch: Launch, platform: OsOptions, features?: string[]): Record<string, string>;
|
|
97
|
+
declare function satisfiesRuleset(rules: Ruleset | string | unknown, platform: OsOptions, features?: string[]): boolean;
|
|
98
|
+
declare function globBase(glob: string): string;
|
|
99
|
+
declare function globToRegexSource(glob: string): string;
|
|
100
|
+
/** Compile a glob to a real `RegExp` (the binding returns the source string). */
|
|
101
|
+
declare function globToRegex(glob: string): RegExp;
|
|
102
|
+
type OsOptions = napi.OsOptions;
|
|
103
|
+
type OsName = 'linux' | 'windows' | 'osx';
|
|
104
|
+
type OsArch = 'x86' | 'x86_64' | 'arm' | 'aarch64' | 'any';
|
|
105
|
+
interface OsConstraint {
|
|
106
|
+
readonly name?: OsName;
|
|
107
|
+
readonly version?: string;
|
|
108
|
+
readonly arch?: OsArch;
|
|
109
|
+
}
|
|
110
|
+
type RuleAction = 'allow' | 'disallow';
|
|
111
|
+
type FeatureConstraint = Record<string, boolean>;
|
|
112
|
+
type Rule = {
|
|
113
|
+
action: RuleAction;
|
|
114
|
+
os: OsConstraint;
|
|
115
|
+
} | {
|
|
116
|
+
action: RuleAction;
|
|
117
|
+
features: FeatureConstraint;
|
|
118
|
+
} | {
|
|
119
|
+
action: RuleAction;
|
|
120
|
+
};
|
|
121
|
+
type Ruleset = Rule[];
|
|
122
|
+
type Source = {
|
|
123
|
+
readonly kind: 'url';
|
|
124
|
+
readonly url: string;
|
|
125
|
+
} | {
|
|
126
|
+
readonly kind: 'file';
|
|
127
|
+
readonly file: string;
|
|
128
|
+
} | {
|
|
129
|
+
readonly kind: 'string';
|
|
130
|
+
readonly string: string;
|
|
131
|
+
} | {
|
|
132
|
+
readonly kind: 'bytes';
|
|
133
|
+
readonly bytes: string;
|
|
134
|
+
} | {
|
|
135
|
+
readonly kind: 'pointer';
|
|
136
|
+
readonly pointer: string;
|
|
137
|
+
};
|
|
138
|
+
type HashEntry = {
|
|
139
|
+
sha1: string;
|
|
140
|
+
} | {
|
|
141
|
+
sha256: string;
|
|
142
|
+
} | {
|
|
143
|
+
md5: string;
|
|
144
|
+
};
|
|
145
|
+
type Integrity = HashEntry | HashEntry[];
|
|
146
|
+
type HashAlgo = 'sha1' | 'sha256' | 'md5';
|
|
147
|
+
type HashRef = {
|
|
148
|
+
readonly sha256: string;
|
|
149
|
+
} | {
|
|
150
|
+
readonly sha1: string;
|
|
151
|
+
} | {
|
|
152
|
+
readonly md5: string;
|
|
153
|
+
};
|
|
154
|
+
interface IntegrityProbes {
|
|
155
|
+
readonly header?: HashRef;
|
|
156
|
+
readonly url?: HashRef;
|
|
157
|
+
}
|
|
158
|
+
interface SizeProbes {
|
|
159
|
+
readonly header?: string;
|
|
160
|
+
}
|
|
161
|
+
interface Discovery {
|
|
162
|
+
readonly integrity?: IntegrityProbes;
|
|
163
|
+
readonly size?: SizeProbes;
|
|
164
|
+
}
|
|
165
|
+
interface ExtractPick {
|
|
166
|
+
readonly kind: 'pick';
|
|
167
|
+
readonly file: string;
|
|
168
|
+
readonly into: string;
|
|
169
|
+
}
|
|
170
|
+
interface ExtractScan {
|
|
171
|
+
readonly kind: 'scan';
|
|
172
|
+
readonly matches: string;
|
|
173
|
+
readonly into: string;
|
|
174
|
+
readonly strip?: string[];
|
|
175
|
+
readonly includes?: string[];
|
|
176
|
+
readonly excludes?: string[];
|
|
177
|
+
}
|
|
178
|
+
interface ExtractDump {
|
|
179
|
+
readonly kind: 'dump';
|
|
180
|
+
readonly into: string;
|
|
181
|
+
readonly clean?: boolean;
|
|
182
|
+
readonly includes?: string[];
|
|
183
|
+
readonly excludes?: string[];
|
|
184
|
+
}
|
|
185
|
+
type ExtractRule = ExtractPick | ExtractScan | ExtractDump;
|
|
186
|
+
interface Artifact {
|
|
187
|
+
readonly path: string;
|
|
188
|
+
readonly source: Source;
|
|
189
|
+
readonly size?: number;
|
|
190
|
+
readonly rules: Ruleset;
|
|
191
|
+
readonly integrity?: Integrity;
|
|
192
|
+
readonly discovery?: Discovery;
|
|
193
|
+
readonly metadata?: unknown;
|
|
194
|
+
readonly extract?: ExtractRule[];
|
|
195
|
+
}
|
|
196
|
+
interface Val {
|
|
197
|
+
readonly rules: Ruleset;
|
|
198
|
+
readonly value: string[];
|
|
199
|
+
}
|
|
200
|
+
type Valset = Val[];
|
|
201
|
+
interface ConditionalVal {
|
|
202
|
+
readonly value: string;
|
|
203
|
+
readonly rules: Ruleset;
|
|
204
|
+
}
|
|
205
|
+
type ValDefs = Readonly<Record<string, string | readonly ConditionalVal[]>>;
|
|
206
|
+
interface Launch {
|
|
207
|
+
readonly command: string;
|
|
208
|
+
readonly workdir: string;
|
|
209
|
+
readonly args: Valset;
|
|
210
|
+
readonly envs: ValDefs;
|
|
211
|
+
}
|
|
212
|
+
interface Manifest {
|
|
213
|
+
readonly vars: ValDefs;
|
|
214
|
+
readonly launch?: Launch;
|
|
215
|
+
readonly artifacts: ReadonlyArray<Artifact>;
|
|
216
|
+
readonly restrict?: ReadonlyArray<string>;
|
|
217
|
+
}
|
|
218
|
+
interface PointerDescriptor {
|
|
219
|
+
readonly source: Source;
|
|
220
|
+
readonly integrity?: Integrity;
|
|
221
|
+
readonly size?: number;
|
|
222
|
+
}
|
|
223
|
+
declare const sourceUrl: (url: string) => Source;
|
|
224
|
+
declare const sourceFile: (file: string) => Source;
|
|
225
|
+
declare const sourceString: (string: string) => Source;
|
|
226
|
+
declare const sourcePointer: (pointer: string) => Source;
|
|
227
|
+
declare const sourceBytes: (bytes: Uint8Array) => Source;
|
|
228
|
+
declare const isSourceUrl: (s: Source) => s is Extract<Source, {
|
|
229
|
+
kind: "url";
|
|
230
|
+
}>;
|
|
231
|
+
declare const isSourceFile: (s: Source) => s is Extract<Source, {
|
|
232
|
+
kind: "file";
|
|
233
|
+
}>;
|
|
234
|
+
declare const isSourceString: (s: Source) => s is Extract<Source, {
|
|
235
|
+
kind: "string";
|
|
236
|
+
}>;
|
|
237
|
+
declare const isSourceBytes: (s: Source) => s is Extract<Source, {
|
|
238
|
+
kind: "bytes";
|
|
239
|
+
}>;
|
|
240
|
+
declare const isSourcePointer: (s: Source) => s is Extract<Source, {
|
|
241
|
+
kind: "pointer";
|
|
242
|
+
}>;
|
|
243
|
+
declare const extractPick: (file: string, into: string) => ExtractPick;
|
|
244
|
+
declare const extractScan: (matches: string, into: string, opts?: Omit<ExtractScan, "kind" | "matches" | "into">) => ExtractScan;
|
|
245
|
+
declare const extractDump: (into: string, opts?: Omit<ExtractDump, "kind" | "into">) => ExtractDump;
|
|
246
|
+
declare const emptyRuleset: () => Ruleset;
|
|
247
|
+
declare const allowOsRuleset: (name: OsName) => Ruleset;
|
|
248
|
+
/** Deduplicate by normalized (posix) path; later entries win. */
|
|
249
|
+
declare function deduplicateArtifacts(artifacts: Artifact[]): Artifact[];
|
|
250
|
+
type RawSingle = string | Rule;
|
|
251
|
+
type RawRuleset = RawSingle | RawSingle[];
|
|
252
|
+
declare function parseShortRuleset(raw: RawRuleset): Ruleset;
|
|
253
|
+
declare function parseValset(raw: unknown): Valset;
|
|
254
|
+
//#endregion
|
|
255
|
+
export { Artifact, ConditionalVal, Discovery, ExtractDump, ExtractPick, ExtractRule, ExtractScan, FeatureConstraint, type FetchRetryOptions, HashAlgo, HashEntry, HashRef, Integrity, IntegrityProbes, Launch, Manifest, OPYS_USER_AGENT, OsArch, OsArchSchema, OsConstraint, OsName, OsNameSchema, OsOptions, PointerDescriptor, Rule, RuleAction, RuleSchema, Ruleset, SizeProbes, Source, Val, ValDefs, Valset, allowOsRuleset, decodeManifest, deduplicateArtifacts, emptyRuleset, encodeManifest, extractDump, extractPick, extractScan, fetchWithRetry, filterManifest, globBase, globToRegex, globToRegexSource, interpolate, isSourceBytes, isSourceFile, isSourcePointer, isSourceString, isSourceUrl, parseManifest, parseShortRuleset, parseValset, resolveVars, resolvedArgs, resolvedEnvs, satisfiesRuleset, sourceBytes, sourceFile, sourcePointer, sourceString, sourceUrl };
|
|
256
|
+
//# sourceMappingURL=index.d.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