browser-extension-manager 1.2.9 → 1.2.11

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.
@@ -341,18 +341,20 @@ async function packageSource() {
341
341
  },
342
342
  });
343
343
 
344
- // Write instructions to project root temporarily
345
- const instructionsPath = path.join(process.cwd(), 'BUILD_INSTRUCTIONS.md');
346
- jetpack.write(instructionsPath, instructions);
344
+ // Backup existing README.md if it exists
345
+ const readmePath = path.join(process.cwd(), 'README.md');
346
+ const readmeBackup = jetpack.read(readmePath);
347
+
348
+ // Replace README.md with build instructions temporarily
349
+ jetpack.write(readmePath, instructions);
347
350
 
348
351
  // Create source zip using git archive (respects .gitignore)
349
352
  await execute(`git archive --format=zip --output=${sourceZipPath} HEAD`);
350
353
 
351
- // Add BUILD_INSTRUCTIONS.md to the zip
352
- await execute(`zip -u ${sourceZipPath} BUILD_INSTRUCTIONS.md`);
353
-
354
- // Clean up temp file
355
- jetpack.remove(instructionsPath);
354
+ // Restore original README.md
355
+ if (readmeBackup) {
356
+ jetpack.write(readmePath, readmeBackup);
357
+ }
356
358
 
357
359
  logger.log(`Source code zip created at ${sourceZipPath}`);
358
360
  } catch (e) {
@@ -31,6 +31,16 @@ const LANGUAGES = [
31
31
  const localesDir = path.join(process.cwd(), 'src', '_locales');
32
32
  const enMessagesPath = path.join(localesDir, 'en', 'messages.json');
33
33
 
34
+ // Check if Claude CLI is installed
35
+ async function isClaudeInstalled() {
36
+ try {
37
+ await execute('which claude');
38
+ return true;
39
+ } catch (e) {
40
+ return false;
41
+ }
42
+ }
43
+
34
44
  // Main translate task
35
45
  async function translate(complete) {
36
46
  // Only run in build mode
@@ -39,6 +49,12 @@ async function translate(complete) {
39
49
  return complete();
40
50
  }
41
51
 
52
+ // Check if Claude CLI is installed
53
+ if (!await isClaudeInstalled()) {
54
+ logger.log('Skipping translation (Claude CLI not installed)');
55
+ return complete();
56
+ }
57
+
42
58
  // Log
43
59
  logger.log('Starting translation...');
44
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-manager",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
4
4
  "description": "Browser Extension Manager dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {