forge-sql-orm 2.0.25 → 2.0.27
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/ForgeSQLORM.js +7 -2
- package/dist/ForgeSQLORM.js.map +1 -1
- package/dist/ForgeSQLORM.mjs +7 -2
- package/dist/ForgeSQLORM.mjs.map +1 -1
- package/dist/webtriggers/applyMigrationsWebTrigger.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/webtriggers/applyMigrationsWebTrigger.ts +10 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyMigrationsWebTrigger.d.ts","sourceRoot":"","sources":["../../src/webtriggers/applyMigrationsWebTrigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,GAChC,WAAW,CAAC,eAAe,EAAE,eAAe,KAAK,OAAO,CAAC,eAAe,CAAC;;;;;;;
|
|
1
|
+
{"version":3,"file":"applyMigrationsWebTrigger.d.ts","sourceRoot":"","sources":["../../src/webtriggers/applyMigrationsWebTrigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,GAChC,WAAW,CAAC,eAAe,EAAE,eAAe,KAAK,OAAO,CAAC,eAAe,CAAC;;;;;;;EA6C1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-sql-orm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.27",
|
|
4
4
|
"description": "Drizzle ORM integration for Forge-SQL in Atlassian Forge applications.",
|
|
5
5
|
"main": "dist/ForgeSQLORM.js",
|
|
6
6
|
"module": "dist/ForgeSQLORM.mjs",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"database"
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@eslint/js": "^9.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
37
|
-
"@typescript-eslint/parser": "^8.
|
|
35
|
+
"@eslint/js": "^9.33.0",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^8.39.1",
|
|
37
|
+
"@typescript-eslint/parser": "^8.39.1",
|
|
38
38
|
"@vitest/coverage-v8": "^3.2.4",
|
|
39
39
|
"@vitest/ui": "^3.2.4",
|
|
40
|
-
"eslint": "^9.
|
|
41
|
-
"eslint-config-prettier": "^10.1.
|
|
40
|
+
"eslint": "^9.33.0",
|
|
41
|
+
"eslint-config-prettier": "^10.1.8",
|
|
42
42
|
"eslint-plugin-import": "^2.32.0",
|
|
43
43
|
"eslint-plugin-vitest": "^0.5.4",
|
|
44
|
-
"prettier": "^3.6.
|
|
44
|
+
"prettier": "^3.6.2",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
|
-
"typescript": "^5.
|
|
46
|
+
"typescript": "^5.9.2",
|
|
47
47
|
"uuid": "^11.1.0",
|
|
48
|
-
"vite": "^7.
|
|
48
|
+
"vite": "^7.1.2",
|
|
49
49
|
"vitest": "^3.2.4"
|
|
50
50
|
},
|
|
51
51
|
"license": "MIT",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"README.md"
|
|
72
72
|
],
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@forge/sql": "^3.0.
|
|
75
|
-
"drizzle-orm": "^0.44.
|
|
74
|
+
"@forge/sql": "^3.0.3",
|
|
75
|
+
"drizzle-orm": "^0.44.4",
|
|
76
76
|
"moment": "^2.30.1"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -42,7 +42,10 @@ export const applySchemaMigrations = async (
|
|
|
42
42
|
const migrationList = await migrationRunner.list();
|
|
43
43
|
const migrationHistory =
|
|
44
44
|
Array.isArray(migrationList) && migrationList.length > 0
|
|
45
|
-
? migrationList
|
|
45
|
+
? migrationList
|
|
46
|
+
.sort((a, b) => a.migratedAt.getTime() - b.migratedAt.getTime())
|
|
47
|
+
.map((y) => `${y.id}, ${y.name}, ${y.migratedAt.toUTCString()}`)
|
|
48
|
+
.join("\n")
|
|
46
49
|
: "No migrations found";
|
|
47
50
|
|
|
48
51
|
console.info("Migrations history:\nid, name, migrated_at\n", migrationHistory);
|
|
@@ -54,7 +57,12 @@ export const applySchemaMigrations = async (
|
|
|
54
57
|
body: "Migrations successfully executed",
|
|
55
58
|
};
|
|
56
59
|
} catch (error) {
|
|
57
|
-
|
|
60
|
+
try {
|
|
61
|
+
console.error("Error during migration:", JSON.stringify(error));
|
|
62
|
+
} catch (e) {
|
|
63
|
+
console.trace("Error stringify:", e);
|
|
64
|
+
console.error("Error during migration:", error);
|
|
65
|
+
}
|
|
58
66
|
return {
|
|
59
67
|
headers: { "Content-Type": ["application/json"] },
|
|
60
68
|
statusCode: 500,
|