@telelabsai/ship 1.1.12 → 1.1.16

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.
@@ -1,6 +1,6 @@
1
1
  const https = require('https');
2
2
  const http = require('http');
3
- const { execSync, spawn } = require('child_process');
3
+ const { execSync } = require('child_process');
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
6
  const prompts = require('prompts');
@@ -97,11 +97,10 @@ function sync(args) {
97
97
  }
98
98
  }
99
99
 
100
- // Install via claude plugin add
100
+ // Install via claude plugin marketplace add + plugin install
101
101
  console.log(`\n Installing "${selected.name}"...\n`);
102
102
 
103
103
  try {
104
- // Check if claude is installed
105
104
  execSync('claude --version', { stdio: 'pipe' });
106
105
  } catch {
107
106
  console.error(' Error: Claude Code is not installed.');
@@ -109,25 +108,50 @@ function sync(args) {
109
108
  process.exit(1);
110
109
  }
111
110
 
112
- const claude = spawn('claude', ['plugin', 'add', selected.deployUrl], {
113
- stdio: 'inherit',
114
- cwd: process.cwd(),
115
- });
111
+ // Step 1: Add the marketplace
112
+ console.log(' Adding marketplace...\n');
113
+ try {
114
+ execSync(`claude plugin marketplace add ${selected.deployUrl}`, {
115
+ stdio: 'inherit',
116
+ cwd: process.cwd(),
117
+ });
118
+ } catch (err) {
119
+ console.error(`\n Failed to add marketplace.\n`);
120
+ process.exit(1);
121
+ }
122
+
123
+ // Step 2: Install each plugin
124
+ const plugins = selected.plugins || [];
125
+ const marketplaceName = selected.marketplaceName;
126
+
127
+ if (!marketplaceName || plugins.length === 0) {
128
+ console.log(' ✓ Marketplace added. No plugins to auto-install.\n');
129
+ saveSyncConfig(process.cwd(), selected.slug);
130
+ process.exit(0);
131
+ }
116
132
 
117
- claude.on('close', (code) => {
118
- if (code === 0) {
119
- console.log(`\n ✓ "${selected.name}" installed successfully.\n`);
120
- saveSyncConfig(process.cwd(), selected.slug);
121
- } else {
122
- console.error(`\n Plugin install exited with code ${code}\n`);
133
+ let failed = false;
134
+ for (const plugin of plugins) {
135
+ const installId = `${plugin.name}@${marketplaceName}`;
136
+ console.log(` Installing ${installId}...\n`);
137
+ try {
138
+ execSync(`claude plugin install ${installId}`, {
139
+ stdio: 'inherit',
140
+ cwd: process.cwd(),
141
+ });
142
+ } catch {
143
+ console.error(` Failed to install ${installId}\n`);
144
+ failed = true;
123
145
  }
124
- process.exit(code || 0);
125
- });
146
+ }
126
147
 
127
- claude.on('error', (err) => {
128
- console.error(` Error running Claude Code: ${err.message}\n`);
129
- process.exit(1);
130
- });
148
+ if (!failed) {
149
+ console.log(`\n "${selected.name}" installed successfully.\n`);
150
+ } else {
151
+ console.log(`\n ⚠ Some plugins failed to install.\n`);
152
+ }
153
+ saveSyncConfig(process.cwd(), selected.slug);
154
+ process.exit(failed ? 1 : 0);
131
155
  });
132
156
  }
133
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telelabsai/ship",
3
- "version": "1.1.12",
3
+ "version": "1.1.16",
4
4
  "description": "Ship code faster with pre-configured agents, skills, rules, and hooks for Claude Code.",
5
5
  "bin": {
6
6
  "ship": "cli/bin.js"