@l4yercak3/cli 1.3.0 → 1.3.2
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/.claude/settings.local.json +8 -1
- package/package.json +1 -1
- package/src/commands/connect.js +17 -7
- package/src/commands/spread.js +30 -9
|
@@ -23,7 +23,14 @@
|
|
|
23
23
|
"Bash(node:*)",
|
|
24
24
|
"Bash(node -c:*)",
|
|
25
25
|
"Bash(grep:*)",
|
|
26
|
-
"Bash(git stash:*)"
|
|
26
|
+
"Bash(git stash:*)",
|
|
27
|
+
"Bash(git -C /Users/foundbrand_001/Development/l4yercak3-cli status --short)",
|
|
28
|
+
"Bash(git -C /Users/foundbrand_001/Development/l4yercak3-cli log --oneline -5)",
|
|
29
|
+
"Bash(git -C /Users/foundbrand_001/Development/l4yercak3-cli diff --stat)",
|
|
30
|
+
"Bash(git -C /Users/foundbrand_001/Development/l4yercak3-cli add -A)",
|
|
31
|
+
"Bash(git -C /Users/foundbrand_001/Development/l4yercak3-cli commit -m \"$\\(cat <<''EOF''\nfeat: CLI-to-platform bridge with smart feature detection\n\nAdd model/route scanning, manifest generation, and platform bridge commands\n\\(connect, scaffold, sync\\). Feature selection now auto-checks based on\ndetected data models via mapping suggestor heuristics.\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
|
|
32
|
+
"Bash(npm --prefix /Users/foundbrand_001/Development/l4yercak3-cli version patch:*)",
|
|
33
|
+
"Bash(npm:*)"
|
|
27
34
|
]
|
|
28
35
|
}
|
|
29
36
|
}
|
package/package.json
CHANGED
package/src/commands/connect.js
CHANGED
|
@@ -219,21 +219,31 @@ async function handleConnect() {
|
|
|
219
219
|
* @param {Object<string, string>} vars - Key-value pairs to set
|
|
220
220
|
*/
|
|
221
221
|
function updateEnvFile(envPath, vars) {
|
|
222
|
-
let
|
|
222
|
+
let existing = '';
|
|
223
223
|
if (fs.existsSync(envPath)) {
|
|
224
|
-
|
|
224
|
+
existing = fs.readFileSync(envPath, 'utf8');
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
const linesToAppend = [];
|
|
228
|
+
const skipped = [];
|
|
229
|
+
|
|
227
230
|
for (const [key, value] of Object.entries(vars)) {
|
|
228
|
-
const regex = new RegExp(`^${key}
|
|
229
|
-
if (regex.test(
|
|
230
|
-
|
|
231
|
+
const regex = new RegExp(`^${key}=`, 'm');
|
|
232
|
+
if (regex.test(existing)) {
|
|
233
|
+
skipped.push(key);
|
|
231
234
|
} else {
|
|
232
|
-
|
|
235
|
+
linesToAppend.push(`${key}=${value}`);
|
|
233
236
|
}
|
|
234
237
|
}
|
|
235
238
|
|
|
236
|
-
|
|
239
|
+
if (skipped.length > 0) {
|
|
240
|
+
console.log(chalk.gray(` Skipped (already set): ${skipped.join(', ')}`));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (linesToAppend.length > 0) {
|
|
244
|
+
const suffix = `\n# Added by l4yercak3 CLI\n${linesToAppend.join('\n')}\n`;
|
|
245
|
+
fs.appendFileSync(envPath, existing.endsWith('\n') ? suffix : `\n${suffix}`, 'utf8');
|
|
246
|
+
}
|
|
237
247
|
}
|
|
238
248
|
|
|
239
249
|
module.exports = {
|
package/src/commands/spread.js
CHANGED
|
@@ -421,22 +421,43 @@ async function handleSpread() {
|
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
// Step 4: Feature selection
|
|
424
|
+
// Auto-check features based on detected model mappings
|
|
425
|
+
const platformTypeToFeature = {
|
|
426
|
+
contact: 'crm',
|
|
427
|
+
booking: 'events',
|
|
428
|
+
event: 'events',
|
|
429
|
+
product: 'products',
|
|
430
|
+
invoice: 'invoicing',
|
|
431
|
+
project: 'projects',
|
|
432
|
+
form: 'forms',
|
|
433
|
+
certificate: 'certificates',
|
|
434
|
+
benefit: 'benefits',
|
|
435
|
+
};
|
|
436
|
+
const autoCheckedFeatures = new Set(['crm']); // CRM always default
|
|
437
|
+
for (const mapping of mappings) {
|
|
438
|
+
const feature = platformTypeToFeature[mapping.platformType];
|
|
439
|
+
if (feature) autoCheckedFeatures.add(feature);
|
|
440
|
+
}
|
|
441
|
+
|
|
424
442
|
console.log(chalk.cyan(' ⚙️ Feature Selection\n'));
|
|
443
|
+
if (mappings.length > 0) {
|
|
444
|
+
console.log(chalk.gray(' Features pre-selected based on detected models:\n'));
|
|
445
|
+
}
|
|
425
446
|
const { features } = await inquirer.prompt([
|
|
426
447
|
{
|
|
427
448
|
type: 'checkbox',
|
|
428
449
|
name: 'features',
|
|
429
450
|
message: 'Select features to enable:',
|
|
430
451
|
choices: [
|
|
431
|
-
{ name: 'CRM (contacts, organizations)', value: 'crm', checked:
|
|
432
|
-
{ name: 'Events (event management, registrations)', value: 'events', checked:
|
|
433
|
-
{ name: 'Forms (form builder, submissions)', value: 'forms', checked:
|
|
434
|
-
{ name: 'Products (product catalog, inventory)', value: 'products', checked:
|
|
435
|
-
{ name: 'Checkout (cart, payments)', value: 'checkout', checked:
|
|
436
|
-
{ name: 'Invoicing (B2B/B2C invoices)', value: 'invoicing', checked:
|
|
437
|
-
{ name: 'Benefits (claims, commissions)', value: 'benefits', checked:
|
|
438
|
-
{ name: 'Certificates (CME, attendance)', value: 'certificates', checked:
|
|
439
|
-
{ name: 'Projects (task management)', value: 'projects', checked:
|
|
452
|
+
{ name: 'CRM (contacts, organizations)', value: 'crm', checked: autoCheckedFeatures.has('crm') },
|
|
453
|
+
{ name: 'Events (event management, registrations)', value: 'events', checked: autoCheckedFeatures.has('events') },
|
|
454
|
+
{ name: 'Forms (form builder, submissions)', value: 'forms', checked: autoCheckedFeatures.has('forms') },
|
|
455
|
+
{ name: 'Products (product catalog, inventory)', value: 'products', checked: autoCheckedFeatures.has('products') },
|
|
456
|
+
{ name: 'Checkout (cart, payments)', value: 'checkout', checked: autoCheckedFeatures.has('checkout') },
|
|
457
|
+
{ name: 'Invoicing (B2B/B2C invoices)', value: 'invoicing', checked: autoCheckedFeatures.has('invoicing') },
|
|
458
|
+
{ name: 'Benefits (claims, commissions)', value: 'benefits', checked: autoCheckedFeatures.has('benefits') },
|
|
459
|
+
{ name: 'Certificates (CME, attendance)', value: 'certificates', checked: autoCheckedFeatures.has('certificates') },
|
|
460
|
+
{ name: 'Projects (task management)', value: 'projects', checked: autoCheckedFeatures.has('projects') },
|
|
440
461
|
{ name: 'OAuth Authentication', value: 'oauth', checked: false },
|
|
441
462
|
],
|
|
442
463
|
},
|