@tsed/cli-plugin-prisma 7.0.0-beta.3 → 7.0.0-beta.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.
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { inject, OnAdd, ProjectPackageJson } from "@tsed/cli-core";
|
|
1
|
+
import { inject, ProjectPackageJson } from "@tsed/cli-core";
|
|
3
2
|
import { injectable } from "@tsed/di";
|
|
4
3
|
import { PrismaCmd } from "./commands/PrismaCmd.js";
|
|
5
4
|
import { PrismaInitHook } from "./hooks/PrismaInitHook.js";
|
|
@@ -7,10 +6,12 @@ export class CliPluginPrismaModule {
|
|
|
7
6
|
constructor() {
|
|
8
7
|
this.packageJson = inject(ProjectPackageJson);
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
$onAddPlugin(plugin, ctx) {
|
|
10
|
+
if (plugin == "@tsed/cli-plugin-prisma") {
|
|
11
|
+
this.addScripts();
|
|
12
|
+
this.addDependencies(ctx);
|
|
13
|
+
this.addDevDependencies(ctx);
|
|
14
|
+
}
|
|
14
15
|
}
|
|
15
16
|
addScripts() {
|
|
16
17
|
this.packageJson.addScripts({
|
|
@@ -30,10 +31,4 @@ export class CliPluginPrismaModule {
|
|
|
30
31
|
}, ctx);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
__decorate([
|
|
34
|
-
OnAdd("@tsed/cli-plugin-prisma"),
|
|
35
|
-
__metadata("design:type", Function),
|
|
36
|
-
__metadata("design:paramtypes", [Object]),
|
|
37
|
-
__metadata("design:returntype", void 0)
|
|
38
|
-
], CliPluginPrismaModule.prototype, "onAdd", null);
|
|
39
34
|
injectable(CliPluginPrismaModule).imports([PrismaInitHook, PrismaCmd]);
|
|
@@ -2,7 +2,7 @@ import type { InitCmdContext } from "@tsed/cli";
|
|
|
2
2
|
import { ProjectPackageJson } from "@tsed/cli-core";
|
|
3
3
|
export declare class CliPluginPrismaModule {
|
|
4
4
|
protected packageJson: ProjectPackageJson;
|
|
5
|
-
|
|
5
|
+
$onAddPlugin(plugin: string, ctx: InitCmdContext): void;
|
|
6
6
|
addScripts(): void;
|
|
7
7
|
addDependencies(ctx: InitCmdContext): void;
|
|
8
8
|
addDevDependencies(ctx: InitCmdContext): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-plugin-prisma",
|
|
3
3
|
"description": "Ts.ED CLI plugin. Add Prisma project initialisation support.",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"source": "./src/index.ts",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"tslib": "2.7.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@tsed/cli": "7.0.0-beta.
|
|
30
|
-
"@tsed/cli-core": "7.0.0-beta.
|
|
31
|
-
"@tsed/typescript": "7.0.0-beta.
|
|
29
|
+
"@tsed/cli": "7.0.0-beta.5",
|
|
30
|
+
"@tsed/cli-core": "7.0.0-beta.5",
|
|
31
|
+
"@tsed/typescript": "7.0.0-beta.5",
|
|
32
32
|
"cross-env": "7.0.3",
|
|
33
33
|
"typescript": "5.6.2",
|
|
34
34
|
"vitest": "3.2.4"
|
|
@@ -46,7 +46,7 @@ describe("Prisma: Init cmd", () => {
|
|
|
46
46
|
db: true,
|
|
47
47
|
typeorm: true,
|
|
48
48
|
mysql: true,
|
|
49
|
-
features: [FeatureType.
|
|
49
|
+
features: [FeatureType.ORM, FeatureType.PRISMA],
|
|
50
50
|
srcDir: "src",
|
|
51
51
|
pnpm: false,
|
|
52
52
|
npm: false,
|
|
@@ -94,7 +94,6 @@ describe("Prisma: Init cmd", () => {
|
|
|
94
94
|
"yarn add --ignore-engines @tsed/logger @tsed/logger-std @tsed/engines @tsed/barrels ajv cross-env @swc/core @swc/cli @swc/helpers @swc-node/register typescript body-parser cors compression cookie-parser express method-override @tsed/prisma @prisma/client",
|
|
95
95
|
"yarn add -D --ignore-engines @types/node @types/multer tslib nodemon @types/cors @types/express @types/compression @types/cookie-parser @types/method-override prisma",
|
|
96
96
|
"npx prisma init",
|
|
97
|
-
"yarn run barrels",
|
|
98
97
|
]
|
|
99
98
|
`);
|
|
100
99
|
|