@tsed/cli-plugin-vitest 5.3.1 → 6.0.0-alpha.1

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.
Files changed (42) hide show
  1. package/lib/esm/CliPluginVitestModule.js +1 -3
  2. package/lib/esm/CliPluginVitestModule.js.map +1 -1
  3. package/lib/esm/hooks/VitestGenerateHook.js +1 -2
  4. package/lib/esm/hooks/VitestGenerateHook.js.map +1 -1
  5. package/lib/esm/hooks/VitestInitHook.js +0 -4
  6. package/lib/esm/hooks/VitestInitHook.js.map +1 -1
  7. package/lib/esm/index.js.map +1 -1
  8. package/lib/esm/utils/templateDir.js +3 -5
  9. package/lib/esm/utils/templateDir.js.map +1 -1
  10. package/lib/types/CliPluginVitestModule.d.ts +1 -1
  11. package/lib/types/index.d.ts +2 -2
  12. package/package.json +20 -18
  13. package/scripts/templateDir.esm.js +2 -1
  14. package/templates/generate/decorator.class.spec.hbs +1 -1
  15. package/templates/generate/decorator.endpoint.spec.hbs +1 -1
  16. package/templates/generate/decorator.method.spec.hbs +1 -1
  17. package/templates/generate/decorator.param.spec.hbs +1 -1
  18. package/templates/generate/decorator.parameter.spec.hbs +1 -1
  19. package/templates/generate/decorator.prop.spec.hbs +1 -1
  20. package/templates/generate/decorator.property.spec.hbs +1 -1
  21. package/templates/generate/generic.integration.hbs +2 -2
  22. package/templates/generate/generic.spec.hbs +1 -1
  23. package/templates/generate/server.integration.hbs +1 -1
  24. package/vitest.config.mts +21 -0
  25. package/.eslintignore +0 -13
  26. package/.eslintrc.js +0 -1
  27. package/jest.config.js +0 -15
  28. package/lib/cjs/CliPluginVitestModule.js +0 -55
  29. package/lib/cjs/CliPluginVitestModule.js.map +0 -1
  30. package/lib/cjs/hooks/VitestGenerateHook.js +0 -65
  31. package/lib/cjs/hooks/VitestGenerateHook.js.map +0 -1
  32. package/lib/cjs/hooks/VitestInitHook.js +0 -51
  33. package/lib/cjs/hooks/VitestInitHook.js.map +0 -1
  34. package/lib/cjs/index.js +0 -7
  35. package/lib/cjs/index.js.map +0 -1
  36. package/lib/cjs/package.json +0 -3
  37. package/lib/cjs/utils/templateDir.js +0 -6
  38. package/lib/cjs/utils/templateDir.js.map +0 -1
  39. package/lib/esm/package.json +0 -3
  40. package/lib/tsconfig.esm.tsbuildinfo +0 -1
  41. package/lib/tsconfig.tsbuildinfo +0 -1
  42. package/tsconfig.esm.json +0 -39
@@ -1,12 +1,10 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { Module, OnAdd, ProjectPackageJson } from "@tsed/cli-core";
3
2
  import { RuntimesModule } from "@tsed/cli";
3
+ import { Module, OnAdd, ProjectPackageJson } from "@tsed/cli-core";
4
4
  import { Inject } from "@tsed/di";
5
5
  import { VitestGenerateHook } from "./hooks/VitestGenerateHook.js";
6
6
  import { VitestInitHook } from "./hooks/VitestInitHook.js";
