@actual-app/api 26.5.0 → 26.5.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.
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
|
|
1
3
|
import { DEFAULT_DASHBOARD_STATE } from '#shared/dashboard';
|
|
2
4
|
|
|
3
5
|
export default async function runMigration(db) {
|
|
@@ -25,7 +27,7 @@ export default async function runMigration(db) {
|
|
|
25
27
|
db.runQuery(
|
|
26
28
|
`INSERT INTO dashboard (id, type, width, height, x, y, meta) VALUES (?, ?, ?, ?, ?, ?, ?)`,
|
|
27
29
|
[
|
|
28
|
-
|
|
30
|
+
uuidv4(),
|
|
29
31
|
widget.type,
|
|
30
32
|
widget.width,
|
|
31
33
|
widget.height,
|
|
@@ -43,9 +45,9 @@ export default async function runMigration(db) {
|
|
|
43
45
|
db.execQuery(`
|
|
44
46
|
INSERT INTO dashboard (id, type, width, height, x, y)
|
|
45
47
|
VALUES
|
|
46
|
-
('${
|
|
47
|
-
('${
|
|
48
|
-
('${
|
|
48
|
+
('${uuidv4()}', 'net-worth-card', 8, 2, 0, 0),
|
|
49
|
+
('${uuidv4()}', 'cash-flow-card', 4, 2, 8, 0),
|
|
50
|
+
('${uuidv4()}', 'spending-card', 4, 2, 0, 2);
|
|
49
51
|
`);
|
|
50
52
|
|
|
51
53
|
// Add custom reports to the dashboard
|
|
@@ -53,7 +55,7 @@ export default async function runMigration(db) {
|
|
|
53
55
|
db.runQuery(
|
|
54
56
|
`INSERT INTO dashboard (id, type, width, height, x, y, meta) VALUES (?, ?, ?, ?, ?, ?, ?)`,
|
|
55
57
|
[
|
|
56
|
-
|
|
58
|
+
uuidv4(),
|
|
57
59
|
'custom-report',
|
|
58
60
|
4,
|
|
59
61
|
2,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
|
|
1
3
|
export default async function runMigration(db) {
|
|
2
4
|
db.transaction(() => {
|
|
3
5
|
// 1. Create dashboards table
|
|
@@ -14,7 +16,7 @@ export default async function runMigration(db) {
|
|
|
14
16
|
`);
|
|
15
17
|
|
|
16
18
|
// 3. Create a default dashboard
|
|
17
|
-
const defaultDashboardId =
|
|
19
|
+
const defaultDashboardId = uuidv4();
|
|
18
20
|
db.runQuery(`INSERT INTO dashboard_pages (id, name) VALUES (?, ?)`, [
|
|
19
21
|
defaultDashboardId,
|
|
20
22
|
'Main',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "26.5.
|
|
3
|
+
"version": "26.5.1",
|
|
4
4
|
"description": "An API for Actual",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
"typecheck": "tsgo -b && tsc-strict"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@actual-app/core": "26.5.
|
|
45
|
+
"@actual-app/core": "26.5.1",
|
|
46
46
|
"@actual-app/crdt": "2.1.0",
|
|
47
47
|
"better-sqlite3": "^12.8.0",
|
|
48
|
-
"compare-versions": "^6.1.1"
|
|
48
|
+
"compare-versions": "^6.1.1",
|
|
49
|
+
"uuid": "^13.0.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@typescript/native-preview": "beta",
|