@codapult/cli 0.1.4 → 0.2.0
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/dist/commands/plugins.d.ts +1 -0
- package/dist/commands/plugins.js +10 -2
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function pluginsAddCommand(name: string, options: {
|
|
2
2
|
from?: string;
|
|
3
|
+
ci?: boolean;
|
|
3
4
|
}): Promise<void>;
|
|
4
5
|
export declare function pluginsRemoveCommand(name: string): Promise<void>;
|
|
5
6
|
export declare function pluginsMigrateCommand(name: string | undefined, options: {
|
package/dist/commands/plugins.js
CHANGED
|
@@ -121,12 +121,20 @@ export async function pluginsAddCommand(name, options) {
|
|
|
121
121
|
info('Registering plugin...');
|
|
122
122
|
createPluginRegistration(root, manifest.name, manifest.package, 'add');
|
|
123
123
|
success(`src/plugins/${manifest.name}.ts created`);
|
|
124
|
-
// 9. Append env vars
|
|
125
|
-
if (manifest.install.env && Object.keys(manifest.install.env).length > 0) {
|
|
124
|
+
// 9. Append env vars (skipped in CI — env vars are configured in the hosting dashboard)
|
|
125
|
+
if (!options.ci && manifest.install.env && Object.keys(manifest.install.env).length > 0) {
|
|
126
126
|
info('Adding environment variables...');
|
|
127
127
|
patchEnvFile(root, manifest.name, manifest.install.env, 'add');
|
|
128
128
|
success('Environment variables added to .env.local');
|
|
129
129
|
}
|
|
130
|
+
if (options.ci) {
|
|
131
|
+
heading('Done!');
|
|
132
|
+
success(`Plugin "${manifest.name}" installed (CI mode).`);
|
|
133
|
+
dim('Skipped: pnpm install, db:push, env patching, optional deps.');
|
|
134
|
+
dim('Run pnpm install separately after this command.');
|
|
135
|
+
console.log();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
130
138
|
// 10. pnpm install
|
|
131
139
|
info('Installing dependencies...');
|
|
132
140
|
if (!execQuiet('pnpm install --no-frozen-lockfile', root)) {
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ plugins
|
|
|
47
47
|
.command('add <name>')
|
|
48
48
|
.description('install a plugin (local or remote)')
|
|
49
49
|
.option('--from <url>', 'git URL to clone the plugin from')
|
|
50
|
+
.option('--ci', 'CI/Vercel mode: skip pnpm install, db:push, env patching, and interactive prompts')
|
|
50
51
|
.action(pluginsAddCommand);
|
|
51
52
|
plugins.command('remove <name>').description('uninstall a plugin').action(pluginsRemoveCommand);
|
|
52
53
|
plugins
|