7
7
  let CliPluginVitestModule = class CliPluginVitestModule {
8
- runtimes;
9
- packageJson;
10
8
  install() {
11
9
  this.addScripts();
12
10
  this.addDevDependencies();
@@ -1 +1 @@
1
- {"version":3,"file":"CliPluginVitestModule.js","sourceRoot":"","sources":["../../src/CliPluginVitestModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAK/C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAEhC,QAAQ,CAAiB;IAGzB,WAAW,CAAqB;IAGhC,OAAO;QACL,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAED,UAAU;QACR,MAAM,OA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UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAED,UAAU;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAEpC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;YAC1B,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG;YACvE,WAAW,EAAE,oCAAoC;YACjD,YAAY,EAAE,gCAAgC;YAC9C,eAAe,EAAE,+CAA+C;SACjE,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;YAClC,MAAM,EAAE,QAAQ;YAChB,cAAc,EAAE,QAAQ;YACxB,qBAAqB,EAAE,QAAQ;YAC/B,WAAW,EAAE,QAAQ;SACtB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/BC;IAAC,MAAM,EAAE;8BACC,cAAc;uDAAC;AAEzB;IAAC,MAAM,EAAE;8BACI,kBAAkB;0DAAC;AAEhC;IAAC,KAAK,CAAC,yBAAyB,CAAC;;;;oDAIhC;AAXU,qBAAqB;IAHjC,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,cAAc,EAAE,kBAAkB,CAAC;KAC9C,CAAC;GACW,qBAAqB,CAgCjC;SAhCY,qBAAqB"}
@@ -1,9 +1,8 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import normalizePath from "normalize-path";
3
2
  import { Inject, Injectable, OnExec, SrcRendererService } from "@tsed/cli-core";
3
+ import normalizePath from "normalize-path";
4
4
  import { TEMPLATE_DIR } from "../utils/templateDir.js";
5
5
  let VitestGenerateHook = class VitestGenerateHook {
6
- srcRenderService;
7
6
  onGenerateExec(ctx) {
8
7
  const { symbolPath } = ctx;
9
8
  const { specTemplate, integrationTemplate, relativeSrcPath } = this.mapOptions(ctx);
@@ -1 +1 @@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AsB;oBAC3C,WAAW,EAAE,YAAY;iBAC1B,CACF;aACJ;SACF,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,OAA2B;QAC5C,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE5E,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,YAAY,IAAI,WAAW,EAAE,EAAC,WAAW,EAAE,YAAY,EAAC,CAAC;YACjH,CAAC,CAAC,YAAY,IAAI,WAAW;YAC7B,CAAC,CAAC,2BAA2B,CAAC;QAEhC,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,YAAY,IAAI,kBAAkB,EAAE,EAAC,WAAW,EAAE,YAAY,EAAC,CAAC;YAC/H,CAAC,CAAC,YAAY,IAAI,kBAAkB;YACpC,CAAC,CAAC,kCAAkC,CAAC;QAEvC,OAAO;YACL,YAAY;YACZ,mBAAmB;YACnB,eAAe,EAAE,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,UAAU,sBAAsB,CAAC,CAAC;SAChH,CAAC;IACJ,CAAC;CACF,CAAA;AA3DC;IAAC,MAAM,EAAE;8BACS,kBAAkB;4DAAC;AAErC;IAAC,MAAM,CAAC,UAAU,CAAC;;;;wDAqClB;AAzCU,kBAAkB;IAD9B,UAAU,EAAE;GACA,kBAAkB,CA4D9B;SA5DY,kBAAkB"}
@@ -2,10 +2,6 @@ import { __decorate, __metadata } from "tslib";
2
2
  import { Inject, Injectable, OnExec, ProjectPackageJson, RootRendererService, ScriptsRendererService, SrcRendererService } from "@tsed/cli-core";
3
3
  import { TEMPLATE_DIR } from "../utils/templateDir.js";
4
4
  let VitestInitHook = class VitestInitHook {
5
- packageJson;
6
- srcRenderer;
7
- rootRenderer;
8
- scriptsRenderer;
9
5
  onInitExec() {
10
6
  return [
11
7
  {
@@ -1 +1 @@
1
- {"version":3,"file":"VitestInitHook.js","sourceRoot":"","sources":["../../../src/hooks/VitestInitHook.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAG3C,IAAM,cAAc,GAApB,MAAM,cAAc;IAEf,WAAW,CAAqB;IAGhC,WAAW,CAAqB;IAGhC,YAAY,CAAsB;IAGlC,eAAe,CAAyB;IAGlD,UAAU;QACR,OAAO;YACL;gBACE,KAAK,EAAE,2BAA2B;gBAClC,IAAI,EAAE,CAAC,GAAQ,EAAE,EAAE;oBACjB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC,EAAE,GAAG,EAAE;wBACjE,WAAW,EAAE,GAAG,YAAY,OAAO;qBACpC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAzBC;IAAC,MAAM,EAAE;8BACc,kBAAkB;mDAAC;AAE1C;IAAC,MAAM,EAAE;8BACc,kBAAkB;mDAAC;AAE1C;IAAC,MAAM,EAAE;8BACe,mBAAmB;oDAAC;AAE5C;IAAC,MAAM,EAAE;8BACkB,sBAAsB;uDAAC;AAElD;IAAC,MAAM,CAAC,MAAM,CAAC;;;;gDAYd;AAzBU,cAAc;IAD1B,UAAU,EAAE;GACA,cAAc,CA0B1B;SA1BY,cAAc"}
1
+ {"version":3,"file":"VitestInitHook.js","sourceRoot":"","sources":["../../../src/hooks/VitestInitHook.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAG9C,IAAM,cAAc,GAApB,MAAM,cAAc;IAczB,UAAU;QACR,OAAO;YACL;gBACE,KAAK,EAAE,2BAA2B;gBAClC,IAAI,EAAE,CAAC,GAAQ,EAAE,EAAE;oBACjB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC,EAAE,GAAG,EAAE;wBACjE,WAAW,EAAE,GAAG,YAAY,OAAO;qBACpC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAzBC;IAAC,MAAM,EAAE;8BACc,kBAAkB;mDAAC;AAE1C;IAAC,MAAM,EAAE;8BACc,kBAAkB;mDAAC;AAE1C;IAAC,MAAM,EAAE;8BACe,mBAAmB;oDAAC;AAE5C;IAAC,MAAM,EAAE;8BACkB,sBAAsB;uDAAC;AAElD;IAAC,MAAM,CAAC,MAAM,CAAC;;;;gDAYd;AAzBU,cAAc;IAD1B,UAAU,EAAE;GACA,cAAc,CA0B1B;SA1BY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,cAAc,qBAAqB,CAAC;AAEpC,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAEjE,cAAc,wBAAwB,CAAC;AAEvC,eAAe,qBAAqB,CAAC"}
@@ -1,5 +1,3 @@
1
- import {getTemplateDirectory} from "@tsed/cli-core";
2
- import path from "node:path";
3
- import {fileURLToPath} from "node:url";
4
-
5
- export const TEMPLATE_DIR = getTemplateDirectory(path.dirname(fileURLToPath(import.meta.url)));
1
+ import { getTemplateDirectory } from "@tsed/cli-core";
2
+ export const TEMPLATE_DIR = getTemplateDirectory(import.meta.dirname);
3
+ //# sourceMappingURL=templateDir.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateDir.js","sourceRoot":"","sources":["../../../src/utils/templateDir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"templateDir.js","sourceRoot":"","sources":["../../../src/utils/templateDir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { ProjectPackageJson } from "@tsed/cli-core";
2
1
  import { RuntimesModule } from "@tsed/cli";
2
+ import { ProjectPackageJson } from "@tsed/cli-core";
3
3
  export declare class CliPluginVitestModule {
4
4
  runtimes: RuntimesModule;
5
5
  packageJson: ProjectPackageJson;
@@ -1,3 +1,3 @@
1
- import { CliPluginVitestModule } from "./CliPluginVitestModule";
2
- export * from "./utils/templateDir";
1
+ import { CliPluginVitestModule } from "./CliPluginVitestModule.js";
2
+ export * from "./utils/templateDir.js";
3
3
  export default CliPluginVitestModule;
package/package.json CHANGED
@@ -1,33 +1,32 @@
1
1
  {
2
2
  "name": "@tsed/cli-plugin-vitest",
3
- "version": "5.3.1",
4
3
  "description": "Ts.ED CLI plugin. Add Jest support",
4
+ "version": "6.0.0-alpha.1",
5
+ "type": "module",
6
+ "main": "./lib/esm/index.js",
5
7
  "source": "./src/index.ts",
6
- "main": "./lib/cjs/index.js",
7
8
  "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
- "types": "./lib/types/index.d.ts",
11
- "import": "./lib/esm/index.js",
12
- "require": "./lib/cjs/index.js",
13
- "default": "./lib/esm/index.js"
11
+ ".": {
12
+ "types": "./lib/types/index.d.ts",
13
+ "import": "./lib/esm/index.js",
14
+ "default": "./lib/esm/index.js"
15
+ }
14
16
  },
15
17
  "scripts": {
16
18
  "build": "yarn build:ts",
17
- "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json && cp scripts/templateDir.esm.js lib/esm/utils/templateDir.js",
18
- "lint": "eslint '**/*.{ts,js}'",
19
- "lint:fix": "eslint '**/*.{ts,js}' --fix",
20
- "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --passWithNoTests && jest-coverage-thresholds-bumper"
19
+ "build:ts": "tsc --build tsconfig.json",
20
+ "test": "vitest run",
21
+ "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
21
22
  },
22
23
  "devDependencies": {
23
- "@tsed/cli": "5.3.1",
24
- "@tsed/cli-core": "5.3.1",
25
- "@tsed/eslint": "5.3.1",
26
- "@tsed/jest-config": "5.3.1",
27
- "@tsed/typescript": "5.3.1",
24
+ "@tsed/cli": "6.0.0-alpha.1",
25
+ "@tsed/cli-core": "6.0.0-alpha.1",
26
+ "@tsed/typescript": "6.0.0-alpha.1",
28
27
  "cross-env": "7.0.3",
29
- "eslint": "8.22.0",
30
- "jest": "29.5.0"
28
+ "typescript": "4.9.5",
29
+ "vitest": "2.1.1"
31
30
  },
32
31
  "dependencies": {
33
32
  "tslib": "2.3.1"
@@ -39,5 +38,8 @@
39
38
  },
40
39
  "homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-plugin-vitest",
41
40
  "author": "Romain Lenzotti",
42
- "license": "MIT"
41
+ "license": "MIT",
42
+ "publishConfig": {
43
+ "tag": "alpha"
44
+ }
43
45
  }
@@ -1,5 +1,6 @@
1
- import {getTemplateDirectory} from "@tsed/cli-core";
2
1
  import path from "node:path";
3
2
  import {fileURLToPath} from "node:url";
4
3
 
4
+ import {getTemplateDirectory} from "@tsed/cli-core";
5
+
5
6
  export const TEMPLATE_DIR = getTemplateDirectory(path.dirname(fileURLToPath(import.meta.url)));
@@ -1,5 +1,5 @@
1
1
  import { expect, describe, it } from "vitest";
2
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
2
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
3
3
 
4
4
  describe("{{symbolName}}", () => {
5
5
  it("should do something", () => {
@@ -1,6 +1,6 @@
1
1
  import { expect, describe, it } from "vitest";
2
2
  import { Store } from "@tsed/core";
3
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
3
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
4
4
 
5
5
  describe("{{symbolName}}", () => {
6
6
  it("should store options", () => {
@@ -1,5 +1,5 @@
1
1
  import { expect, describe, it } from "vitest";
2
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
2
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
3
3
 
4
4
  describe("{{symbolName}}", () => {
5
5
  it("should do something", () => {
@@ -1,6 +1,6 @@
1
1
  import { expect, describe, it } from "vitest";
2
2
  import { Store } from "@tsed/core";
3
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
3
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
4
4
 
5
5
  describe("{{symbolName}}", () => {
6
6
  it("should store options", () => {
@@ -1,5 +1,5 @@
1
1
  import { expect, describe, it } from "vitest";
2
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
2
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
3
3
 
4
4
  describe("{{symbolName}}", () => {
5
5
  it("should do something", () => {
@@ -1,6 +1,6 @@
1
1
  import { expect, describe, it } from "vitest";
2
2
  import { Store } from "@tsed/core";
3
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
3
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
4
4
 
5
5
  describe("{{symbolName}}", () => {
6
6
  it("should store options", () => {
@@ -1,5 +1,5 @@
1
1
  import { expect, describe, it } from "vitest";
2
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
2
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
3
3
 
4
4
  describe("{{symbolName}}", () => {
5
5
  it("should do something", () => {
@@ -1,8 +1,8 @@
1
1
  import { expect, describe, it, afterAll, beforeAll } from "vitest";
2
2
  import { PlatformTest } from "@tsed/common";
3
3
  import SuperTest from "supertest";
4
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
5
- import { Server } from "{{relativeSrcPath}}/Server";
4
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
5
+ import { Server } from "{{relativeSrcPath}}/Server.js";
6
6
 
7
7
  describe("{{symbolName}}", () => {
8
8
  beforeAll(PlatformTest.bootstrap(Server, {
@@ -1,6 +1,6 @@
1
1
  import { expect, describe, it, beforeEach, afterEach } from "vitest";
2
2
  import { PlatformTest } from "@tsed/common";
3
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
3
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
4
4
 
5
5
  describe("{{symbolName}}", () => {
6
6
  beforeEach(PlatformTest.create);
@@ -1,7 +1,7 @@
1
1
  import { expect, describe, it, beforeAll, afterAll } from "vitest";
2
2
  import { PlatformTest } from "@tsed/common";
3
3
  import SuperTest from "supertest";
4
- import { {{symbolName}} } from "./{{symbolPathBasename}}";
4
+ import { {{symbolName}} } from "./{{symbolPathBasename}}.js";
5
5
 
6
6
  describe("{{symbolName}}", () => {
7
7
  beforeAll(PlatformTest.bootstrap({{symbolName}}));
@@ -0,0 +1,21 @@
1
+ // @ts-ignore
2
+ import {presets} from "@tsed/vitest/presets";
3
+ import {defineConfig} from "vitest/config";
4
+
5
+ export default defineConfig(
6
+ {
7
+ ...presets,
8
+ test: {
9
+ ...presets.test,
10
+ coverage: {
11
+ ...presets.test.coverage,
12
+ thresholds: {
13
+ statements: 0,
14
+ branches: 0,
15
+ functions: 0,
16
+ lines: 0
17
+ }
18
+ }
19
+ }
20
+ }
21
+ );
package/.eslintignore DELETED
@@ -1,13 +0,0 @@
1
- node_modules
2
- docs
3
- docs-references
4
- lib
5
- dist
6
- coverage
7
- .nyc_output
8
- *-lock.json
9
- *.lock
10
- benchmarks.*
11
- **/generated
12
-
13
- **/*.js
package/.eslintrc.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require("@tsed/eslint/node.js");
package/jest.config.js DELETED
@@ -1,15 +0,0 @@
1
- // For a detailed explanation regarding each configuration property, visit:
2
- // https://jestjs.io/docs/en/configuration.html
3
-
4
- module.exports = {
5
- ...require("@tsed/jest-config"),
6
- roots: ["<rootDir>/src", "<rootDir>/test"],
7
- coverageThreshold: {
8
- global: {
9
- statements: 78.94,
10
- branches: 37.5,
11
- functions: 60,
12
- lines: 78.94
13
- }
14
- }
15
- };
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CliPluginVitestModule = void 0;
4
- const tslib_1 = require("tslib");
5
- const cli_core_1 = require("@tsed/cli-core");
6
- const cli_1 = require("@tsed/cli");
7
- const di_1 = require("@tsed/di");
8
- const VitestGenerateHook_1 = require("./hooks/VitestGenerateHook");
9
- const VitestInitHook_1 = require("./hooks/VitestInitHook");
10
- let CliPluginVitestModule = class CliPluginVitestModule {
11
- runtimes;
12
- packageJson;
13
- install() {
14
- this.addScripts();
15
- this.addDevDependencies();
16
- }
17
- addScripts() {
18
- const runtime = this.runtimes.get();
19
- this.packageJson.addScripts({
20
- test: `${runtime.run("test:lint")} && ${runtime.run("test:coverage")} `,
21
- "test:unit": "cross-env NODE_ENV=test vitest run",
22
- "test:watch": "cross-env NODE_ENV=test vitest",
23
- "test:coverage": `cross-env NODE_ENV=test vitest run --coverage`
24
- });
25
- }
26
- addDevDependencies() {
27
- this.packageJson.addDevDependencies({
28
- vitest: "latest",
29
- "unplugin-swc": "latest",
30
- "@vitest/coverage-v8": "latest",
31
- "@swc/core": "latest"
32
- });
33
- }
34
- };
35
- tslib_1.__decorate([
36
- (0, di_1.Inject)(),
37
- tslib_1.__metadata("design:type", cli_1.RuntimesModule)
38
- ], CliPluginVitestModule.prototype, "runtimes", void 0);
39
- tslib_1.__decorate([
40
- (0, di_1.Inject)(),
41
- tslib_1.__metadata("design:type", cli_core_1.ProjectPackageJson)
42
- ], CliPluginVitestModule.prototype, "packageJson", void 0);
43
- tslib_1.__decorate([
44
- (0, cli_core_1.OnAdd)("@tsed/cli-plugin-vitest"),
45
- tslib_1.__metadata("design:type", Function),
46
- tslib_1.__metadata("design:paramtypes", []),
47
- tslib_1.__metadata("design:returntype", void 0)
48
- ], CliPluginVitestModule.prototype, "install", null);
49
- CliPluginVitestModule = tslib_1.__decorate([
50
- (0, cli_core_1.Module)({
51
- imports: [VitestInitHook_1.VitestInitHook, VitestGenerateHook_1.VitestGenerateHook]
52
- })
53
- ], CliPluginVitestModule);
54
- exports.CliPluginVitestModule = CliPluginVitestModule;
55
- //# sourceMappingURL=CliPluginVitestModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CliPluginVitestModule.js","sourceRoot":"","sources":["../../src/CliPluginVitestModule.ts"],"names":[],"mappings":";;;;AAAA,6CAAiE;AACjE,mCAAyC;AACzC,iCAAgC;AAChC,mEAA8D;AAC9D,2DAAsD;AAK/C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAEhC,QAAQ,CAAiB;IAGzB,WAAW,CAAqB;IAGhC,OAAO;QACL,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAED,UAAU;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAEpC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;YAC1B,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG;YACvE,WAAW,EAAE,oCAAoC;YACjD,YAAY,EAAE,gCAAgC;YAC9C,eAAe,EAAE,+CAA+C;SACjE,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;YAClC,MAAM,EAAE,QAAQ;YAChB,cAAc,EAAE,QAAQ;YACxB,qBAAqB,EAAE,QAAQ;YAC/B,WAAW,EAAE,QAAQ;SACtB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/BC;IAAC,IAAA,WAAM,GAAE;sCACC,oBAAc;uDAAC;AAEzB;IAAC,IAAA,WAAM,GAAE;sCACI,6BAAkB;0DAAC;AAEhC;IAAC,IAAA,gBAAK,EAAC,yBAAyB,CAAC;;;;oDAIhC;AAXU,qBAAqB;IAHjC,IAAA,iBAAM,EAAC;QACN,OAAO,EAAE,CAAC,+BAAc,EAAE,uCAAkB,CAAC;KAC9C,CAAC;GACW,qBAAqB,CAgCjC;AAhCY,sDAAqB"}
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VitestGenerateHook = void 0;
4
- const tslib_1 = require("tslib");
5
- const normalize_path_1 = tslib_1.__importDefault(require("normalize-path"));
6
- const cli_core_1 = require("@tsed/cli-core");
7
- const templateDir_1 = require("../utils/templateDir");
8
- let VitestGenerateHook = class VitestGenerateHook {
9
- srcRenderService;
10
- onGenerateExec(ctx) {
11
- const { symbolPath } = ctx;
12
- const { specTemplate, integrationTemplate, relativeSrcPath } = this.mapOptions(ctx);
13
- return [
14
- {
15
- title: `Generate ${ctx.type} spec file to '${symbolPath}.spec.ts'`,
16
- enabled() {
17
- return !(ctx.type === "server" || ctx.type.includes(":dataSource") || ctx.type.includes(":connection"));
18
- },
19
- task: () => this.srcRenderService.render(specTemplate, { ...ctx, relativeSrcPath }, {
20
- output: `${symbolPath}.spec.ts`,
21
- templateDir: templateDir_1.TEMPLATE_DIR
22
- })
23
- },
24
- {
25
- title: `Generate ${ctx.type} integration file '${symbolPath}.integration.spec.ts'`,
26
- enabled() {
27
- return ["controller", "server"].includes(ctx.type);
28
- },
29
- task: () => this.srcRenderService.render(integrationTemplate, { ...ctx, relativeSrcPath }, {
30
- output: `${symbolPath}.integration.spec.ts`,
31
- templateDir: templateDir_1.TEMPLATE_DIR
32
- })
33
- }
34
- ];
35
- }
36
- mapOptions(options) {
37
- const type = [options.type, options.templateType].filter(Boolean).join(".");
38
- const specTemplate = this.srcRenderService.templateExists(`generate/${type}.spec.hbs`, { templateDir: templateDir_1.TEMPLATE_DIR })
39
- ? `generate/${type}.spec.hbs`
40
- : "generate/generic.spec.hbs";
41
- const integrationTemplate = this.srcRenderService.templateExists(`generate/${type}.integration.hbs`, { templateDir: templateDir_1.TEMPLATE_DIR })
42
- ? `generate/${type}.integration.hbs`
43
- : "generate/generic.integration.hbs";
44
- return {
45
- specTemplate,
46
- integrationTemplate,
47
- relativeSrcPath: (0, normalize_path_1.default)(this.srcRenderService.relativeFrom(`${options.symbolPath}.integration.spec.ts`))
48
- };
49
- }
50
- };
51
- tslib_1.__decorate([
52
- (0, cli_core_1.Inject)(),
53
- tslib_1.__metadata("design:type", cli_core_1.SrcRendererService)
54
- ], VitestGenerateHook.prototype, "srcRenderService", void 0);
55
- tslib_1.__decorate([
56
- (0, cli_core_1.OnExec)("generate"),
57
- tslib_1.__metadata("design:type", Function),
58
- tslib_1.__metadata("design:paramtypes", [Object]),
59
- tslib_1.__metadata("design:returntype", Array)
60
- ], VitestGenerateHook.prototype, "onGenerateExec", null);
61
- VitestGenerateHook = tslib_1.__decorate([
62
- (0, cli_core_1.Injectable)()
63
- ], VitestGenerateHook);
64
- exports.VitestGenerateHook = VitestGenerateHook;
65
- //# sourceMappingURL=VitestGenerateHook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VitestGenerateHook.js","sourceRoot":"","sources":["../../../src/hooks/VitestGenerateHook.ts"],"names":[],"mappings":";;;;AACA,4EAA2C;AAC3C,6CAAqF;AAErF,sDAAkD;AAG3C,IAAM,kBAAkB,GAAxB,MAAM,k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,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE5E,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,YAAY,IAAI,WAAW,EAAE,EAAC,WAAW,EAAE,0BAAY,EAAC,CAAC;YACjH,CAAC,CAAC,YAAY,IAAI,WAAW;YAC7B,CAAC,CAAC,2BAA2B,CAAC;QAEhC,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,YAAY,IAAI,kBAAkB,EAAE,EAAC,WAAW,EAAE,0BAAY,EAAC,CAAC;YAC/H,CAAC,CAAC,YAAY,IAAI,kBAAkB;YACpC,CAAC,CAAC,kCAAkC,CAAC;QAEvC,OAAO;YACL,YAAY;YACZ,mBAAmB;YACnB,eAAe,EAAE,IAAA,wBAAa,EAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,UAAU,sBAAsB,CAAC,CAAC;SAChH,CAAC;IACJ,CAAC;CACF,CAAA;AA3DC;IAAC,IAAA,iBAAM,GAAE;sCACS,6BAAkB;4DAAC;AAErC;IAAC,IAAA,iBAAM,EAAC,UAAU,CAAC;;;;wDAqClB;AAzCU,kBAAkB;IAD9B,IAAA,qBAAU,GAAE;GACA,kBAAkB,CA4D9B;AA5DY,gDAAkB"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VitestInitHook = void 0;
4
- const tslib_1 = require("tslib");
5
- const cli_core_1 = require("@tsed/cli-core");
6
- const templateDir_1 = require("../utils/templateDir");
7
- let VitestInitHook = class VitestInitHook {
8
- packageJson;
9
- srcRenderer;
10
- rootRenderer;
11
- scriptsRenderer;
12
- onInitExec() {
13
- return [
14
- {
15
- title: "Generate files for vitest",
16
- task: (ctx) => {
17
- return this.rootRenderer.renderAll(["vitest.config.mts.hbs"], ctx, {
18
- templateDir: `${templateDir_1.TEMPLATE_DIR}/init`
19
- });
20
- }
21
- }
22
- ];
23
- }
24
- };
25
- tslib_1.__decorate([
26
- (0, cli_core_1.Inject)(),
27
- tslib_1.__metadata("design:type", cli_core_1.ProjectPackageJson)
28
- ], VitestInitHook.prototype, "packageJson", void 0);
29
- tslib_1.__decorate([
30
- (0, cli_core_1.Inject)(),
31
- tslib_1.__metadata("design:type", cli_core_1.SrcRendererService)
32
- ], VitestInitHook.prototype, "srcRenderer", void 0);
33
- tslib_1.__decorate([
34
- (0, cli_core_1.Inject)(),
35
- tslib_1.__metadata("design:type", cli_core_1.RootRendererService)
36
- ], VitestInitHook.prototype, "rootRenderer", void 0);
37
- tslib_1.__decorate([
38
- (0, cli_core_1.Inject)(),
39
- tslib_1.__metadata("design:type", cli_core_1.ScriptsRendererService)
40
- ], VitestInitHook.prototype, "scriptsRenderer", void 0);
41
- tslib_1.__decorate([
42
- (0, cli_core_1.OnExec)("init"),
43
- tslib_1.__metadata("design:type", Function),
44
- tslib_1.__metadata("design:paramtypes", []),
45
- tslib_1.__metadata("design:returntype", void 0)
46
- ], VitestInitHook.prototype, "onInitExec", null);
47
- VitestInitHook = tslib_1.__decorate([
48
- (0, cli_core_1.Injectable)()
49
- ], VitestInitHook);
50
- exports.VitestInitHook = VitestInitHook;
51
- //# sourceMappingURL=VitestInitHook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VitestInitHook.js","sourceRoot":"","sources":["../../../src/hooks/VitestInitHook.ts"],"names":[],"mappings":";;;;AAAA,6CAQwB;AACxB,sDAAkD;AAG3C,IAAM,cAAc,GAApB,MAAM,cAAc;IAEf,WAAW,CAAqB;IAGhC,WAAW,CAAqB;IAGhC,YAAY,CAAsB;IAGlC,eAAe,CAAyB;IAGlD,UAAU;QACR,OAAO;YACL;gBACE,KAAK,EAAE,2BAA2B;gBAClC,IAAI,EAAE,CAAC,GAAQ,EAAE,EAAE;oBACjB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC,EAAE,GAAG,EAAE;wBACjE,WAAW,EAAE,GAAG,0BAAY,OAAO;qBACpC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAzBC;IAAC,IAAA,iBAAM,GAAE;sCACc,6BAAkB;mDAAC;AAE1C;IAAC,IAAA,iBAAM,GAAE;sCACc,6BAAkB;mDAAC;AAE1C;IAAC,IAAA,iBAAM,GAAE;sCACe,8BAAmB;oDAAC;AAE5C;IAAC,IAAA,iBAAM,GAAE;sCACkB,iCAAsB;uDAAC;AAElD;IAAC,IAAA,iBAAM,EAAC,MAAM,CAAC;;;;gDAYd;AAzBU,cAAc;IAD1B,IAAA,qBAAU,GAAE;GACA,cAAc,CA0B1B;AA1BY,wCAAc"}
package/lib/cjs/index.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const CliPluginVitestModule_1 = require("./CliPluginVitestModule");
5
- tslib_1.__exportStar(require("./utils/templateDir"), exports);
6
- exports.default = CliPluginVitestModule_1.CliPluginVitestModule;
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAE9D,8DAAoC;AAEpC,kBAAe,6CAAqB,CAAC"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TEMPLATE_DIR = void 0;
4
- const cli_core_1 = require("@tsed/cli-core");
5
- exports.TEMPLATE_DIR = (0, cli_core_1.getTemplateDirectory)(__dirname);
6
- //# sourceMappingURL=templateDir.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templateDir.js","sourceRoot":"","sources":["../../../src/utils/templateDir.ts"],"names":[],"mappings":";;;AAAA,6CAAoD;AAEvC,QAAA,YAAY,GAAG,IAAA,+BAAoB,EAAC,SAAS,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }