@plexor-dev/claude-code-plugin-staging 0.1.0-beta.2 → 0.1.0-beta.3
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.
- package/package.json +1 -1
- package/scripts/postinstall.js +23 -2
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -70,12 +70,15 @@ function chownRecursive(dirPath, uid, gid) {
|
|
|
70
70
|
|
|
71
71
|
const HOME_DIR = getHomeDir();
|
|
72
72
|
const COMMANDS_SOURCE = path.join(__dirname, '..', 'commands');
|
|
73
|
+
const LIB_SOURCE = path.join(__dirname, '..', 'lib');
|
|
73
74
|
const CLAUDE_COMMANDS_DIR = path.join(HOME_DIR, '.claude', 'commands');
|
|
74
75
|
const PLEXOR_PLUGINS_DIR = path.join(HOME_DIR, '.claude', 'plugins', 'plexor', 'commands');
|
|
76
|
+
const PLEXOR_LIB_DIR = path.join(HOME_DIR, '.claude', 'plugins', 'plexor', 'lib');
|
|
75
77
|
const PLEXOR_CONFIG_DIR = path.join(HOME_DIR, '.plexor');
|
|
76
78
|
const PLEXOR_CONFIG_FILE = path.join(PLEXOR_CONFIG_DIR, 'config.json');
|
|
77
79
|
|
|
78
80
|
// Default configuration for new installs
|
|
81
|
+
// STAGING PACKAGE - uses staging API
|
|
79
82
|
const DEFAULT_CONFIG = {
|
|
80
83
|
version: 1,
|
|
81
84
|
auth: {
|
|
@@ -84,7 +87,7 @@ const DEFAULT_CONFIG = {
|
|
|
84
87
|
},
|
|
85
88
|
settings: {
|
|
86
89
|
enabled: true,
|
|
87
|
-
apiUrl: "https://api.plexor.dev",
|
|
90
|
+
apiUrl: "https://staging.api.plexor.dev",
|
|
88
91
|
mode: "balanced",
|
|
89
92
|
localCacheEnabled: true
|
|
90
93
|
}
|
|
@@ -101,6 +104,9 @@ function main() {
|
|
|
101
104
|
// Create ~/.claude/plugins/plexor/commands/ for JS executors
|
|
102
105
|
fs.mkdirSync(PLEXOR_PLUGINS_DIR, { recursive: true });
|
|
103
106
|
|
|
107
|
+
// Create ~/.claude/plugins/plexor/lib/ for shared modules
|
|
108
|
+
fs.mkdirSync(PLEXOR_LIB_DIR, { recursive: true });
|
|
109
|
+
|
|
104
110
|
// Create ~/.plexor/ with secure permissions (owner only)
|
|
105
111
|
fs.mkdirSync(PLEXOR_CONFIG_DIR, { recursive: true, mode: 0o700 });
|
|
106
112
|
|
|
@@ -161,6 +167,18 @@ function main() {
|
|
|
161
167
|
jsInstalled.push(file);
|
|
162
168
|
}
|
|
163
169
|
|
|
170
|
+
// Copy lib files to ~/.claude/plugins/plexor/lib/
|
|
171
|
+
const libInstalled = [];
|
|
172
|
+
if (fs.existsSync(LIB_SOURCE)) {
|
|
173
|
+
const libFiles = fs.readdirSync(LIB_SOURCE).filter(f => f.endsWith('.js'));
|
|
174
|
+
for (const file of libFiles) {
|
|
175
|
+
const src = path.join(LIB_SOURCE, file);
|
|
176
|
+
const dest = path.join(PLEXOR_LIB_DIR, file);
|
|
177
|
+
fs.copyFileSync(src, dest);
|
|
178
|
+
libInstalled.push(file);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
164
182
|
// Fix file ownership when running with sudo
|
|
165
183
|
// Files are created as root but should be owned by the original user
|
|
166
184
|
if (targetUser) {
|
|
@@ -190,7 +208,10 @@ function main() {
|
|
|
190
208
|
}
|
|
191
209
|
console.log(` ✓ Installed ${installed.length} slash commands to ~/.claude/commands/`);
|
|
192
210
|
if (jsInstalled.length > 0) {
|
|
193
|
-
console.log(` ✓ Installed ${jsInstalled.length} executors to ~/.claude/plugins/plexor/`);
|
|
211
|
+
console.log(` ✓ Installed ${jsInstalled.length} executors to ~/.claude/plugins/plexor/commands/`);
|
|
212
|
+
}
|
|
213
|
+
if (libInstalled.length > 0) {
|
|
214
|
+
console.log(` ✓ Installed ${libInstalled.length} lib modules to ~/.claude/plugins/plexor/lib/`);
|
|
194
215
|
}
|
|
195
216
|
if (targetUser) {
|
|
196
217
|
console.log(` ✓ Set file ownership to ${targetUser.user}`);
|