@tsed/cli-plugin-typeorm 7.0.0-beta.3 → 7.0.0-beta.4

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.
@@ -3,7 +3,7 @@ import { CliService, inject, ProjectPackageJson } from "@tsed/cli-core";
3
3
  import { injectable } from "@tsed/di";
4
4
  import { pascalCase } from "change-case";
5
5
  function getDatabase(ctx) {
6
- return ctx.features?.find((type) => type.includes("typeorm:"))?.split(":")[1];
6
+ return ctx.features?.find((type) => type.includes("orm:typeorm:"))?.split(":")[2];
7
7
  }
8
8
  export class TypeORMInitHook {
9
9
  constructor() {
@@ -31,7 +31,7 @@ export class TypeORMInitHook {
31
31
  if (!database || !data.typeorm) {
32
32
  return tasks;
33
33
  }
34
- const typeormDataSource = data.features?.find((value) => value.startsWith("typeorm:"));
34
+ const typeormDataSource = data.features?.find((value) => value.startsWith("orm:typeorm:"));
35
35
  return [
36
36
  ...tasks,
37
37
  ...(await this.cliService.getTasks("generate", {
@@ -65,7 +65,7 @@ export default defineTemplate({
65
65
  name: "typeormDataSource",
66
66
  message: "Which database type?",
67
67
  when(state) {
68
- return state.type === "typeorm:datasource";
68
+ return state.type === "orm:typeorm:datasource";
69
69
  },
70
70
  source: (state, keyword) => {
71
71
  if (keyword) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-plugin-typeorm",
3
3
  "description": "Ts.ED CLI plugin. Add TypeORM support",
4
- "version": "7.0.0-beta.3",
4
+ "version": "7.0.0-beta.4",
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.3",
30
- "@tsed/cli-core": "7.0.0-beta.3",
31
- "@tsed/typescript": "7.0.0-beta.3",
29
+ "@tsed/cli": "7.0.0-beta.4",
30
+ "@tsed/cli-core": "7.0.0-beta.4",
31
+ "@tsed/typescript": "7.0.0-beta.4",
32
32
  "cross-env": "7.0.3",
33
33
  "typescript": "5.6.2",
34
34
  "vitest": "3.2.4"