mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(release): allow larger npm plugin artifacts (#117745)
This commit is contained in:
@@ -39,7 +39,8 @@ const MAX_ARCHIVE_BYTES = 256 * 1024 * 1024;
|
||||
const MAX_EXPANDED_BYTES = 512 * 1024 * 1024;
|
||||
const MAX_MANIFEST_BYTES = 4 * 1024 * 1024;
|
||||
const MAX_PLUGIN_MANIFEST_BYTES = 2 * 1024 * 1024;
|
||||
const MAX_TAR_ENTRIES = 10_000;
|
||||
// Bundled SDKs can exceed 10k files; byte, path, and expansion caps remain authoritative.
|
||||
const MAX_TAR_ENTRIES = 20_000;
|
||||
const MAX_TAR_PATH_BYTES = 4 * 1024 * 1024;
|
||||
const MAX_TAR_TOTAL_FILE_BYTES = 512 * 1024 * 1024;
|
||||
export const CLAWHUB_PUBLICATION_TAR_LIMITS = Object.freeze({
|
||||
|
||||
@@ -1158,14 +1158,14 @@ describe("plugin publication artifact", () => {
|
||||
createTarball([
|
||||
{ path: "package/", type: "5" },
|
||||
{ content: metaPackageJson(markerPath), path: "package/package.json" },
|
||||
...Array.from({ length: 10_000 }, (_, index) => ({
|
||||
...Array.from({ length: 20_000 }, (_, index) => ({
|
||||
path: `package/file-${index.toString().padStart(5, "0")}`,
|
||||
})),
|
||||
]),
|
||||
);
|
||||
|
||||
expect(() => createPluginPublicationArtifact(publicationParams(artifactDir))).toThrow(
|
||||
/exceeds the 10000 entry limit/u,
|
||||
/exceeds the 20000 entry limit/u,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user