create-nextly-app 0.0.2-alpha.66 → 0.0.2-alpha.67

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/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'module';
3
- import { __commonJS, __require, __toESM, init, resolveProjectArg, validateProjectName, capture, createNextly, shutdown } from './chunk-I2U7KBH6.mjs';
3
+ import { __commonJS, __require, __toESM, getAvailableTemplateNames, init, packageVersion, resolveProjectArg, validateProjectName, validateTemplateName, capture, createNextly, shutdown } from './chunk-XCYSH46I.mjs';
4
4
 
5
5
  createRequire(import.meta.url);
6
6
 
@@ -3429,99 +3429,6 @@ var require_commander = __commonJS({
3429
3429
  }
3430
3430
  });
3431
3431
 
3432
- // package.json
3433
- var require_package = __commonJS({
3434
- "package.json"(exports$1, module) {
3435
- module.exports = {
3436
- name: "create-nextly-app",
3437
- version: "0.0.2-alpha.66",
3438
- description: "CLI to scaffold Nextly in your Next.js project",
3439
- license: "MIT",
3440
- type: "module",
3441
- main: "dist/index.mjs",
3442
- module: "dist/index.mjs",
3443
- types: "dist/index.d.ts",
3444
- bin: {
3445
- "create-nextly-app": "./bin/create-nextly-app.js"
3446
- },
3447
- exports: {
3448
- ".": {
3449
- types: "./dist/index.d.ts",
3450
- import: "./dist/index.mjs",
3451
- require: "./dist/index.cjs"
3452
- }
3453
- },
3454
- files: [
3455
- "dist",
3456
- "bin",
3457
- "templates"
3458
- ],
3459
- scripts: {
3460
- build: "tsup",
3461
- dev: "tsup --watch",
3462
- "check-types": "tsc --noEmit",
3463
- lint: "eslint . --max-warnings 0",
3464
- "lint:fix": "eslint . --fix",
3465
- test: "vitest run --passWithNoTests",
3466
- "test:watch": "vitest",
3467
- clean: "rimraf dist"
3468
- },
3469
- dependencies: {
3470
- "@clack/prompts": "^1.1.0",
3471
- commander: "^14.0.2",
3472
- execa: "^9.6.0",
3473
- "fs-extra": "^11.3.0",
3474
- picocolors: "^1.1.1",
3475
- tar: "^7.5.19"
3476
- },
3477
- devDependencies: {
3478
- "@nextlyhq/eslint-config": "workspace:*",
3479
- "@nextlyhq/eslint-plugin": "workspace:*",
3480
- "@nextlyhq/telemetry": "workspace:*",
3481
- "@nextlyhq/tsconfig": "workspace:*",
3482
- "@types/fs-extra": "^11.0.4",
3483
- "@types/node": "^20.19.17",
3484
- "@types/tar": "^6.1.13",
3485
- "@typescript-eslint/parser": "^8.59.0",
3486
- "@vitest/coverage-v8": "^4.1.0",
3487
- "@vitest/ui": "^4.1.0",
3488
- eslint: "^9.39.1",
3489
- tsup: "^8.5.0",
3490
- typescript: "^5.9.3",
3491
- "vite-tsconfig-paths": "^5.1.4",
3492
- vitest: "^4.1.0"
3493
- },
3494
- engines: {
3495
- node: "^20.19.0 || ^22.12.0 || >=24.0.0"
3496
- },
3497
- keywords: [
3498
- "nextly",
3499
- "cms",
3500
- "nextjs",
3501
- "cli",
3502
- "scaffold",
3503
- "create-nextly-app",
3504
- "create-app"
3505
- ],
3506
- repository: {
3507
- type: "git",
3508
- url: "git+https://github.com/nextlyhq/nextly.git",
3509
- directory: "packages/create-nextly-app"
3510
- },
3511
- publishConfig: {
3512
- access: "public",
3513
- registry: "https://registry.npmjs.org/",
3514
- provenance: true
3515
- },
3516
- homepage: "https://nextlyhq.com",
3517
- bugs: {
3518
- url: "https://github.com/nextlyhq/nextly/issues"
3519
- },
3520
- author: "Nextly <contact@nextlyhq.com> (https://nextlyhq.com)"
3521
- };
3522
- }
3523
- });
3524
-
3525
3432
  // ../../node_modules/.pnpm/commander@14.0.2/node_modules/commander/esm.mjs
