@resourcexjs/core 2.19.0 → 2.21.0
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/dist/index.d.ts +11 -8
- package/dist/index.js +11 -1
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -853,6 +853,14 @@ declare class CASRegistry implements Registry {
|
|
|
853
853
|
remove(rxi: RXI): Promise<void>;
|
|
854
854
|
list(options?: SearchOptions): Promise<RXI[]>;
|
|
855
855
|
/**
|
|
856
|
+
* Get a single file from a resource by filename.
|
|
857
|
+
* Looks up the file's digest in the manifest, then retrieves the blob directly.
|
|
858
|
+
* Much cheaper than get() — no archive reassembly needed.
|
|
859
|
+
*
|
|
860
|
+
* @returns File content as Buffer, or null if resource or file not found.
|
|
861
|
+
*/
|
|
862
|
+
getFile(rxi: RXI, file: string): Promise<Buffer | null>;
|
|
863
|
+
/**
|
|
856
864
|
* Get stored manifest metadata without extracting file contents.
|
|
857
865
|
* Useful for freshness checks (accessing updatedAt) without the cost of blob retrieval.
|
|
858
866
|
*/
|
|
@@ -968,16 +976,11 @@ declare class MemoryRXMStore implements RXMStore {
|
|
|
968
976
|
}
|
|
969
977
|
/**
|
|
970
978
|
* Isolator type for resolver execution.
|
|
971
|
-
* Matches SandboX isolator types directly.
|
|
972
|
-
* Configured at Registry level, not per-type.
|
|
973
979
|
*
|
|
974
|
-
* - "none": No isolation,
|
|
975
|
-
* - "
|
|
976
|
-
* - "cloudflare": Container isolation (~100ms), local Docker or edge
|
|
977
|
-
* - "e2b": MicroVM isolation (~150ms), production (planned)
|
|
978
|
-
* - "custom": User-provided executor function
|
|
980
|
+
* - "none": No isolation, direct eval execution (default)
|
|
981
|
+
* - "custom": User-provided executor function (e.g., QuickJS Wasm for Workers)
|
|
979
982
|
*/
|
|
980
|
-
type IsolatorType = "none" | "
|
|
983
|
+
type IsolatorType = "none" | "custom";
|
|
981
984
|
/**
|
|
982
985
|
* Custom executor function for resolver execution.
|
|
983
986
|
* Used when isolator is set to "custom".
|
package/dist/index.js
CHANGED
|
@@ -15348,6 +15348,16 @@ class CASRegistry {
|
|
|
15348
15348
|
tag: m.tag
|
|
15349
15349
|
}));
|
|
15350
15350
|
}
|
|
15351
|
+
async getFile(rxi, file2) {
|
|
15352
|
+
const tag = await this.resolveTag(rxi.name, rxi.tag ?? "latest", rxi.registry);
|
|
15353
|
+
const storedRxm = await this.rxmStore.get(rxi.name, tag, rxi.registry);
|
|
15354
|
+
if (!storedRxm)
|
|
15355
|
+
return null;
|
|
15356
|
+
const digest = storedRxm.files[file2];
|
|
15357
|
+
if (!digest)
|
|
15358
|
+
return null;
|
|
15359
|
+
return this.rxaStore.get(digest);
|
|
15360
|
+
}
|
|
15351
15361
|
async getStoredManifest(rxi) {
|
|
15352
15362
|
const tag = await this.resolveTag(rxi.name, rxi.tag ?? "latest", rxi.registry);
|
|
15353
15363
|
return this.rxmStore.get(rxi.name, tag, rxi.registry);
|
|
@@ -15740,4 +15750,4 @@ export {
|
|
|
15740
15750
|
CASRegistry
|
|
15741
15751
|
};
|
|
15742
15752
|
|
|
15743
|
-
//# debugId=
|
|
15753
|
+
//# debugId=FF36494D6FFC9A4764756E2164756E21
|