@aeriajs/builtins 0.0.61 → 0.0.62
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.
|
@@ -5,7 +5,7 @@ const api_1 = require("@aeriajs/api");
|
|
|
5
5
|
const entrypoint_1 = require("@aeriajs/entrypoint");
|
|
6
6
|
const link = async (_id) => {
|
|
7
7
|
const config = await (0, entrypoint_1.getConfig)();
|
|
8
|
-
return `${config.
|
|
8
|
+
return `${config.publicUrl || ''}/file/${_id}`;
|
|
9
9
|
};
|
|
10
10
|
const timestamp = (lastModified) => lastModified
|
|
11
11
|
? new Date(lastModified).getTime()
|
|
@@ -3,7 +3,7 @@ import { defineDescription } from "@aeriajs/api";
|
|
|
3
3
|
import { getConfig } from "@aeriajs/entrypoint";
|
|
4
4
|
const link = async (_id) => {
|
|
5
5
|
const config = await getConfig();
|
|
6
|
-
return `${config.
|
|
6
|
+
return `${config.publicUrl || ""}/file/${_id}`;
|
|
7
7
|
};
|
|
8
8
|
const timestamp = (lastModified) => lastModified ? new Date(lastModified).getTime() : "fresh";
|
|
9
9
|
export const description = defineDescription({
|
|
@@ -9,7 +9,7 @@ const bcrypt_1 = __importDefault(require("bcrypt"));
|
|
|
9
9
|
const getActivationLink = async (userId) => {
|
|
10
10
|
const config = await (0, entrypoint_1.getConfig)();
|
|
11
11
|
const activationToken = await bcrypt_1.default.hash(userId.toString(), 10);
|
|
12
|
-
const link = `${config.
|
|
12
|
+
const link = `${config.publicUrl}/user/activate?u=${userId.toString()}&t=${activationToken}`;
|
|
13
13
|
return link;
|
|
14
14
|
};
|
|
15
15
|
exports.getActivationLink = getActivationLink;
|
|
@@ -4,6 +4,6 @@ import bcrypt from "bcrypt";
|
|
|
4
4
|
export const getActivationLink = async (userId) => {
|
|
5
5
|
const config = await getConfig();
|
|
6
6
|
const activationToken = await bcrypt.hash(userId.toString(), 10);
|
|
7
|
-
const link = `${config.
|
|
7
|
+
const link = `${config.publicUrl}/user/activate?u=${userId.toString()}&t=${activationToken}`;
|
|
8
8
|
return link;
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/builtins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.62",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"bcrypt": "^5.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@aeriajs/access-control": "^0.0.
|
|
40
|
-
"@aeriajs/api": "^0.0.
|
|
41
|
-
"@aeriajs/common": "^0.0.
|
|
42
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
43
|
-
"@aeriajs/types": "^0.0.
|
|
44
|
-
"@aeriajs/validation": "^0.0.
|
|
39
|
+
"@aeriajs/access-control": "^0.0.33",
|
|
40
|
+
"@aeriajs/api": "^0.0.62",
|
|
41
|
+
"@aeriajs/common": "^0.0.33",
|
|
42
|
+
"@aeriajs/entrypoint": "^0.0.33",
|
|
43
|
+
"@aeriajs/types": "^0.0.30",
|
|
44
|
+
"@aeriajs/validation": "^0.0.36",
|
|
45
45
|
"@types/bcrypt": "^5.0.2",
|
|
46
46
|
"mongodb": "^6.5.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@aeriajs/access-control": "^0.0.
|
|
50
|
-
"@aeriajs/api": "^0.0.
|
|
51
|
-
"@aeriajs/common": "^0.0.
|
|
52
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
53
|
-
"@aeriajs/types": "^0.0.
|
|
54
|
-
"@aeriajs/validation": "^0.0.
|
|
49
|
+
"@aeriajs/access-control": "^0.0.33",
|
|
50
|
+
"@aeriajs/api": "^0.0.62",
|
|
51
|
+
"@aeriajs/common": "^0.0.33",
|
|
52
|
+
"@aeriajs/entrypoint": "^0.0.33",
|
|
53
|
+
"@aeriajs/types": "^0.0.30",
|
|
54
|
+
"@aeriajs/validation": "^0.0.36"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"test": "echo skipping",
|