@nexusts/cli 0.9.4 → 0.9.5
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/config.d.ts +1 -1
- package/dist/commands/db-generate.d.ts +8 -6
- package/dist/commands/db-migrate.d.ts +6 -15
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/make-crud.d.ts +1 -1
- package/dist/commands/make-model.d.ts +1 -1
- package/dist/commands/make-repository.d.ts +6 -0
- package/dist/core/config.d.ts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/scaffold.d.ts +1 -1
- package/dist/index.js +466 -260
- package/dist/index.js.map +32 -31
- package/dist/templates/index.d.ts +5 -2
- package/dist/templates/migration/kysely.d.ts +14 -0
- package/dist/templates/model/kysely.d.ts +5 -1
- package/dist/templates/project/nx.config.d.ts +1 -1
- package/dist/templates/repository/kysely-repository.d.ts +15 -0
- package/dist/templates/service/service.d.ts +2 -0
- package/package.json +2 -2
- package/dist/templates/model/prisma.d.ts +0 -11
|
@@ -11,17 +11,20 @@ export declare const templates: {
|
|
|
11
11
|
functional: string;
|
|
12
12
|
};
|
|
13
13
|
service: string;
|
|
14
|
-
repository:
|
|
14
|
+
repository: {
|
|
15
|
+
drizzle: string;
|
|
16
|
+
kysely: string;
|
|
17
|
+
};
|
|
15
18
|
module: string;
|
|
16
19
|
validator: string;
|
|
17
20
|
middleware: string;
|
|
18
21
|
model: {
|
|
19
22
|
drizzle: string;
|
|
20
|
-
prisma: string;
|
|
21
23
|
kysely: string;
|
|
22
24
|
};
|
|
23
25
|
migration: {
|
|
24
26
|
drizzle: string;
|
|
27
|
+
kysely: string;
|
|
25
28
|
sql: string;
|
|
26
29
|
};
|
|
27
30
|
crud: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kysely migration template.
|
|
3
|
+
*
|
|
4
|
+
* Generates a TypeScript migration file with `up()` and `down()`
|
|
5
|
+
* functions compatible with Kysely's built-in Migrator.
|
|
6
|
+
*
|
|
7
|
+
* Context:
|
|
8
|
+
* name — PascalCase model name (e.g. "CreateUsersTable")
|
|
9
|
+
* tableName — snake_case plural table (e.g. "users")
|
|
10
|
+
* columns — column definitions (rendered by command)
|
|
11
|
+
* timestamp — ISO timestamp prefix used in the filename
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: string;
|
|
14
|
+
export default _default;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Kysely model template.
|
|
3
3
|
*
|
|
4
|
-
* Generates a typed table interface +
|
|
4
|
+
* Generates a typed table interface + KyselyRepository subclass
|
|
5
|
+
* using `@nexusts/kysely`'s `KyselyRepository` and `KyselyService`.
|
|
5
6
|
*
|
|
6
7
|
* Context:
|
|
7
8
|
* name — PascalCase (e.g. "User")
|
|
9
|
+
* camel — camelCase (e.g. "user")
|
|
10
|
+
* snake — snake_case (e.g. "user")
|
|
8
11
|
* tableName — snake_case plural (e.g. "users")
|
|
12
|
+
* columns — rendered column definitions
|
|
9
13
|
*/
|
|
10
14
|
declare const _default: string;
|
|
11
15
|
export default _default;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* nx.config.ts template — placed at the project root by `nx init` /
|
|
3
3
|
* `nx new`.
|
|
4
4
|
*/
|
|
5
|
-
declare const _default: "/**\n * NexusTS project configuration.\n * Run `nx info` to see the resolved values.\n */\n\nexport default {\n // ---------------------------------------------------------------------------\n // Core\n // ---------------------------------------------------------------------------\n\n /** Routing style used by `make:controller` / `make:crud`. */\n routing: '{{ routing }}',\n\n /** View engine \u2014 `inertia`, `rendu`, `edge`, or `none`. */\n view: '{{ view }}',\n\n /**\n * Directory searched when a controller returns a view file name\n * (e.g. `about.html`). Empty string = inline templates only.\n * Typical: `'resources/views'`. On edge runtimes\n * (Cloudflare Workers), leave empty and pass inline strings.\n */\n viewPaths: '{{ viewPaths }}',\n\n /** ORM driver \u2014 `drizzle`, `
|
|
5
|
+
declare const _default: "/**\n * NexusTS project configuration.\n * Run `nx info` to see the resolved values.\n */\n\nexport default {\n // ---------------------------------------------------------------------------\n // Core\n // ---------------------------------------------------------------------------\n\n /** Routing style used by `make:controller` / `make:crud`. */\n routing: '{{ routing }}',\n\n /** View engine \u2014 `inertia`, `rendu`, `edge`, or `none`. */\n view: '{{ view }}',\n\n /**\n * Directory searched when a controller returns a view file name\n * (e.g. `about.html`). Empty string = inline templates only.\n * Typical: `'resources/views'`. On edge runtimes\n * (Cloudflare Workers), leave empty and pass inline strings.\n */\n viewPaths: '{{ viewPaths }}',\n\n /** ORM driver \u2014 `drizzle`, `kysely`, or `none`. */\n orm: '{{ orm }}',\n\n // ---------------------------------------------------------------------------\n // Database\n // ---------------------------------------------------------------------------\n\n database: {\n driver: '{{ dbDriver }}',\n url: process.env.DATABASE_URL ?? '{{ dbUrl }}',\n },\n\n // ---------------------------------------------------------------------------\n // Inertia (only consulted when `view === 'inertia'`)\n // ---------------------------------------------------------------------------\n\n inertia: {\n frontend: '{{ inertiaFrontend }}',\n ssr: {{ inertiaSSR }},\n version: '{{ inertiaVersion }}',\n },\n\n // ---------------------------------------------------------------------------\n // Paths\n // ---------------------------------------------------------------------------\n\n paths: {\n app: 'app',\n controllers: 'app/controllers',\n services: 'app/services',\n modules: 'app/modules',\n models: 'app/models',\n migrations: 'app/database/migrations',\n seeds: 'db/seeds',\n middleware: 'app/middleware',\n dto: 'app/dto',\n },\n};\n";
|
|
6
6
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kysely repository template.
|
|
3
|
+
*
|
|
4
|
+
* Uses `@nexusts/kysely`'s `KyselyRepository` with field injection.
|
|
5
|
+
*
|
|
6
|
+
* Context:
|
|
7
|
+
* name — PascalCase class name
|
|
8
|
+
* camel — camelCase variable
|
|
9
|
+
* kebab — kebab-case
|
|
10
|
+
* tableName — plural snake_case table name
|
|
11
|
+
* snake — singular snake_case
|
|
12
|
+
* repository — PascalCase repository name
|
|
13
|
+
*/
|
|
14
|
+
declare const _default: string;
|
|
15
|
+
export default _default;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Service template (standard decorator mode).
|
|
3
3
|
*
|
|
4
4
|
* Uses field injection (@Inject on fields) instead of constructor params.
|
|
5
|
+
* ORM-agnostic: uses common repository methods (findAll, findById, create, updateById, deleteById)
|
|
6
|
+
* that exist on both DrizzleRepository and KyselyRepository.
|
|
5
7
|
*
|
|
6
8
|
* Context:
|
|
7
9
|
* name — PascalCase class name
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexusts/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "CLI command runner (nx)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nexusts/core": "^0.9.
|
|
32
|
+
"@nexusts/core": "^0.9.5"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prisma model template.
|
|
3
|
-
*
|
|
4
|
-
* Renders a `model Foo { ... }` block plus a typed client wrapper.
|
|
5
|
-
*
|
|
6
|
-
* Context:
|
|
7
|
-
* name — PascalCase (e.g. "User")
|
|
8
|
-
* fields — rendered field lines (name, type, optionality)
|
|
9
|
-
*/
|
|
10
|
-
declare const _default: string;
|
|
11
|
-
export default _default;
|