@openinc/parse-server-opendash 4.8.1 → 4.8.3
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.
|
@@ -11,6 +11,7 @@ const index_js_1 = require("../../config/index.js");
|
|
|
11
11
|
const SchemaClass_js_1 = require("../classes/SchemaClass.js");
|
|
12
12
|
const isClassEnabled_js_1 = require("../helper/isClassEnabled.js");
|
|
13
13
|
const PREFIX = "OD3_";
|
|
14
|
+
const LOG_PREFIX = "[@openinc/parse-server-opendash]";
|
|
14
15
|
const schemaHandler = SchemaClass_js_1.SchemaClass.getInstance();
|
|
15
16
|
async function initSchema() {
|
|
16
17
|
const config = index_js_1.ConfigInstance.getInstance();
|
|
@@ -23,14 +24,45 @@ async function initSchema() {
|
|
|
23
24
|
deleteNonEmptyClass: config.getBoolean("FORCE_DELETE_CLASS"),
|
|
24
25
|
filter: (className) => (0, isClassEnabled_js_1.isClassEnabled)(className),
|
|
25
26
|
});
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
console.error(`${LOG_PREFIX} Error while uploading schema`);
|
|
30
|
+
console.error(error);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
// Unlike the upload above, which sends its own master key header, this goes
|
|
34
|
+
// through the Parse SDK and relies on Parse Server having initialized it.
|
|
35
|
+
try {
|
|
26
36
|
schemaHandler.setSchema(Object.fromEntries((await node_1.default.Schema.all()).map((schema) => [
|
|
27
37
|
schema.className,
|
|
28
38
|
schema,
|
|
29
39
|
])));
|
|
30
40
|
}
|
|
31
41
|
catch (error) {
|
|
32
|
-
console.error(
|
|
42
|
+
console.error(`${LOG_PREFIX} Error while loading schema via Parse SDK`);
|
|
43
|
+
logParseSdkState();
|
|
33
44
|
console.error(error);
|
|
34
45
|
process.exit(1);
|
|
35
46
|
}
|
|
36
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Logs which Parse SDK this package talks to. If it is not the instance Parse
|
|
50
|
+
* Server initialized (`global.Parse`), it has no master key — typically because
|
|
51
|
+
* the package manager installed a second copy of `parse`.
|
|
52
|
+
*/
|
|
53
|
+
function logParseSdkState() {
|
|
54
|
+
const serverParse = globalThis.Parse;
|
|
55
|
+
let sdkPath = "unknown";
|
|
56
|
+
try {
|
|
57
|
+
sdkPath = require.resolve("parse/node");
|
|
58
|
+
}
|
|
59
|
+
catch (error) { }
|
|
60
|
+
console.error(`${LOG_PREFIX} Parse SDK: ${node_1.default.CoreManager.get("VERSION")} (${sdkPath})`);
|
|
61
|
+
console.error(`${LOG_PREFIX} Parse SDK of Parse Server: ` +
|
|
62
|
+
(serverParse
|
|
63
|
+
? `${serverParse.CoreManager.get("VERSION")}, same instance: ${serverParse === node_1.default}`
|
|
64
|
+
: "global.Parse not set"));
|
|
65
|
+
console.error(`${LOG_PREFIX} applicationId: ${node_1.default.applicationId || "(not set)"}, ` +
|
|
66
|
+
`serverURL: ${node_1.default.serverURL || "(not set)"}, ` +
|
|
67
|
+
`masterKey: ${node_1.default.masterKey ? "set" : "(not set)"}`);
|
|
68
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openinc/parse-server-opendash",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.3",
|
|
4
4
|
"description": "Parse Server Cloud Code for open.INC Stack.",
|
|
5
5
|
"packageManager": "pnpm@11.25.0",
|
|
6
6
|
"keywords": [
|
|
@@ -70,20 +70,20 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@opendash/ruleset-core": "nightly",
|
|
73
|
-
"@openinc/parse-server-schema": "^4.1.
|
|
73
|
+
"@openinc/parse-server-schema": "^4.1.5",
|
|
74
74
|
"amqplib": "^0.10.9",
|
|
75
75
|
"cron": "^4.4.0",
|
|
76
76
|
"dayjs": "^1.11.23",
|
|
77
77
|
"dotenv": "^17.4.2",
|
|
78
|
-
"fast-equals": "^6.0.
|
|
78
|
+
"fast-equals": "^6.0.4",
|
|
79
79
|
"i18next": "^26.4.2",
|
|
80
80
|
"i18next-fs-backend": "^2.6.8",
|
|
81
81
|
"jsonwebtoken": "^9.0.3",
|
|
82
82
|
"jwks-rsa": "^4.1.0",
|
|
83
83
|
"nodemailer": "^9.1.1",
|
|
84
84
|
"nunjucks": "^3.2.4",
|
|
85
|
-
"parse": "^8.6.
|
|
86
|
-
"parse-server": "9.10.
|
|
85
|
+
"parse": "^8.6.2",
|
|
86
|
+
"parse-server": "9.10.1",
|
|
87
87
|
"pdf-img-convert": "2.0.0",
|
|
88
88
|
"rimraf": "^6.1.3",
|
|
89
89
|
"table": "^6.9.0",
|
|
@@ -92,17 +92,17 @@
|
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/jsonwebtoken": "^9.0.10",
|
|
95
|
-
"@types/node": "^25.9.
|
|
96
|
-
"@types/nodemailer": "^8.0.
|
|
95
|
+
"@types/node": "^25.9.8",
|
|
96
|
+
"@types/nodemailer": "^8.0.2",
|
|
97
97
|
"@types/nunjucks": "^3.2.6",
|
|
98
98
|
"@types/safe-timers": "^1.1.2",
|
|
99
99
|
"@types/web-push": "^3.6.4",
|
|
100
100
|
"concurrently": "^10.0.5",
|
|
101
|
-
"prettier": "^3.
|
|
101
|
+
"prettier": "^3.9.9",
|
|
102
102
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
103
103
|
"ts-node": "^10.9.2",
|
|
104
104
|
"typedoc": "^0.28.20",
|
|
105
|
-
"typedoc-plugin-markdown": "^4.13.
|
|
105
|
+
"typedoc-plugin-markdown": "^4.13.1",
|
|
106
106
|
"typescript": "^5.9.3"
|
|
107
107
|
}
|
|
108
108
|
}
|