@resourcexjs/core 2.20.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 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
  */
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=72D5E1C3B1B1B3BE64756E2164756E21
15753
+ //# debugId=FF36494D6FFC9A4764756E2164756E21