mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-11 21:57:14 +03:00
- Bump skills plugin version 2.1.1 -> 3.0.0 (plugin.json, marketplace.json, harness SKILL.md files). CLI and Chrome extension unchanged. - Remove prefixed universal zip bundle and all related code: factory.js prefix/outputSuffix options, zip.js variant pass, utils.js prefixSkillReferences, the "universal-prefixed" entry in download-providers.js, and the matching test suite in utils.test.js. - Redesign Get Started step 1 "Install the skill and CLI": two terminal rows (npx skills + npm i -g impeccable) with paired notes, drop the Recommended badge. - Collapse "Other install methods" back into a <details> element so the primary install path is the first thing users see. - Simplify step 3 to "Add the Chrome extension": remove the CLI tool block (now in step 1), use standard .btn .btn-primary for the CTA so it matches other primary buttons (square corners, accent slide-up hover), and lay out the preview screenshot next to the button instead of stacked so the screenshot no longer dominates vertical space. - CLAUDE.md: rewrite with v3.0 architecture, the "no em dash also means no --" rule, the harness-dirs-are-tracked gotcha, the named-export test-spy warning, and the evals inline-skill.ts sync note. - AGENTS.md, DEVELOP.md: drop prefixed variant references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
62 lines
1.8 KiB
JavaScript
62 lines
1.8 KiB
JavaScript
/**
|
|
* ZIP Generation Utilities
|
|
*
|
|
* Creates ZIP bundles for each provider's distribution
|
|
* Uses archiver instead of shell `zip` for cross-platform compatibility
|
|
* (Cloudflare Pages build environment may not have zip installed)
|
|
*/
|
|
|
|
import path from 'path';
|
|
import { createWriteStream, existsSync, statSync } from 'fs';
|
|
import archiver from 'archiver';
|
|
|
|
/**
|
|
* Create ZIP file for a provider directory
|
|
* @param {string} providerDir - Path to provider directory
|
|
* @param {string} distDir - Path to dist directory
|
|
* @param {string} providerName - Name of the provider
|
|
*/
|
|
export async function createProviderZip(providerDir, distDir, providerName) {
|
|
const zipFileName = `${providerName}.zip`;
|
|
const zipPath = path.join(distDir, zipFileName);
|
|
|
|
if (!existsSync(providerDir)) {
|
|
console.warn(`⚠️ Provider directory not found: ${providerDir}`);
|
|
return;
|
|
}
|
|
|
|
try {
|
|
await new Promise((resolve, reject) => {
|
|
const output = createWriteStream(zipPath);
|
|
const archive = archiver('zip', { zlib: { level: 9 } });
|
|
|
|
output.on('close', resolve);
|
|
archive.on('error', reject);
|
|
|
|
archive.pipe(output);
|
|
archive.glob('**/*', {
|
|
cwd: providerDir,
|
|
dot: true,
|
|
ignore: ['**/.DS_Store'],
|
|
});
|
|
archive.finalize();
|
|
});
|
|
|
|
const stats = statSync(zipPath);
|
|
const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
|
|
console.log(` 📦 ${zipFileName} (${sizeMB} MB)`);
|
|
} catch (error) {
|
|
console.error(` ❌ Failed to create ${zipFileName}:`, error.message);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Create ZIP files for all providers + universal
|
|
* @param {string} distDir - Path to dist directory
|
|
*/
|
|
export async function createAllZips(distDir) {
|
|
console.log('\n📦 Creating ZIP bundles...');
|
|
|
|
await createProviderZip(path.join(distDir, 'universal'), distDir, 'universal');
|
|
}
|