fragment-ts 1.0.15 → 1.0.16
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.
- package/dist/cli/commands/init.command.js +1 -1
- package/dist/cli/commands/migrate.command.d.ts +47 -1
- package/dist/cli/commands/migrate.command.d.ts.map +1 -1
- package/dist/cli/commands/migrate.command.js +380 -100
- package/dist/cli/commands/migrate.command.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/init.command.ts +1 -1
- package/src/cli/commands/migrate.command.ts +481 -117
|
@@ -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;
|
|
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,M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