create-nextly-app 0.0.2-alpha.66 → 0.0.2-alpha.68
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/README.md +29 -8
- package/dist/{chunk-I2U7KBH6.mjs → chunk-XCYSH46I.mjs} +36805 -10917
- package/dist/chunk-XCYSH46I.mjs.map +1 -0
- package/dist/cli.cjs +27693 -1892
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +17 -106
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +36591 -10708
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +1 -1
- package/package.json +18 -7
- package/skills/nextly-authentication/SKILL.md +177 -0
- package/skills/nextly-collections/SKILL.md +215 -0
- package/skills/nextly-deploy/SKILL.md +246 -0
- package/skills/nextly-install/SKILL.md +122 -0
- package/templates/base/.env.example +3 -5
- package/templates/base/AGENTS.md.template +31 -0
- package/templates/base/src/types/generated/nextly-types.ts +6 -4
- package/templates/blank/src/app/(frontend)/components/ThemeToggle.tsx +55 -24
- package/templates/blank/src/instrumentation.ts +27 -0
- package/templates/plugin/AGENTS.md.template +6 -4
- package/templates/plugin/README.md +4 -0
- package/templates/plugin/dev/.env.example +5 -2
- package/templates/plugin/dev/src/app/admin/[[...params]]/page.tsx +14 -2
- package/templates/plugin/dev/src/instrumentation.ts +20 -0
- package/templates/plugin/dev/src/seed-dev-user.ts +51 -0
- package/templates/plugin/gitignore +5 -2
- package/templates/plugin/src/plugin.test.ts +9 -2
- package/dist/chunk-I2U7KBH6.mjs.map +0 -1
- package/templates/plugin/dev/instrumentation.ts +0 -10
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-
|
|
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(
|
|
3554
|
-
"-
|
|
3555
|
-
|
|
3556
|
-
|
|
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:
|
|
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(
|
|
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
|
|
3591
|
-
if (
|
|
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
|
});
|