fragment-ts 1.0.15 → 1.0.17

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.
@@ -177,7 +177,7 @@ class InitCommand {
177
177
  "migrate:revert": "fragment migrate:revert",
178
178
  },
179
179
  dependencies: {
180
- "fragment-ts": "^1.0.15",
180
+ "fragment-ts": "^1.0.17",
181
181
  "reflect-metadata": "^0.1.13",
182
182
  },
183
183
  devDependencies: {
@@ -1,6 +1,52 @@
1
1
  import { Command } from "commander";
2
2
  export declare class MigrateCommand {
3
+ private static tsNodeAvailable;
4
+ private static tsConfigExists;
3
5
  static register(program: Command): void;
6
+ /**
7
+ * Check if ts-node is available in the user's project
8
+ */
9
+ private static isTsNodeAvailable;
10
+ /**
11
+ * Check if tsconfig.json exists
12
+ */
13
+ private static hasTsConfig;
14
+ /**
15
+ * Detect if TypeScript files exist in the project
16
+ */
17
+ private static detectProjectType;
18
+ /**
19
+ * Check for TypeScript migration files
20
+ */
21
+ private static hasTypeScriptMigrations;
22
+ /**
23
+ * Check for JavaScript migration files
24
+ */
25
+ private static hasJavaScriptMigrations;
26
+ /**
27
+ * Determine whether to use TypeScript or JavaScript for migrations
28
+ */
29
+ private static shouldUseTypeScript;
30
+ /**
31
+ * Register ts-node if needed
32
+ */
33
+ private static registerTsNodeIfNeeded;
34
+ /**
35
+ * Get migration directory based on project type
36
+ */
37
+ private static getMigrationDirectory;
38
+ /**
39
+ * Get migration file extension based on project type
40
+ */
41
+ private static getMigrationExtension;
42
+ /**
43
+ * Get entity paths for TypeORM configuration
44
+ */
45
+ private static getEntityPaths;
46
+ /**
47
+ * Get migration paths for TypeORM configuration
48
+ */
49
+ private static getMigrationPaths;
4
50
  private static generateMigration;
5
51
  /**
6
52
  * Verify entities are loaded and provide helpful debugging
@@ -10,8 +56,8 @@ export declare class MigrateCommand {
10
56
  * Build a single query statement with proper escaping
11
57
  */
12
58
  private static buildQueryStatement;
13
- private static createMigration;
14
59
  private static runMigrations;
60
+ private static createMigration;
15
61
  private static revertMigration;
16
62
  private static refreshMigrations;
17
63
  private static showStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.command.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/migrate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;mBAoFlB,iBAAiB;IA4HtC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAoB7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;mBA2Bb,eAAe;mBA8Bf,aAAa;mBAoCb,eAAe;mBAqBf,iBAAiB;mBAsBjB,UAAU;mBA+CV,UAAU;mBAqBV,UAAU;mBAqBV,QAAQ;mBA6BR,UAAU;mBA2BV,aAAa;IAuGlC,OAAO,CAAC,MAAM,CAAC,eAAe;IAiB9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAkCtC"}
1
+ {"version":3,"file":"migrate.command.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/migrate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,eAAe,CAAwB;IACtD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAwB;IAErD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAsFvC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAoBhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAS1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAsBhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAYtC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAu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