@pierre/storage 1.2.0 → 1.2.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/README.md +2 -0
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
- package/src/index.ts +3 -0
- package/src/types.ts +1 -0
package/README.md
CHANGED
|
@@ -171,6 +171,7 @@ const archiveResp = await repo.getArchiveStream({
|
|
|
171
171
|
ref: 'main',
|
|
172
172
|
includeGlobs: ['README.md'],
|
|
173
173
|
excludeGlobs: ['vendor/**'],
|
|
174
|
+
maxBlobSize: 1024 * 1024, // optional max file size in bytes
|
|
174
175
|
archivePrefix: 'repo/',
|
|
175
176
|
});
|
|
176
177
|
const archiveBytes = new Uint8Array(await archiveResp.arrayBuffer());
|
|
@@ -469,6 +470,7 @@ interface ArchiveOptions {
|
|
|
469
470
|
ref?: string; // Branch, tag, or commit SHA (defaults to default branch)
|
|
470
471
|
includeGlobs?: string[];
|
|
471
472
|
excludeGlobs?: string[];
|
|
473
|
+
maxBlobSize?: number; // Optional max file size in bytes
|
|
472
474
|
archivePrefix?: string;
|
|
473
475
|
ttl?: number;
|
|
474
476
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -530,7 +530,7 @@ function concatChunks(a, b) {
|
|
|
530
530
|
|
|
531
531
|
// package.json
|
|
532
532
|
var package_default = {
|
|
533
|
-
version: "1.2.
|
|
533
|
+
version: "1.2.1"};
|
|
534
534
|
|
|
535
535
|
// src/version.ts
|
|
536
536
|
var PACKAGE_NAME = "code-storage-sdk";
|
|
@@ -1862,6 +1862,9 @@ var RepoImpl = class {
|
|
|
1862
1862
|
if (Array.isArray(options.excludeGlobs) && options.excludeGlobs.length > 0) {
|
|
1863
1863
|
body.exclude_globs = options.excludeGlobs;
|
|
1864
1864
|
}
|
|
1865
|
+
if (typeof options.maxBlobSize === "number" && Number.isFinite(options.maxBlobSize)) {
|
|
1866
|
+
body.max_blob_size = options.maxBlobSize;
|
|
1867
|
+
}
|
|
1865
1868
|
if (typeof options.archivePrefix === "string") {
|
|
1866
1869
|
const prefix = options.archivePrefix.trim();
|
|
1867
1870
|
if (prefix) {
|