@powersync/service-module-mongodb-storage 0.0.0-dev-20250722133422 → 0.0.0-dev-20250722135642
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @powersync/service-module-mongodb-storage
|
|
2
2
|
|
|
3
|
-
## 0.0.0-dev-
|
|
3
|
+
## 0.0.0-dev-20250722135642
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
- Updated dependencies [4ebc3bf]
|
|
11
11
|
- Updated dependencies [1aafdaf]
|
|
12
12
|
- Updated dependencies [a700ec9]
|
|
13
|
-
- @powersync/service-core@0.0.0-dev-
|
|
14
|
-
- @powersync/service-types@0.0.0-dev-
|
|
15
|
-
- @powersync/lib-services-framework@0.0.0-dev-
|
|
16
|
-
- @powersync/lib-service-mongodb@0.0.0-dev-
|
|
13
|
+
- @powersync/service-core@0.0.0-dev-20250722135642
|
|
14
|
+
- @powersync/service-types@0.0.0-dev-20250722135642
|
|
15
|
+
- @powersync/lib-services-framework@0.0.0-dev-20250722135642
|
|
16
|
+
- @powersync/lib-service-mongodb@0.0.0-dev-20250722135642
|
|
17
17
|
|
|
18
18
|
## 0.10.4
|
|
19
19
|
|
|
@@ -17,8 +17,8 @@ function updateDocFilter(userId, clientId) {
|
|
|
17
17
|
user_id: userId,
|
|
18
18
|
client_id: clientId,
|
|
19
19
|
connect_at: {
|
|
20
|
-
$gte: new Date(year
|
|
21
|
-
$lt: new Date(year
|
|
20
|
+
$gte: new Date(`${year}-${month}-${today}`),
|
|
21
|
+
$lt: new Date(`${year}-${month}-${nextDay}`)
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -31,7 +31,7 @@ function timeSpan(timeframe) {
|
|
|
31
31
|
const thisMonth = month;
|
|
32
32
|
const nextMonth = month == 11 ? 0 : month + 1;
|
|
33
33
|
return {
|
|
34
|
-
connect_at: { $gte: new Date(year
|
|
34
|
+
connect_at: { $gte: new Date(`${year}-${thisMonth}-${1}`), $lte: new Date(`${year}-${nextMonth}-${1}`) }
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
case 'week': {
|
|
@@ -45,8 +45,8 @@ function timeSpan(timeframe) {
|
|
|
45
45
|
const weekEnd = parseDate(weekEndDate);
|
|
46
46
|
return {
|
|
47
47
|
connect_at: {
|
|
48
|
-
$gte: new Date(weekStart.year
|
|
49
|
-
$lte: new Date(weekEnd.year
|
|
48
|
+
$gte: new Date(`${weekStart.year}-${weekStart.month}-${weekStart.today}`),
|
|
49
|
+
$lte: new Date(`${weekEnd.year}-${weekEnd.month}-${weekEnd.today + 1}`) // +1 to include the end date
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}
|
|
@@ -55,8 +55,8 @@ function timeSpan(timeframe) {
|
|
|
55
55
|
const nextDay = today + 1;
|
|
56
56
|
return {
|
|
57
57
|
connect_at: {
|
|
58
|
-
$gte: new Date(year
|
|
59
|
-
$lt: new Date(year
|
|
58
|
+
$gte: new Date(`${year}-${month}-${today}`),
|
|
59
|
+
$lt: new Date(`${year}-${month}-${nextDay}`)
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MongoReportStorage.js","sourceRoot":"","sources":["../../src/storage/MongoReportStorage.ts"],"names":[],"mappings":"AAKA,SAAS,SAAS,CAAC,IAAU;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC1B,OAAO;QACL,IAAI;QACJ,KAAK;QACL,KAAK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AiB;aAC3C,SAAS,CAAqC;YAC7C;gBACE,MAAM,EAAE;oBACN,GAAG,EAAE,IAAI;oBACT,QAAQ,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;oBACnC,UAAU,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE;oBACvC,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;iBAC5B;aACF;YACD;gBACE,QAAQ,EAAE;oBACR,GAAG,EAAE,CAAC;oBACN,KAAK,EAAE,WAAW;oBAClB,OAAO,EAAE,aAAa;oBACtB,IAAI,EAAE,OAAO;iBACd;aACF;SACF,CAAC;aACD,OAAO,EAAE,CAAC;QACb,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,MAAM,CAAC,CAAC,CAAC;SACb,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QACzB,QAAQ;IACV,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@powersync/service-module-mongodb-storage",
|
|
3
3
|
"repository": "https://github.com/powersync-ja/powersync-service",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
|
-
"version": "0.0.0-dev-
|
|
5
|
+
"version": "0.0.0-dev-20250722135642",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"license": "FSL-1.1-Apache-2.0",
|
|
8
8
|
"type": "module",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"lru-cache": "^10.2.2",
|
|
28
28
|
"ts-codec": "^1.3.0",
|
|
29
29
|
"uuid": "^11.1.0",
|
|
30
|
-
"@powersync/lib-service-mongodb": "0.0.0-dev-
|
|
31
|
-
"@powersync/lib-services-framework": "0.0.0-dev-
|
|
32
|
-
"@powersync/service-core": "0.0.0-dev-
|
|
33
|
-
"@powersync/service-types": "0.0.0-dev-
|
|
30
|
+
"@powersync/lib-service-mongodb": "0.0.0-dev-20250722135642",
|
|
31
|
+
"@powersync/lib-services-framework": "0.0.0-dev-20250722135642",
|
|
32
|
+
"@powersync/service-core": "0.0.0-dev-20250722135642",
|
|
33
|
+
"@powersync/service-types": "0.0.0-dev-20250722135642",
|
|
34
34
|
"@powersync/service-jsonbig": "0.17.10",
|
|
35
35
|
"@powersync/service-sync-rules": "0.27.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@powersync/service-core-tests": "0.0.0-dev-
|
|
38
|
+
"@powersync/service-core-tests": "0.0.0-dev-20250722135642"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc -b",
|
|
@@ -22,8 +22,8 @@ function updateDocFilter(userId: string, clientId: string): mongo.Filter<mongo.D
|
|
|
22
22
|
user_id: userId,
|
|
23
23
|
client_id: clientId,
|
|
24
24
|
connect_at: {
|
|
25
|
-
$gte: new Date(year
|
|
26
|
-
$lt: new Date(year
|
|
25
|
+
$gte: new Date(`${year}-${month}-${today}`),
|
|
26
|
+
$lt: new Date(`${year}-${month}-${nextDay}`)
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -37,7 +37,7 @@ function timeSpan(timeframe: event_types.TimeFrames): mongo.Filter<mongo.Documen
|
|
|
37
37
|
const thisMonth = month;
|
|
38
38
|
const nextMonth = month == 11 ? 0 : month + 1;
|
|
39
39
|
return {
|
|
40
|
-
connect_at: { $gte: new Date(year
|
|
40
|
+
connect_at: { $gte: new Date(`${year}-${thisMonth}-${1}`), $lte: new Date(`${year}-${nextMonth}-${1}`) }
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
case 'week': {
|
|
@@ -51,8 +51,8 @@ function timeSpan(timeframe: event_types.TimeFrames): mongo.Filter<mongo.Documen
|
|
|
51
51
|
const weekEnd = parseDate(weekEndDate);
|
|
52
52
|
return {
|
|
53
53
|
connect_at: {
|
|
54
|
-
$gte: new Date(weekStart.year
|
|
55
|
-
$lte: new Date(weekEnd.year
|
|
54
|
+
$gte: new Date(`${weekStart.year}-${weekStart.month}-${weekStart.today}`),
|
|
55
|
+
$lte: new Date(`${weekEnd.year}-${weekEnd.month}-${weekEnd.today + 1}`) // +1 to include the end date
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -61,8 +61,8 @@ function timeSpan(timeframe: event_types.TimeFrames): mongo.Filter<mongo.Documen
|
|
|
61
61
|
const nextDay = today + 1;
|
|
62
62
|
return {
|
|
63
63
|
connect_at: {
|
|
64
|
-
$gte: new Date(year
|
|
65
|
-
$lt: new Date(year
|
|
64
|
+
$gte: new Date(`${year}-${month}-${today}`),
|
|
65
|
+
$lt: new Date(`${year}-${month}-${nextDay}`)
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|