@tsed/cli-plugin-prisma 7.0.0-beta.9 → 7.0.0-rc.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.
@@ -8,13 +8,14 @@ export class CliPrisma {
8
8
  this.projectPackageJson = inject(ProjectPackageJson);
9
9
  }
10
10
  run(command, args = [], options = {}) {
11
- return this.cliExeca.run("npx", ["prisma", command, ...args], {
11
+ return this.cliExeca.runSync("npx", ["prisma", command, ...args], {
12
12
  ...options,
13
- cwd: this.projectPackageJson.dir
13
+ cwd: this.projectPackageJson.dir,
14
+ stdio: "inherit"
14
15
  });
15
16
  }
16
17
  init() {
17
- return this.run("init");
18
+ return this.run("init", ["--db", "--output", "../generated/prisma"]);
18
19
  }
19
20
  async patchPrismaSchema() {
20
21
  const schemaPath = join(this.projectPackageJson.dir, "prisma", "schema.prisma");
@@ -7,6 +7,6 @@ export declare class PrismaCmd implements CommandProvider {
7
7
  protected cli: CliPrisma;
8
8
  $exec(ctx: PrismaContext): {
9
9
  title: string;
10
- task: () => import("rxjs").Observable<any>;
10
+ task: () => import("execa").ExecaReturnBase<string>;
11
11
  }[];
12
12
  }
@@ -3,7 +3,7 @@ export declare class CliPrisma {
3
3
  protected cliExeca: CliExeca;
4
4
  protected cliFs: CliFs;
5
5
  protected projectPackageJson: ProjectPackageJson;
6
- run(command: string, args?: string[], options?: any): import("rxjs").Observable<any>;
7
- init(): import("rxjs").Observable<any>;
6
+ run(command: string, args?: string[], options?: any): import("execa").ExecaReturnBase<string>;
7
+ init(): import("execa").ExecaReturnBase<string>;
8
8
  patchPrismaSchema(): Promise<void>;
9
9
  }
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.9",
4
+ "version": "7.0.0-rc.2",
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.9",
30
- "@tsed/cli-core": "7.0.0-beta.9",
31
- "@tsed/typescript": "7.0.0-beta.9",
29
+ "@tsed/cli": "7.0.0-rc.2",
30
+ "@tsed/cli-core": "7.0.0-rc.2",
31
+ "@tsed/typescript": "7.0.0-rc.2",
32
32
  "cross-env": "7.0.3",
33
33
  "typescript": "5.6.2",
34
34
  "vitest": "3.2.4"
@@ -42,6 +42,6 @@
42
42
  "author": "Romain Lenzotti",
43
43
  "license": "MIT",
44
44
  "publishConfig": {
45
- "tag": "beta"
45
+ "tag": "rc"
46
46
  }
47
47
  }
@@ -27,7 +27,7 @@ describe("Prisma: Init cmd", () => {
27
27
  devDependencies: {}
28
28
  });
29
29
 
30
- $on("npx prisma init", () => {
30
+ $on("npx prisma init --db --output ../generated/prisma", () => {
31
31
  inject(CliFs).writeFileSync("project-name/prisma/schema.prisma", ``, {encoding: "utf8"});
32
32
  });
33
33
 
@@ -84,17 +84,24 @@ describe("Prisma: Init cmd", () => {
84
84
  "project-name/tsconfig.json",
85
85
  "project-name/tsconfig.node.json",
86
86
  "project-name/tsconfig.spec.json",
87
+ "project-name/views",
88
+ "project-name/views/home.ejs",
87
89
  ]
88
90
  `);
89
91
 
90
92
  expect([...FakeCliExeca.entries.keys()]).toMatchInlineSnapshot(`
91
93
  [
94
+ "bun --version",
95
+ "npm --version",
96
+ "pnpm --version",
97
+ "yarn --version",
98
+ "node --version",
92
99
  "yarn install",
93
100
  "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",
94
101
  "yarn add -D --ignore-engines @types/node @types/multer tslib nodemon @types/cors @types/express @types/compression @types/cookie-parser @types/method-override",
95
102
  "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",
96
103
  "yarn add -D --ignore-engines @types/node @types/multer tslib nodemon @types/cors @types/express @types/compression @types/cookie-parser @types/method-override prisma",
97
- "npx prisma init",
104
+ "npx prisma init --db --output ../generated/prisma",
98
105
  ]
99
106
  `);
100
107