@tsed/cli-plugin-vitest 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,10 +1,13 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { RuntimesModule } from "@tsed/cli";
3
- import { Module, OnAdd, ProjectPackageJson } from "@tsed/cli-core";
4
- import { Inject } from "@tsed/di";
3
+ import { inject, Module, OnAdd, ProjectPackageJson } from "@tsed/cli-core";
5
4
  import { VitestGenerateHook } from "./hooks/VitestGenerateHook.js";
6
5
  import { VitestInitHook } from "./hooks/VitestInitHook.js";
7
6
  let CliPluginVitestModule = class CliPluginVitestModule {
7
+ constructor() {
8
+ this.runtimes = inject(RuntimesModule);
9
+ this.packageJson = inject(ProjectPackageJson);
10
+ }
8
11
  install() {
9
12
  this.addScripts();
10
13
  this.addDevDependencies();
@@ -27,14 +30,6 @@ let CliPluginVitestModule = class CliPluginVitestModule {
27
30
  });
28
31
  }
29
32
  };
30
- __decorate([
31
- Inject(),
32
- __metadata("design:type", RuntimesModule)
33
- ], CliPluginVitestModule.prototype, "runtimes", void 0);
34
- __decorate([
35
- Inject(),
36
- __metadata("design:type", ProjectPackageJson)
37
- ], CliPluginVitestModule.prototype, "packageJson", void 0);
38
33
  __decorate([
39
34
  OnAdd("@tsed/cli-plugin-vitest"),
40
35
  __metadata("design:type", Function),
@@ -1,8 +1,11 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { Inject, Injectable, OnExec, SrcRendererService } from "@tsed/cli-core";
2
+ import { inject, Injectable, OnExec, SrcRendererService } from "@tsed/cli-core";
3
3
  import { normalizePath } from "@tsed/normalize-path";
4
4
  import { TEMPLATE_DIR } from "../utils/templateDir.js";
5
5
  let VitestGenerateHook = class VitestGenerateHook {
6
+ constructor() {
7
+ this.srcRenderService = inject(SrcRendererService);
8
+ }
6
9
  onGenerateExec(ctx) {
7
10
  const { symbolPath } = ctx;
8
11
  const { specTemplate, integrationTemplate, relativeSrcPath } = this.mapOptions(ctx);
@@ -44,10 +47,6 @@ let VitestGenerateHook = class VitestGenerateHook {
44
47
  };
45
48
  }
46
49
  };
47
- __decorate([
48
- Inject(),
49
- __metadata("design:type", SrcRendererService)
50
- ], VitestGenerateHook.prototype, "srcRenderService", void 0);
51
50
  __decorate([
52
51
  OnExec("generate"),
53
52
  __metadata("design:type", Function),
@@ -1,8 +1,8 @@
1
1
  import { RuntimesModule } from "@tsed/cli";
2
2
  import { ProjectPackageJson } from "@tsed/cli-core";
3
3
  export declare class CliPluginVitestModule {
4
- runtimes: RuntimesModule;
5
- packageJson: ProjectPackageJson;
4
+ protected runtimes: RuntimesModule;
5
+ protected packageJson: ProjectPackageJson;
6
6
  install(): void;
7
7
  addScripts(): void;
8
8
  addDevDependencies(): void;
@@ -1,7 +1,7 @@
1
1
  import type { GenerateCmdContext } from "@tsed/cli";
2
2
  import { SrcRendererService, type Tasks } from "@tsed/cli-core";
3
3
  export declare class VitestGenerateHook {
4
- srcRenderService: SrcRendererService;
4
+ protected srcRenderService: SrcRendererService;
5
5
  onGenerateExec(ctx: GenerateCmdContext): Tasks;
6
6
  private mapOptions;
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-plugin-vitest",
3
3
  "description": "Ts.ED CLI plugin. Add Jest 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",
@@ -21,9 +21,9 @@
21
21
  "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
22
22
  },
23
23
  "devDependencies": {
24
- "@tsed/cli": "6.0.0-beta.1",
25
- "@tsed/cli-core": "6.0.0-beta.1",
26
- "@tsed/typescript": "6.0.0-beta.1",
24
+ "@tsed/cli": "6.0.0-beta.2",
25
+ "@tsed/cli-core": "6.0.0-beta.2",
26
+ "@tsed/typescript": "6.0.0-beta.2",
27
27
  "cross-env": "7.0.3",
28
28
  "typescript": "5.6.2",
29
29
  "vitest": "2.1.1"