Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/windows-installer-maxpath-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@asyncapi/cli": patch
---

fix: prune the unused Next.js standalone build from `@asyncapi/studio` before packing so the Windows installer no longer exceeds the 260-character `MAX_PATH` limit.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"pack:tarballs:alpine": "oclif pack tarballs -t linux-x64 && npm run pack:rename alpine",
"pack:windows": "oclif pack win && npm run pack:rename",
"pack:rename": "node scripts/releasePackagesRename.js",
"pretarball": "node ./scripts/pretarball.js",
"publish:trusted": "echo \"Working around changesets action not supporting OIDC yet. Need to pass successful release output for triggering github release\";VERSION=$(node -p \"require('./package.json').version\"); PACKAGE_NAME=$(node -p \"require('./package.json').name\"); if npm view $PACKAGE_NAME@$VERSION > /dev/null 2>&1; then echo \"Version $VERSION of package $PACKAGE_NAME already published to NPM. Skipping GitHub release.\"; else git tag v$VERSION -m v$VERSION; echo \"New tag: $PACKAGE_NAME@$VERSION.\"; fi",
"prepublishOnly": "npm run build",
"pretest": "npm run build",
Expand Down
19 changes: 19 additions & 0 deletions scripts/pretarball.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable no-console */

const fs = require('node:fs');
const path = require('node:path');

// Paths are relative to the oclif workspace root (process.cwd()).
const targets = [
path.join('node_modules', '@asyncapi', 'studio', 'build', 'standalone'),
];

for (const rel of targets) {
const abs = path.resolve(process.cwd(), rel);
if (fs.existsSync(abs)) {
fs.rmSync(abs, { recursive: true, force: true });
console.log(`[pretarball] removed ${rel}`);
} else {
console.log(`[pretarball] skip (not found) ${rel}`);
}
}
Loading