@tsed/cli-plugin-prisma 6.0.0-beta.1 → 6.0.0-beta.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.
@@ -1,14 +1,9 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Module, ProjectPackageJson } from "@tsed/cli-core";
3
- import { Inject } from "@tsed/di";
1
+ import { __decorate } from "tslib";
2
+ import { Module } from "@tsed/cli-core";
4
3
  import { PrismaCmd } from "./commands/PrismaCmd.js";
5
4
  import { PrismaInitHook } from "./hooks/PrismaInitHook.js";
6
5
  let CliPluginPrismaModule = class CliPluginPrismaModule {
7
6
  };
8
- __decorate([
9
- Inject(),
10
- __metadata("design:type", ProjectPackageJson)
11
- ], CliPluginPrismaModule.prototype, "packageJson", void 0);
12
7
  CliPluginPrismaModule = __decorate([
13
8
  Module({
14
9
  imports: [PrismaInitHook, PrismaCmd]
@@ -1,7 +1,10 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Command, Inject } from "@tsed/cli-core";
1
+ import { __decorate } from "tslib";
2
+ import { Command, inject } from "@tsed/cli-core";
3
3
  import { CliPrisma } from "../services/CliPrisma.js";
4
4
  let PrismaCmd = class PrismaCmd {
5
+ constructor() {
6
+ this.cli = inject(CliPrisma);
7
+ }
5
8
  $exec(ctx) {
6
9
  return [
7
10
  {
@@ -11,10 +14,6 @@ let PrismaCmd = class PrismaCmd {
11
14
  ];
12
15
  }
13
16
  };
14
- __decorate([
15
- Inject(),
16
- __metadata("design:type", CliPrisma)
17
- ], PrismaCmd.prototype, "cli", void 0);
18
17
  PrismaCmd = __decorate([
19
18
  Command({
20
19
  name: "prisma",
@@ -1,8 +1,13 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { CliService, Inject, OnExec, PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
2
+ import { inject, OnExec, PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
3
3
  import { Injectable } from "@tsed/di";
4
4
  import { CliPrisma } from "../services/CliPrisma.js";
5
5
  let PrismaInitHook = class PrismaInitHook {
6
+ constructor() {
7
+ this.cliPrisma = inject(CliPrisma);
8
+ this.packageJson = inject(ProjectPackageJson);
9
+ this.packageManagers = inject(PackageManagersModule);
10
+ }
6
11
  onExec(ctx) {
7
12
  this.addScripts();
8
13
  this.addDependencies(ctx);
@@ -48,22 +53,6 @@ let PrismaInitHook = class PrismaInitHook {
48
53
  });
49
54
  }
50
55
  };
51
- __decorate([
52
- Inject(),
53
- __metadata("design:type", CliPrisma)
54
- ], PrismaInitHook.prototype, "cliPrisma", void 0);
55
- __decorate([
56
- Inject(),
57
- __metadata("design:type", CliService)
58
- ], PrismaInitHook.prototype, "cliService", void 0);
59
- __decorate([
60
- Inject(),
61
- __metadata("design:type", ProjectPackageJson)
62
- ], PrismaInitHook.prototype, "packageJson", void 0);
63
- __decorate([
64
- Inject(),
65
- __metadata("design:type", PackageManagersModule)
66
- ], PrismaInitHook.prototype, "packageManagers", void 0);
67
56
  __decorate([
68
57
  OnExec("init"),
69
58
  __metadata("design:type", Function),
@@ -1,4 +1,2 @@
1
- import { ProjectPackageJson } from "@tsed/cli-core";
2
1
  export declare class CliPluginPrismaModule {
3
- packageJson: ProjectPackageJson;
4
2
  }
@@ -4,7 +4,7 @@ export interface PrismaContext extends CliDefaultOptions {
4
4
  command: string;
5
5
  }
6
6
  export declare class PrismaCmd implements CommandProvider {
7
- cli: CliPrisma;
7
+ protected cli: CliPrisma;
8
8
  $exec(ctx: PrismaContext): {
9
9
  title: string;
10
10
  task: () => import("rxjs").Observable<any>;
@@ -1,9 +1,8 @@
1
1
  import type { InitCmdContext } from "@tsed/cli";
2
- import { CliService, PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
2
+ import { PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
3
3
  import { CliPrisma } from "../services/CliPrisma.js";
4
4
  export declare class PrismaInitHook {
5
5
  protected cliPrisma: CliPrisma;
6
- protected cliService: CliService;
7
6
  protected packageJson: ProjectPackageJson;
8
7
  protected packageManagers: PackageManagersModule;
9
8
  onExec(ctx: InitCmdContext): ({
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": "6.0.0-beta.1",
4
+ "version": "6.0.0-beta.2",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -25,9 +25,9 @@
25
25
  "tslib": "2.7.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@tsed/cli": "6.0.0-beta.1",
29
- "@tsed/cli-core": "6.0.0-beta.1",
30
- "@tsed/typescript": "6.0.0-beta.1",
28
+ "@tsed/cli": "6.0.0-beta.2",
29
+ "@tsed/cli-core": "6.0.0-beta.2",
30
+ "@tsed/typescript": "6.0.0-beta.2",
31
31
  "cross-env": "7.0.3",
32
32
  "typescript": "5.6.2",
33
33
  "vitest": "2.1.1"