3526
3433
  var import_index = __toESM(require_commander(), 1);
3527
3434
  var {
@@ -3540,7 +3447,6 @@ var {
3540
3447
  } = import_index.default;
3541
3448
 
3542
3449
  // src/cli.ts
3543
- var pkg = require_package();
3544
3450
  var program2 = new Command();
3545
3451
  program2.name("create-nextly-app").description(
3546
3452
  "Scaffold a new Nextly CMS project or add Nextly to an existing Next.js app"
@@ -3550,13 +3456,17 @@ program2.name("create-nextly-app").description(
3550
3456
  ).option(
3551
3457
  "-y, --yes",
3552
3458
  "Skip prompts and use defaults (blank template, SQLite, local storage)"
3553
- ).option("-t, --template <template>", "Project template (blank, blog)").option(
3554
- "-a, --approach <approach>",
3555
- "Schema approach (code-first, visual)"
3556
- ).option("-d, --database <db>", "Database type (sqlite, postgresql, mysql)").option("-b, --branch <branch>", "Git branch for template download", "main").option(
3459
+ ).option(
3460
+ "-t, --template <template>",
3461
+ // From the registry, so --help names every template the flag accepts.
3462
+ `Project template (${getAvailableTemplateNames().join(", ")})`
3463
+ ).option("-a, --approach <approach>", "Schema approach (code-first, visual)").option("-d, --database <db>", "Database type (sqlite, postgresql, mysql)").option("-b, --branch <branch>", "Git branch for template download", "main").option(
3557
3464
  "--local-template <path>",
3558
3465
  "Path to local templates directory (development only)"
3559
3466
  ).option("--skip-install", "Skip dependency installation (for local testing)").option(
3467
+ "--no-skills",
3468
+ "Do not add the Nextly skills for coding agents to the project"
3469
+ ).option(
3560
3470
  "--use-yalc",
3561
3471
  "Use yalc for local package installation (development only)"
3562
3472
  ).addHelpText(
@@ -3574,7 +3484,7 @@ Examples:
3574
3484
  async (directory, options) => {
3575
3485
  await init({
3576
3486
  cliName: "create-nextly-app",
3577
- cliVersion: pkg.version
3487
+ cliVersion: packageVersion()
3578
3488
  });
3579
3489
  try {
3580
3490
  const cwd = process.cwd();
@@ -3582,16 +3492,16 @@ Examples:
3582
3492
  if (projectName) {
3583
3493
  const nameError = validateProjectName(projectName);
3584
3494
  if (nameError) {
3585
- console.error(`Error: Invalid project name '${projectName}'. ${nameError}.`);
3495
+ console.error(
3496
+ `Error: Invalid project name '${projectName}'. ${nameError}.`
3497
+ );
3586
3498
  process.exit(1);
3587
3499
  }
3588
3500
  }
3589
3501
  const projectType = options.template;
3590
- const validTypes = ["blank", "blog"];
3591
- if (projectType && !validTypes.includes(projectType)) {
3592
- console.error(
3593
- `Error: Template '${projectType}' is not available. Use: ${validTypes.join(", ")}`
3594
- );
3502
+ const templateError = projectType ? validateTemplateName(projectType) : void 0;
3503
+ if (templateError) {
3504
+ console.error(`Error: ${templateError}`);
3595
3505
  process.exit(1);
3596
3506
  }
3597
3507
  const validApproaches = ["code-first", "visual"];
@@ -3618,6 +3528,7 @@ Examples:
3618
3528
  localTemplatePath: options.localTemplate,
3619
3529
  skipInstall: options.skipInstall,
3620
3530
  useYalc: options.useYalc,
3531
+ skills: options.skills,
3621
3532
  projectNameFromArg: projectName,
3622
3533
  installInCwd
3623
3534
  });