@aeriajs/builtins 0.0.60 → 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.
- package/dist/collections/file/description.d.ts +3 -3
- package/dist/collections/file/description.js +4 -4
- package/dist/collections/file/description.mjs +4 -4
- package/dist/collections/file/download.js +6 -6
- package/dist/collections/file/download.mjs +6 -6
- package/dist/collections/file/index.d.ts +53 -53
- package/dist/collections/file/insert.d.ts +4 -4
- package/dist/collections/file/insert.js +2 -2
- package/dist/collections/file/insert.mjs +2 -2
- package/dist/collections/user/getActivationLink.js +1 -1
- package/dist/collections/user/getActivationLink.mjs +1 -1
- package/dist/collections/user/index.d.ts +12 -12
- package/dist/index.d.ts +65 -65
- package/package.json +13 -13
|
@@ -2,9 +2,9 @@ export declare const description: {
|
|
|
2
2
|
readonly $id: "file";
|
|
3
3
|
readonly owned: "always";
|
|
4
4
|
readonly presets: readonly ["owned"];
|
|
5
|
-
readonly indexes: readonly ["
|
|
5
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
6
6
|
readonly properties: {
|
|
7
|
-
readonly
|
|
7
|
+
readonly type: {
|
|
8
8
|
readonly type: "string";
|
|
9
9
|
};
|
|
10
10
|
readonly size: {
|
|
@@ -14,7 +14,7 @@ export declare const description: {
|
|
|
14
14
|
readonly type: "string";
|
|
15
15
|
readonly format: "date-time";
|
|
16
16
|
};
|
|
17
|
-
readonly
|
|
17
|
+
readonly name: {
|
|
18
18
|
readonly type: "string";
|
|
19
19
|
};
|
|
20
20
|
readonly absolute_path: {
|
|
@@ -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()
|
|
@@ -15,12 +15,12 @@ exports.description = (0, api_1.defineDescription)({
|
|
|
15
15
|
owned: 'always',
|
|
16
16
|
presets: ['owned'],
|
|
17
17
|
indexes: [
|
|
18
|
-
'
|
|
18
|
+
'name',
|
|
19
19
|
'link',
|
|
20
20
|
'mime',
|
|
21
21
|
],
|
|
22
22
|
properties: {
|
|
23
|
-
|
|
23
|
+
type: {
|
|
24
24
|
type: 'string',
|
|
25
25
|
},
|
|
26
26
|
size: {
|
|
@@ -30,7 +30,7 @@ exports.description = (0, api_1.defineDescription)({
|
|
|
30
30
|
type: 'string',
|
|
31
31
|
format: 'date-time',
|
|
32
32
|
},
|
|
33
|
-
|
|
33
|
+
name: {
|
|
34
34
|
type: 'string',
|
|
35
35
|
},
|
|
36
36
|
absolute_path: {
|
|
@@ -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({
|
|
@@ -11,12 +11,12 @@ export const description = defineDescription({
|
|
|
11
11
|
owned: "always",
|
|
12
12
|
presets: ["owned"],
|
|
13
13
|
indexes: [
|
|
14
|
-
"
|
|
14
|
+
"name",
|
|
15
15
|
"link",
|
|
16
16
|
"mime"
|
|
17
17
|
],
|
|
18
18
|
properties: {
|
|
19
|
-
|
|
19
|
+
type: {
|
|
20
20
|
type: "string"
|
|
21
21
|
},
|
|
22
22
|
size: {
|
|
@@ -26,7 +26,7 @@ export const description = defineDescription({
|
|
|
26
26
|
type: "string",
|
|
27
27
|
format: "date-time"
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
name: {
|
|
30
30
|
type: "string"
|
|
31
31
|
},
|
|
32
32
|
absolute_path: {
|
|
@@ -19,8 +19,8 @@ const download = async (payload, context) => {
|
|
|
19
19
|
}, {
|
|
20
20
|
projection: {
|
|
21
21
|
absolute_path: 1,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
name: 1,
|
|
23
|
+
type: 1,
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
26
|
if (!file) {
|
|
@@ -54,10 +54,10 @@ const download = async (payload, context) => {
|
|
|
54
54
|
'accept-ranges': 'bytes',
|
|
55
55
|
'content-range': `bytes ${start}-${end}/${stat.size}`,
|
|
56
56
|
'content-length': chunkSize,
|
|
57
|
-
'content-type': file.
|
|
57
|
+
'content-type': file.type,
|
|
58
58
|
'content-disposition': `${options.includes('download')
|
|
59
59
|
? 'attachment; '
|
|
60
|
-
: ''}
|
|
60
|
+
: ''}name=${encodeURI(file.name)}`,
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
return fs_1.default.createReadStream(file.absolute_path, {
|
|
@@ -67,10 +67,10 @@ const download = async (payload, context) => {
|
|
|
67
67
|
}
|
|
68
68
|
if (!payload.noHeaders) {
|
|
69
69
|
context.response.writeHead(200, {
|
|
70
|
-
'content-type': file.
|
|
70
|
+
'content-type': file.type,
|
|
71
71
|
'content-disposition': `${options.includes('download')
|
|
72
72
|
? 'attachment; '
|
|
73
|
-
: ''}
|
|
73
|
+
: ''}name=${encodeURI(file.name)}`,
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
return fs_1.default.createReadStream(file.absolute_path);
|
|
@@ -14,8 +14,8 @@ export const download = async (payload, context) => {
|
|
|
14
14
|
}, {
|
|
15
15
|
projection: {
|
|
16
16
|
absolute_path: 1,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
name: 1,
|
|
18
|
+
type: 1
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
if (!file) {
|
|
@@ -46,8 +46,8 @@ export const download = async (payload, context) => {
|
|
|
46
46
|
"accept-ranges": "bytes",
|
|
47
47
|
"content-range": `bytes ${start}-${end}/${stat.size}`,
|
|
48
48
|
"content-length": chunkSize,
|
|
49
|
-
"content-type": file.
|
|
50
|
-
"content-disposition": `${options.includes("download") ? "attachment; " : ""}
|
|
49
|
+
"content-type": file.type,
|
|
50
|
+
"content-disposition": `${options.includes("download") ? "attachment; " : ""}name=${encodeURI(file.name)}`
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
return fs.createReadStream(file.absolute_path, {
|
|
@@ -57,8 +57,8 @@ export const download = async (payload, context) => {
|
|
|
57
57
|
}
|
|
58
58
|
if (!payload.noHeaders) {
|
|
59
59
|
context.response.writeHead(200, {
|
|
60
|
-
"content-type": file.
|
|
61
|
-
"content-disposition": `${options.includes("download") ? "attachment; " : ""}
|
|
60
|
+
"content-type": file.type,
|
|
61
|
+
"content-disposition": `${options.includes("download") ? "attachment; " : ""}name=${encodeURI(file.name)}`
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
return fs.createReadStream(file.absolute_path);
|
|
@@ -96,9 +96,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
96
96
|
readonly $id: "file";
|
|
97
97
|
readonly owned: "always";
|
|
98
98
|
readonly presets: readonly ["owned"];
|
|
99
|
-
readonly indexes: readonly ["
|
|
99
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
100
100
|
readonly properties: {
|
|
101
|
-
readonly
|
|
101
|
+
readonly type: {
|
|
102
102
|
readonly type: "string";
|
|
103
103
|
};
|
|
104
104
|
readonly size: {
|
|
@@ -108,7 +108,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
108
108
|
readonly type: "string";
|
|
109
109
|
readonly format: "date-time";
|
|
110
110
|
};
|
|
111
|
-
readonly
|
|
111
|
+
readonly name: {
|
|
112
112
|
readonly type: "string";
|
|
113
113
|
};
|
|
114
114
|
readonly absolute_path: {
|
|
@@ -151,9 +151,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
151
151
|
readonly $id: "file";
|
|
152
152
|
readonly owned: "always";
|
|
153
153
|
readonly presets: readonly ["owned"];
|
|
154
|
-
readonly indexes: readonly ["
|
|
154
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
155
155
|
readonly properties: {
|
|
156
|
-
readonly
|
|
156
|
+
readonly type: {
|
|
157
157
|
readonly type: "string";
|
|
158
158
|
};
|
|
159
159
|
readonly size: {
|
|
@@ -163,7 +163,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
163
163
|
readonly type: "string";
|
|
164
164
|
readonly format: "date-time";
|
|
165
165
|
};
|
|
166
|
-
readonly
|
|
166
|
+
readonly name: {
|
|
167
167
|
readonly type: "string";
|
|
168
168
|
};
|
|
169
169
|
readonly absolute_path: {
|
|
@@ -196,14 +196,14 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
196
196
|
readonly ask: true;
|
|
197
197
|
};
|
|
198
198
|
};
|
|
199
|
-
}>>, "
|
|
199
|
+
}>>, "name" | "absolute_path" | "_id" | "owner">;
|
|
200
200
|
}, context: import("@aeriajs/types").Context<{
|
|
201
201
|
readonly $id: "file";
|
|
202
202
|
readonly owned: "always";
|
|
203
203
|
readonly presets: readonly ["owned"];
|
|
204
|
-
readonly indexes: readonly ["
|
|
204
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
205
205
|
readonly properties: {
|
|
206
|
-
readonly
|
|
206
|
+
readonly type: {
|
|
207
207
|
readonly type: "string";
|
|
208
208
|
};
|
|
209
209
|
readonly size: {
|
|
@@ -213,7 +213,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
213
213
|
readonly type: "string";
|
|
214
214
|
readonly format: "date-time";
|
|
215
215
|
};
|
|
216
|
-
readonly
|
|
216
|
+
readonly name: {
|
|
217
217
|
readonly type: "string";
|
|
218
218
|
};
|
|
219
219
|
readonly absolute_path: {
|
|
@@ -250,9 +250,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
250
250
|
readonly $id: "file";
|
|
251
251
|
readonly owned: "always";
|
|
252
252
|
readonly presets: readonly ["owned"];
|
|
253
|
-
readonly indexes: readonly ["
|
|
253
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
254
254
|
readonly properties: {
|
|
255
|
-
readonly
|
|
255
|
+
readonly type: {
|
|
256
256
|
readonly type: "string";
|
|
257
257
|
};
|
|
258
258
|
readonly size: {
|
|
@@ -262,7 +262,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
262
262
|
readonly type: "string";
|
|
263
263
|
readonly format: "date-time";
|
|
264
264
|
};
|
|
265
|
-
readonly
|
|
265
|
+
readonly name: {
|
|
266
266
|
readonly type: "string";
|
|
267
267
|
};
|
|
268
268
|
readonly absolute_path: {
|
|
@@ -304,9 +304,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
304
304
|
readonly $id: "file";
|
|
305
305
|
readonly owned: "always";
|
|
306
306
|
readonly presets: readonly ["owned"];
|
|
307
|
-
readonly indexes: readonly ["
|
|
307
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
308
308
|
readonly properties: {
|
|
309
|
-
readonly
|
|
309
|
+
readonly type: {
|
|
310
310
|
readonly type: "string";
|
|
311
311
|
};
|
|
312
312
|
readonly size: {
|
|
@@ -316,7 +316,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
316
316
|
readonly type: "string";
|
|
317
317
|
readonly format: "date-time";
|
|
318
318
|
};
|
|
319
|
-
readonly
|
|
319
|
+
readonly name: {
|
|
320
320
|
readonly type: "string";
|
|
321
321
|
};
|
|
322
322
|
readonly absolute_path: {
|
|
@@ -354,9 +354,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
354
354
|
readonly $id: "file";
|
|
355
355
|
readonly owned: "always";
|
|
356
356
|
readonly presets: readonly ["owned"];
|
|
357
|
-
readonly indexes: readonly ["
|
|
357
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
358
358
|
readonly properties: {
|
|
359
|
-
readonly
|
|
359
|
+
readonly type: {
|
|
360
360
|
readonly type: "string";
|
|
361
361
|
};
|
|
362
362
|
readonly size: {
|
|
@@ -366,7 +366,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
366
366
|
readonly type: "string";
|
|
367
367
|
readonly format: "date-time";
|
|
368
368
|
};
|
|
369
|
-
readonly
|
|
369
|
+
readonly name: {
|
|
370
370
|
readonly type: "string";
|
|
371
371
|
};
|
|
372
372
|
readonly absolute_path: {
|
|
@@ -403,9 +403,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
403
403
|
readonly $id: "file";
|
|
404
404
|
readonly owned: "always";
|
|
405
405
|
readonly presets: readonly ["owned"];
|
|
406
|
-
readonly indexes: readonly ["
|
|
406
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
407
407
|
readonly properties: {
|
|
408
|
-
readonly
|
|
408
|
+
readonly type: {
|
|
409
409
|
readonly type: "string";
|
|
410
410
|
};
|
|
411
411
|
readonly size: {
|
|
@@ -415,7 +415,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
415
415
|
readonly type: "string";
|
|
416
416
|
readonly format: "date-time";
|
|
417
417
|
};
|
|
418
|
-
readonly
|
|
418
|
+
readonly name: {
|
|
419
419
|
readonly type: "string";
|
|
420
420
|
};
|
|
421
421
|
readonly absolute_path: {
|
|
@@ -453,9 +453,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
453
453
|
readonly $id: "file";
|
|
454
454
|
readonly owned: "always";
|
|
455
455
|
readonly presets: readonly ["owned"];
|
|
456
|
-
readonly indexes: readonly ["
|
|
456
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
457
457
|
readonly properties: {
|
|
458
|
-
readonly
|
|
458
|
+
readonly type: {
|
|
459
459
|
readonly type: "string";
|
|
460
460
|
};
|
|
461
461
|
readonly size: {
|
|
@@ -465,7 +465,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
465
465
|
readonly type: "string";
|
|
466
466
|
readonly format: "date-time";
|
|
467
467
|
};
|
|
468
|
-
readonly
|
|
468
|
+
readonly name: {
|
|
469
469
|
readonly type: "string";
|
|
470
470
|
};
|
|
471
471
|
readonly absolute_path: {
|
|
@@ -505,9 +505,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
505
505
|
readonly $id: "file";
|
|
506
506
|
readonly owned: "always";
|
|
507
507
|
readonly presets: readonly ["owned"];
|
|
508
|
-
readonly indexes: readonly ["
|
|
508
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
509
509
|
readonly properties: {
|
|
510
|
-
readonly
|
|
510
|
+
readonly type: {
|
|
511
511
|
readonly type: "string";
|
|
512
512
|
};
|
|
513
513
|
readonly size: {
|
|
@@ -517,7 +517,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
517
517
|
readonly type: "string";
|
|
518
518
|
readonly format: "date-time";
|
|
519
519
|
};
|
|
520
|
-
readonly
|
|
520
|
+
readonly name: {
|
|
521
521
|
readonly type: "string";
|
|
522
522
|
};
|
|
523
523
|
readonly absolute_path: {
|
|
@@ -555,9 +555,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
555
555
|
readonly $id: "file";
|
|
556
556
|
readonly owned: "always";
|
|
557
557
|
readonly presets: readonly ["owned"];
|
|
558
|
-
readonly indexes: readonly ["
|
|
558
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
559
559
|
readonly properties: {
|
|
560
|
-
readonly
|
|
560
|
+
readonly type: {
|
|
561
561
|
readonly type: "string";
|
|
562
562
|
};
|
|
563
563
|
readonly size: {
|
|
@@ -567,7 +567,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
567
567
|
readonly type: "string";
|
|
568
568
|
readonly format: "date-time";
|
|
569
569
|
};
|
|
570
|
-
readonly
|
|
570
|
+
readonly name: {
|
|
571
571
|
readonly type: "string";
|
|
572
572
|
};
|
|
573
573
|
readonly absolute_path: {
|
|
@@ -610,9 +610,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
610
610
|
readonly $id: "file";
|
|
611
611
|
readonly owned: "always";
|
|
612
612
|
readonly presets: readonly ["owned"];
|
|
613
|
-
readonly indexes: readonly ["
|
|
613
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
614
614
|
readonly properties: {
|
|
615
|
-
readonly
|
|
615
|
+
readonly type: {
|
|
616
616
|
readonly type: "string";
|
|
617
617
|
};
|
|
618
618
|
readonly size: {
|
|
@@ -622,7 +622,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
622
622
|
readonly type: "string";
|
|
623
623
|
readonly format: "date-time";
|
|
624
624
|
};
|
|
625
|
-
readonly
|
|
625
|
+
readonly name: {
|
|
626
626
|
readonly type: "string";
|
|
627
627
|
};
|
|
628
628
|
readonly absolute_path: {
|
|
@@ -655,14 +655,14 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
655
655
|
readonly ask: true;
|
|
656
656
|
};
|
|
657
657
|
};
|
|
658
|
-
}>>, "
|
|
658
|
+
}>>, "name" | "absolute_path" | "_id" | "owner">;
|
|
659
659
|
}, context: import("@aeriajs/types").Context<{
|
|
660
660
|
readonly $id: "file";
|
|
661
661
|
readonly owned: "always";
|
|
662
662
|
readonly presets: readonly ["owned"];
|
|
663
|
-
readonly indexes: readonly ["
|
|
663
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
664
664
|
readonly properties: {
|
|
665
|
-
readonly
|
|
665
|
+
readonly type: {
|
|
666
666
|
readonly type: "string";
|
|
667
667
|
};
|
|
668
668
|
readonly size: {
|
|
@@ -672,7 +672,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
672
672
|
readonly type: "string";
|
|
673
673
|
readonly format: "date-time";
|
|
674
674
|
};
|
|
675
|
-
readonly
|
|
675
|
+
readonly name: {
|
|
676
676
|
readonly type: "string";
|
|
677
677
|
};
|
|
678
678
|
readonly absolute_path: {
|
|
@@ -709,9 +709,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
709
709
|
readonly $id: "file";
|
|
710
710
|
readonly owned: "always";
|
|
711
711
|
readonly presets: readonly ["owned"];
|
|
712
|
-
readonly indexes: readonly ["
|
|
712
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
713
713
|
readonly properties: {
|
|
714
|
-
readonly
|
|
714
|
+
readonly type: {
|
|
715
715
|
readonly type: "string";
|
|
716
716
|
};
|
|
717
717
|
readonly size: {
|
|
@@ -721,7 +721,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
721
721
|
readonly type: "string";
|
|
722
722
|
readonly format: "date-time";
|
|
723
723
|
};
|
|
724
|
-
readonly
|
|
724
|
+
readonly name: {
|
|
725
725
|
readonly type: "string";
|
|
726
726
|
};
|
|
727
727
|
readonly absolute_path: {
|
|
@@ -763,9 +763,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
763
763
|
readonly $id: "file";
|
|
764
764
|
readonly owned: "always";
|
|
765
765
|
readonly presets: readonly ["owned"];
|
|
766
|
-
readonly indexes: readonly ["
|
|
766
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
767
767
|
readonly properties: {
|
|
768
|
-
readonly
|
|
768
|
+
readonly type: {
|
|
769
769
|
readonly type: "string";
|
|
770
770
|
};
|
|
771
771
|
readonly size: {
|
|
@@ -775,7 +775,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
775
775
|
readonly type: "string";
|
|
776
776
|
readonly format: "date-time";
|
|
777
777
|
};
|
|
778
|
-
readonly
|
|
778
|
+
readonly name: {
|
|
779
779
|
readonly type: "string";
|
|
780
780
|
};
|
|
781
781
|
readonly absolute_path: {
|
|
@@ -813,9 +813,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
813
813
|
readonly $id: "file";
|
|
814
814
|
readonly owned: "always";
|
|
815
815
|
readonly presets: readonly ["owned"];
|
|
816
|
-
readonly indexes: readonly ["
|
|
816
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
817
817
|
readonly properties: {
|
|
818
|
-
readonly
|
|
818
|
+
readonly type: {
|
|
819
819
|
readonly type: "string";
|
|
820
820
|
};
|
|
821
821
|
readonly size: {
|
|
@@ -825,7 +825,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
825
825
|
readonly type: "string";
|
|
826
826
|
readonly format: "date-time";
|
|
827
827
|
};
|
|
828
|
-
readonly
|
|
828
|
+
readonly name: {
|
|
829
829
|
readonly type: "string";
|
|
830
830
|
};
|
|
831
831
|
readonly absolute_path: {
|
|
@@ -862,9 +862,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
862
862
|
readonly $id: "file";
|
|
863
863
|
readonly owned: "always";
|
|
864
864
|
readonly presets: readonly ["owned"];
|
|
865
|
-
readonly indexes: readonly ["
|
|
865
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
866
866
|
readonly properties: {
|
|
867
|
-
readonly
|
|
867
|
+
readonly type: {
|
|
868
868
|
readonly type: "string";
|
|
869
869
|
};
|
|
870
870
|
readonly size: {
|
|
@@ -874,7 +874,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
874
874
|
readonly type: "string";
|
|
875
875
|
readonly format: "date-time";
|
|
876
876
|
};
|
|
877
|
-
readonly
|
|
877
|
+
readonly name: {
|
|
878
878
|
readonly type: "string";
|
|
879
879
|
};
|
|
880
880
|
readonly absolute_path: {
|
|
@@ -912,9 +912,9 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
912
912
|
readonly $id: "file";
|
|
913
913
|
readonly owned: "always";
|
|
914
914
|
readonly presets: readonly ["owned"];
|
|
915
|
-
readonly indexes: readonly ["
|
|
915
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
916
916
|
readonly properties: {
|
|
917
|
-
readonly
|
|
917
|
+
readonly type: {
|
|
918
918
|
readonly type: "string";
|
|
919
919
|
};
|
|
920
920
|
readonly size: {
|
|
@@ -924,7 +924,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
924
924
|
readonly type: "string";
|
|
925
925
|
readonly format: "date-time";
|
|
926
926
|
};
|
|
927
|
-
readonly
|
|
927
|
+
readonly name: {
|
|
928
928
|
readonly type: "string";
|
|
929
929
|
};
|
|
930
930
|
readonly absolute_path: {
|
|
@@ -3,14 +3,14 @@ import type { description } from './description.js';
|
|
|
3
3
|
export declare const insert: (payload: {
|
|
4
4
|
what: {
|
|
5
5
|
content: string;
|
|
6
|
-
} & Pick<PackReferences<SchemaWithId<typeof description>>, '_id' | '
|
|
6
|
+
} & Pick<PackReferences<SchemaWithId<typeof description>>, '_id' | 'name' | 'owner' | 'absolute_path'>;
|
|
7
7
|
}, context: Context<typeof description>) => Promise<import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError> | import("@aeriajs/types").Right<SchemaWithId<{
|
|
8
8
|
readonly $id: "file";
|
|
9
9
|
readonly owned: "always";
|
|
10
10
|
readonly presets: readonly ["owned"];
|
|
11
|
-
readonly indexes: readonly ["
|
|
11
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
12
12
|
readonly properties: {
|
|
13
|
-
readonly
|
|
13
|
+
readonly type: {
|
|
14
14
|
readonly type: "string";
|
|
15
15
|
};
|
|
16
16
|
readonly size: {
|
|
@@ -20,7 +20,7 @@ export declare const insert: (payload: {
|
|
|
20
20
|
readonly type: "string";
|
|
21
21
|
readonly format: "date-time";
|
|
22
22
|
};
|
|
23
|
-
readonly
|
|
23
|
+
readonly name: {
|
|
24
24
|
readonly type: "string";
|
|
25
25
|
};
|
|
26
26
|
readonly absolute_path: {
|
|
@@ -10,7 +10,7 @@ const insert = async (payload, context) => {
|
|
|
10
10
|
}
|
|
11
11
|
const what = Object.assign({}, payload.what);
|
|
12
12
|
what.owner = context.token.sub;
|
|
13
|
-
const extension = what.
|
|
13
|
+
const extension = what.name.split('.').pop();
|
|
14
14
|
if (!context.config.storage) {
|
|
15
15
|
throw new Error('config.storage is not set');
|
|
16
16
|
}
|
|
@@ -32,7 +32,7 @@ const insert = async (payload, context) => {
|
|
|
32
32
|
await (0, promises_1.unlink)(oldFile.absolute_path).catch(console.trace);
|
|
33
33
|
}
|
|
34
34
|
const filenameHash = (0, crypto_1.createHash)('sha1')
|
|
35
|
-
.update(what.
|
|
35
|
+
.update(what.name + Date.now())
|
|
36
36
|
.digest('hex');
|
|
37
37
|
what.absolute_path = `${tempPath}/${filenameHash}.${extension}`;
|
|
38
38
|
await (0, promises_1.writeFile)(what.absolute_path, Buffer.from(what.content.split(',').pop(), 'base64'));
|
|
@@ -8,7 +8,7 @@ export const insert = async (payload, context) => {
|
|
|
8
8
|
}
|
|
9
9
|
const what = Object.assign({}, payload.what);
|
|
10
10
|
what.owner = context.token.sub;
|
|
11
|
-
const extension = what.
|
|
11
|
+
const extension = what.name.split(".").pop();
|
|
12
12
|
if (!context.config.storage) {
|
|
13
13
|
throw new Error("config.storage is not set");
|
|
14
14
|
}
|
|
@@ -32,7 +32,7 @@ export const insert = async (payload, context) => {
|
|
|
32
32
|
if (oldFile && oldFile.absolute_path) {
|
|
33
33
|
await unlink(oldFile.absolute_path).catch(console.trace);
|
|
34
34
|
}
|
|
35
|
-
const filenameHash = createHash("sha1").update(what.
|
|
35
|
+
const filenameHash = createHash("sha1").update(what.name + Date.now()).digest("hex");
|
|
36
36
|
what.absolute_path = `${tempPath}/${filenameHash}.${extension}`;
|
|
37
37
|
await writeFile(what.absolute_path, Buffer.from(what.content.split(",").pop(), "base64"));
|
|
38
38
|
return originalInsert({
|
|
@@ -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
|
};
|
|
@@ -745,9 +745,9 @@ export declare const user: {
|
|
|
745
745
|
readonly $id: "file";
|
|
746
746
|
readonly owned: "always";
|
|
747
747
|
readonly presets: readonly ["owned"];
|
|
748
|
-
readonly indexes: readonly ["
|
|
748
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
749
749
|
readonly properties: {
|
|
750
|
-
readonly
|
|
750
|
+
readonly type: {
|
|
751
751
|
readonly type: "string";
|
|
752
752
|
};
|
|
753
753
|
readonly size: {
|
|
@@ -757,7 +757,7 @@ export declare const user: {
|
|
|
757
757
|
readonly type: "string";
|
|
758
758
|
readonly format: "date-time";
|
|
759
759
|
};
|
|
760
|
-
readonly
|
|
760
|
+
readonly name: {
|
|
761
761
|
readonly type: "string";
|
|
762
762
|
};
|
|
763
763
|
readonly absolute_path: {
|
|
@@ -861,9 +861,9 @@ export declare const user: {
|
|
|
861
861
|
readonly $id: "file";
|
|
862
862
|
readonly owned: "always";
|
|
863
863
|
readonly presets: readonly ["owned"];
|
|
864
|
-
readonly indexes: readonly ["
|
|
864
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
865
865
|
readonly properties: {
|
|
866
|
-
readonly
|
|
866
|
+
readonly type: {
|
|
867
867
|
readonly type: "string";
|
|
868
868
|
};
|
|
869
869
|
readonly size: {
|
|
@@ -873,7 +873,7 @@ export declare const user: {
|
|
|
873
873
|
readonly type: "string";
|
|
874
874
|
readonly format: "date-time";
|
|
875
875
|
};
|
|
876
|
-
readonly
|
|
876
|
+
readonly name: {
|
|
877
877
|
readonly type: "string";
|
|
878
878
|
};
|
|
879
879
|
readonly absolute_path: {
|
|
@@ -2043,9 +2043,9 @@ export declare const user: {
|
|
|
2043
2043
|
readonly $id: "file";
|
|
2044
2044
|
readonly owned: "always";
|
|
2045
2045
|
readonly presets: readonly ["owned"];
|
|
2046
|
-
readonly indexes: readonly ["
|
|
2046
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
2047
2047
|
readonly properties: {
|
|
2048
|
-
readonly
|
|
2048
|
+
readonly type: {
|
|
2049
2049
|
readonly type: "string";
|
|
2050
2050
|
};
|
|
2051
2051
|
readonly size: {
|
|
@@ -2055,7 +2055,7 @@ export declare const user: {
|
|
|
2055
2055
|
readonly type: "string";
|
|
2056
2056
|
readonly format: "date-time";
|
|
2057
2057
|
};
|
|
2058
|
-
readonly
|
|
2058
|
+
readonly name: {
|
|
2059
2059
|
readonly type: "string";
|
|
2060
2060
|
};
|
|
2061
2061
|
readonly absolute_path: {
|
|
@@ -2159,9 +2159,9 @@ export declare const user: {
|
|
|
2159
2159
|
readonly $id: "file";
|
|
2160
2160
|
readonly owned: "always";
|
|
2161
2161
|
readonly presets: readonly ["owned"];
|
|
2162
|
-
readonly indexes: readonly ["
|
|
2162
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
2163
2163
|
readonly properties: {
|
|
2164
|
-
readonly
|
|
2164
|
+
readonly type: {
|
|
2165
2165
|
readonly type: "string";
|
|
2166
2166
|
};
|
|
2167
2167
|
readonly size: {
|
|
@@ -2171,7 +2171,7 @@ export declare const user: {
|
|
|
2171
2171
|
readonly type: "string";
|
|
2172
2172
|
readonly format: "date-time";
|
|
2173
2173
|
};
|
|
2174
|
-
readonly
|
|
2174
|
+
readonly name: {
|
|
2175
2175
|
readonly type: "string";
|
|
2176
2176
|
};
|
|
2177
2177
|
readonly absolute_path: {
|
package/dist/index.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export declare const collections: {
|
|
|
13
13
|
readonly $id: "file";
|
|
14
14
|
readonly owned: "always";
|
|
15
15
|
readonly presets: readonly ["owned"];
|
|
16
|
-
readonly indexes: readonly ["
|
|
16
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
17
17
|
readonly properties: {
|
|
18
|
-
readonly
|
|
18
|
+
readonly type: {
|
|
19
19
|
readonly type: "string";
|
|
20
20
|
};
|
|
21
21
|
readonly size: {
|
|
@@ -25,7 +25,7 @@ export declare const collections: {
|
|
|
25
25
|
readonly type: "string";
|
|
26
26
|
readonly format: "date-time";
|
|
27
27
|
};
|
|
28
|
-
readonly
|
|
28
|
+
readonly name: {
|
|
29
29
|
readonly type: "string";
|
|
30
30
|
};
|
|
31
31
|
readonly absolute_path: {
|
|
@@ -68,9 +68,9 @@ export declare const collections: {
|
|
|
68
68
|
readonly $id: "file";
|
|
69
69
|
readonly owned: "always";
|
|
70
70
|
readonly presets: readonly ["owned"];
|
|
71
|
-
readonly indexes: readonly ["
|
|
71
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
72
72
|
readonly properties: {
|
|
73
|
-
readonly
|
|
73
|
+
readonly type: {
|
|
74
74
|
readonly type: "string";
|
|
75
75
|
};
|
|
76
76
|
readonly size: {
|
|
@@ -80,7 +80,7 @@ export declare const collections: {
|
|
|
80
80
|
readonly type: "string";
|
|
81
81
|
readonly format: "date-time";
|
|
82
82
|
};
|
|
83
|
-
readonly
|
|
83
|
+
readonly name: {
|
|
84
84
|
readonly type: "string";
|
|
85
85
|
};
|
|
86
86
|
readonly absolute_path: {
|
|
@@ -113,14 +113,14 @@ export declare const collections: {
|
|
|
113
113
|
readonly ask: true;
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
-
}>>, "
|
|
116
|
+
}>>, "name" | "absolute_path" | "_id" | "owner">;
|
|
117
117
|
}, context: import("@aeriajs/types").Context<{
|
|
118
118
|
readonly $id: "file";
|
|
119
119
|
readonly owned: "always";
|
|
120
120
|
readonly presets: readonly ["owned"];
|
|
121
|
-
readonly indexes: readonly ["
|
|
121
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
122
122
|
readonly properties: {
|
|
123
|
-
readonly
|
|
123
|
+
readonly type: {
|
|
124
124
|
readonly type: "string";
|
|
125
125
|
};
|
|
126
126
|
readonly size: {
|
|
@@ -130,7 +130,7 @@ export declare const collections: {
|
|
|
130
130
|
readonly type: "string";
|
|
131
131
|
readonly format: "date-time";
|
|
132
132
|
};
|
|
133
|
-
readonly
|
|
133
|
+
readonly name: {
|
|
134
134
|
readonly type: "string";
|
|
135
135
|
};
|
|
136
136
|
readonly absolute_path: {
|
|
@@ -167,9 +167,9 @@ export declare const collections: {
|
|
|
167
167
|
readonly $id: "file";
|
|
168
168
|
readonly owned: "always";
|
|
169
169
|
readonly presets: readonly ["owned"];
|
|
170
|
-
readonly indexes: readonly ["
|
|
170
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
171
171
|
readonly properties: {
|
|
172
|
-
readonly
|
|
172
|
+
readonly type: {
|
|
173
173
|
readonly type: "string";
|
|
174
174
|
};
|
|
175
175
|
readonly size: {
|
|
@@ -179,7 +179,7 @@ export declare const collections: {
|
|
|
179
179
|
readonly type: "string";
|
|
180
180
|
readonly format: "date-time";
|
|
181
181
|
};
|
|
182
|
-
readonly
|
|
182
|
+
readonly name: {
|
|
183
183
|
readonly type: "string";
|
|
184
184
|
};
|
|
185
185
|
readonly absolute_path: {
|
|
@@ -221,9 +221,9 @@ export declare const collections: {
|
|
|
221
221
|
readonly $id: "file";
|
|
222
222
|
readonly owned: "always";
|
|
223
223
|
readonly presets: readonly ["owned"];
|
|
224
|
-
readonly indexes: readonly ["
|
|
224
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
225
225
|
readonly properties: {
|
|
226
|
-
readonly
|
|
226
|
+
readonly type: {
|
|
227
227
|
readonly type: "string";
|
|
228
228
|
};
|
|
229
229
|
readonly size: {
|
|
@@ -233,7 +233,7 @@ export declare const collections: {
|
|
|
233
233
|
readonly type: "string";
|
|
234
234
|
readonly format: "date-time";
|
|
235
235
|
};
|
|
236
|
-
readonly
|
|
236
|
+
readonly name: {
|
|
237
237
|
readonly type: "string";
|
|
238
238
|
};
|
|
239
239
|
readonly absolute_path: {
|
|
@@ -271,9 +271,9 @@ export declare const collections: {
|
|
|
271
271
|
readonly $id: "file";
|
|
272
272
|
readonly owned: "always";
|
|
273
273
|
readonly presets: readonly ["owned"];
|
|
274
|
-
readonly indexes: readonly ["
|
|
274
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
275
275
|
readonly properties: {
|
|
276
|
-
readonly
|
|
276
|
+
readonly type: {
|
|
277
277
|
readonly type: "string";
|
|
278
278
|
};
|
|
279
279
|
readonly size: {
|
|
@@ -283,7 +283,7 @@ export declare const collections: {
|
|
|
283
283
|
readonly type: "string";
|
|
284
284
|
readonly format: "date-time";
|
|
285
285
|
};
|
|
286
|
-
readonly
|
|
286
|
+
readonly name: {
|
|
287
287
|
readonly type: "string";
|
|
288
288
|
};
|
|
289
289
|
readonly absolute_path: {
|
|
@@ -320,9 +320,9 @@ export declare const collections: {
|
|
|
320
320
|
readonly $id: "file";
|
|
321
321
|
readonly owned: "always";
|
|
322
322
|
readonly presets: readonly ["owned"];
|
|
323
|
-
readonly indexes: readonly ["
|
|
323
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
324
324
|
readonly properties: {
|
|
325
|
-
readonly
|
|
325
|
+
readonly type: {
|
|
326
326
|
readonly type: "string";
|
|
327
327
|
};
|
|
328
328
|
readonly size: {
|
|
@@ -332,7 +332,7 @@ export declare const collections: {
|
|
|
332
332
|
readonly type: "string";
|
|
333
333
|
readonly format: "date-time";
|
|
334
334
|
};
|
|
335
|
-
readonly
|
|
335
|
+
readonly name: {
|
|
336
336
|
readonly type: "string";
|
|
337
337
|
};
|
|
338
338
|
readonly absolute_path: {
|
|
@@ -370,9 +370,9 @@ export declare const collections: {
|
|
|
370
370
|
readonly $id: "file";
|
|
371
371
|
readonly owned: "always";
|
|
372
372
|
readonly presets: readonly ["owned"];
|
|
373
|
-
readonly indexes: readonly ["
|
|
373
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
374
374
|
readonly properties: {
|
|
375
|
-
readonly
|
|
375
|
+
readonly type: {
|
|
376
376
|
readonly type: "string";
|
|
377
377
|
};
|
|
378
378
|
readonly size: {
|
|
@@ -382,7 +382,7 @@ export declare const collections: {
|
|
|
382
382
|
readonly type: "string";
|
|
383
383
|
readonly format: "date-time";
|
|
384
384
|
};
|
|
385
|
-
readonly
|
|
385
|
+
readonly name: {
|
|
386
386
|
readonly type: "string";
|
|
387
387
|
};
|
|
388
388
|
readonly absolute_path: {
|
|
@@ -422,9 +422,9 @@ export declare const collections: {
|
|
|
422
422
|
readonly $id: "file";
|
|
423
423
|
readonly owned: "always";
|
|
424
424
|
readonly presets: readonly ["owned"];
|
|
425
|
-
readonly indexes: readonly ["
|
|
425
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
426
426
|
readonly properties: {
|
|
427
|
-
readonly
|
|
427
|
+
readonly type: {
|
|
428
428
|
readonly type: "string";
|
|
429
429
|
};
|
|
430
430
|
readonly size: {
|
|
@@ -434,7 +434,7 @@ export declare const collections: {
|
|
|
434
434
|
readonly type: "string";
|
|
435
435
|
readonly format: "date-time";
|
|
436
436
|
};
|
|
437
|
-
readonly
|
|
437
|
+
readonly name: {
|
|
438
438
|
readonly type: "string";
|
|
439
439
|
};
|
|
440
440
|
readonly absolute_path: {
|
|
@@ -472,9 +472,9 @@ export declare const collections: {
|
|
|
472
472
|
readonly $id: "file";
|
|
473
473
|
readonly owned: "always";
|
|
474
474
|
readonly presets: readonly ["owned"];
|
|
475
|
-
readonly indexes: readonly ["
|
|
475
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
476
476
|
readonly properties: {
|
|
477
|
-
readonly
|
|
477
|
+
readonly type: {
|
|
478
478
|
readonly type: "string";
|
|
479
479
|
};
|
|
480
480
|
readonly size: {
|
|
@@ -484,7 +484,7 @@ export declare const collections: {
|
|
|
484
484
|
readonly type: "string";
|
|
485
485
|
readonly format: "date-time";
|
|
486
486
|
};
|
|
487
|
-
readonly
|
|
487
|
+
readonly name: {
|
|
488
488
|
readonly type: "string";
|
|
489
489
|
};
|
|
490
490
|
readonly absolute_path: {
|
|
@@ -527,9 +527,9 @@ export declare const collections: {
|
|
|
527
527
|
readonly $id: "file";
|
|
528
528
|
readonly owned: "always";
|
|
529
529
|
readonly presets: readonly ["owned"];
|
|
530
|
-
readonly indexes: readonly ["
|
|
530
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
531
531
|
readonly properties: {
|
|
532
|
-
readonly
|
|
532
|
+
readonly type: {
|
|
533
533
|
readonly type: "string";
|
|
534
534
|
};
|
|
535
535
|
readonly size: {
|
|
@@ -539,7 +539,7 @@ export declare const collections: {
|
|
|
539
539
|
readonly type: "string";
|
|
540
540
|
readonly format: "date-time";
|
|
541
541
|
};
|
|
542
|
-
readonly
|
|
542
|
+
readonly name: {
|
|
543
543
|
readonly type: "string";
|
|
544
544
|
};
|
|
545
545
|
readonly absolute_path: {
|
|
@@ -572,14 +572,14 @@ export declare const collections: {
|
|
|
572
572
|
readonly ask: true;
|
|
573
573
|
};
|
|
574
574
|
};
|
|
575
|
-
}>>, "
|
|
575
|
+
}>>, "name" | "absolute_path" | "_id" | "owner">;
|
|
576
576
|
}, context: import("@aeriajs/types").Context<{
|
|
577
577
|
readonly $id: "file";
|
|
578
578
|
readonly owned: "always";
|
|
579
579
|
readonly presets: readonly ["owned"];
|
|
580
|
-
readonly indexes: readonly ["
|
|
580
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
581
581
|
readonly properties: {
|
|
582
|
-
readonly
|
|
582
|
+
readonly type: {
|
|
583
583
|
readonly type: "string";
|
|
584
584
|
};
|
|
585
585
|
readonly size: {
|
|
@@ -589,7 +589,7 @@ export declare const collections: {
|
|
|
589
589
|
readonly type: "string";
|
|
590
590
|
readonly format: "date-time";
|
|
591
591
|
};
|
|
592
|
-
readonly
|
|
592
|
+
readonly name: {
|
|
593
593
|
readonly type: "string";
|
|
594
594
|
};
|
|
595
595
|
readonly absolute_path: {
|
|
@@ -626,9 +626,9 @@ export declare const collections: {
|
|
|
626
626
|
readonly $id: "file";
|
|
627
627
|
readonly owned: "always";
|
|
628
628
|
readonly presets: readonly ["owned"];
|
|
629
|
-
readonly indexes: readonly ["
|
|
629
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
630
630
|
readonly properties: {
|
|
631
|
-
readonly
|
|
631
|
+
readonly type: {
|
|
632
632
|
readonly type: "string";
|
|
633
633
|
};
|
|
634
634
|
readonly size: {
|
|
@@ -638,7 +638,7 @@ export declare const collections: {
|
|
|
638
638
|
readonly type: "string";
|
|
639
639
|
readonly format: "date-time";
|
|
640
640
|
};
|
|
641
|
-
readonly
|
|
641
|
+
readonly name: {
|
|
642
642
|
readonly type: "string";
|
|
643
643
|
};
|
|
644
644
|
readonly absolute_path: {
|
|
@@ -680,9 +680,9 @@ export declare const collections: {
|
|
|
680
680
|
readonly $id: "file";
|
|
681
681
|
readonly owned: "always";
|
|
682
682
|
readonly presets: readonly ["owned"];
|
|
683
|
-
readonly indexes: readonly ["
|
|
683
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
684
684
|
readonly properties: {
|
|
685
|
-
readonly
|
|
685
|
+
readonly type: {
|
|
686
686
|
readonly type: "string";
|
|
687
687
|
};
|
|
688
688
|
readonly size: {
|
|
@@ -692,7 +692,7 @@ export declare const collections: {
|
|
|
692
692
|
readonly type: "string";
|
|
693
693
|
readonly format: "date-time";
|
|
694
694
|
};
|
|
695
|
-
readonly
|
|
695
|
+
readonly name: {
|
|
696
696
|
readonly type: "string";
|
|
697
697
|
};
|
|
698
698
|
readonly absolute_path: {
|
|
@@ -730,9 +730,9 @@ export declare const collections: {
|
|
|
730
730
|
readonly $id: "file";
|
|
731
731
|
readonly owned: "always";
|
|
732
732
|
readonly presets: readonly ["owned"];
|
|
733
|
-
readonly indexes: readonly ["
|
|
733
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
734
734
|
readonly properties: {
|
|
735
|
-
readonly
|
|
735
|
+
readonly type: {
|
|
736
736
|
readonly type: "string";
|
|
737
737
|
};
|
|
738
738
|
readonly size: {
|
|
@@ -742,7 +742,7 @@ export declare const collections: {
|
|
|
742
742
|
readonly type: "string";
|
|
743
743
|
readonly format: "date-time";
|
|
744
744
|
};
|
|
745
|
-
readonly
|
|
745
|
+
readonly name: {
|
|
746
746
|
readonly type: "string";
|
|
747
747
|
};
|
|
748
748
|
readonly absolute_path: {
|
|
@@ -779,9 +779,9 @@ export declare const collections: {
|
|
|
779
779
|
readonly $id: "file";
|
|
780
780
|
readonly owned: "always";
|
|
781
781
|
readonly presets: readonly ["owned"];
|
|
782
|
-
readonly indexes: readonly ["
|
|
782
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
783
783
|
readonly properties: {
|
|
784
|
-
readonly
|
|
784
|
+
readonly type: {
|
|
785
785
|
readonly type: "string";
|
|
786
786
|
};
|
|
787
787
|
readonly size: {
|
|
@@ -791,7 +791,7 @@ export declare const collections: {
|
|
|
791
791
|
readonly type: "string";
|
|
792
792
|
readonly format: "date-time";
|
|
793
793
|
};
|
|
794
|
-
readonly
|
|
794
|
+
readonly name: {
|
|
795
795
|
readonly type: "string";
|
|
796
796
|
};
|
|
797
797
|
readonly absolute_path: {
|
|
@@ -829,9 +829,9 @@ export declare const collections: {
|
|
|
829
829
|
readonly $id: "file";
|
|
830
830
|
readonly owned: "always";
|
|
831
831
|
readonly presets: readonly ["owned"];
|
|
832
|
-
readonly indexes: readonly ["
|
|
832
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
833
833
|
readonly properties: {
|
|
834
|
-
readonly
|
|
834
|
+
readonly type: {
|
|
835
835
|
readonly type: "string";
|
|
836
836
|
};
|
|
837
837
|
readonly size: {
|
|
@@ -841,7 +841,7 @@ export declare const collections: {
|
|
|
841
841
|
readonly type: "string";
|
|
842
842
|
readonly format: "date-time";
|
|
843
843
|
};
|
|
844
|
-
readonly
|
|
844
|
+
readonly name: {
|
|
845
845
|
readonly type: "string";
|
|
846
846
|
};
|
|
847
847
|
readonly absolute_path: {
|
|
@@ -1934,9 +1934,9 @@ export declare const collections: {
|
|
|
1934
1934
|
readonly $id: "file";
|
|
1935
1935
|
readonly owned: "always";
|
|
1936
1936
|
readonly presets: readonly ["owned"];
|
|
1937
|
-
readonly indexes: readonly ["
|
|
1937
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
1938
1938
|
readonly properties: {
|
|
1939
|
-
readonly
|
|
1939
|
+
readonly type: {
|
|
1940
1940
|
readonly type: "string";
|
|
1941
1941
|
};
|
|
1942
1942
|
readonly size: {
|
|
@@ -1946,7 +1946,7 @@ export declare const collections: {
|
|
|
1946
1946
|
readonly type: "string";
|
|
1947
1947
|
readonly format: "date-time";
|
|
1948
1948
|
};
|
|
1949
|
-
readonly
|
|
1949
|
+
readonly name: {
|
|
1950
1950
|
readonly type: "string";
|
|
1951
1951
|
};
|
|
1952
1952
|
readonly absolute_path: {
|
|
@@ -2050,9 +2050,9 @@ export declare const collections: {
|
|
|
2050
2050
|
readonly $id: "file";
|
|
2051
2051
|
readonly owned: "always";
|
|
2052
2052
|
readonly presets: readonly ["owned"];
|
|
2053
|
-
readonly indexes: readonly ["
|
|
2053
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
2054
2054
|
readonly properties: {
|
|
2055
|
-
readonly
|
|
2055
|
+
readonly type: {
|
|
2056
2056
|
readonly type: "string";
|
|
2057
2057
|
};
|
|
2058
2058
|
readonly size: {
|
|
@@ -2062,7 +2062,7 @@ export declare const collections: {
|
|
|
2062
2062
|
readonly type: "string";
|
|
2063
2063
|
readonly format: "date-time";
|
|
2064
2064
|
};
|
|
2065
|
-
readonly
|
|
2065
|
+
readonly name: {
|
|
2066
2066
|
readonly type: "string";
|
|
2067
2067
|
};
|
|
2068
2068
|
readonly absolute_path: {
|
|
@@ -3232,9 +3232,9 @@ export declare const collections: {
|
|
|
3232
3232
|
readonly $id: "file";
|
|
3233
3233
|
readonly owned: "always";
|
|
3234
3234
|
readonly presets: readonly ["owned"];
|
|
3235
|
-
readonly indexes: readonly ["
|
|
3235
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
3236
3236
|
readonly properties: {
|
|
3237
|
-
readonly
|
|
3237
|
+
readonly type: {
|
|
3238
3238
|
readonly type: "string";
|
|
3239
3239
|
};
|
|
3240
3240
|
readonly size: {
|
|
@@ -3244,7 +3244,7 @@ export declare const collections: {
|
|
|
3244
3244
|
readonly type: "string";
|
|
3245
3245
|
readonly format: "date-time";
|
|
3246
3246
|
};
|
|
3247
|
-
readonly
|
|
3247
|
+
readonly name: {
|
|
3248
3248
|
readonly type: "string";
|
|
3249
3249
|
};
|
|
3250
3250
|
readonly absolute_path: {
|
|
@@ -3348,9 +3348,9 @@ export declare const collections: {
|
|
|
3348
3348
|
readonly $id: "file";
|
|
3349
3349
|
readonly owned: "always";
|
|
3350
3350
|
readonly presets: readonly ["owned"];
|
|
3351
|
-
readonly indexes: readonly ["
|
|
3351
|
+
readonly indexes: readonly ["name", "link", "mime"];
|
|
3352
3352
|
readonly properties: {
|
|
3353
|
-
readonly
|
|
3353
|
+
readonly type: {
|
|
3354
3354
|
readonly type: "string";
|
|
3355
3355
|
};
|
|
3356
3356
|
readonly size: {
|
|
@@ -3360,7 +3360,7 @@ export declare const collections: {
|
|
|
3360
3360
|
readonly type: "string";
|
|
3361
3361
|
readonly format: "date-time";
|
|
3362
3362
|
};
|
|
3363
|
-
readonly
|
|
3363
|
+
readonly name: {
|
|
3364
3364
|
readonly type: "string";
|
|
3365
3365
|
};
|
|
3366
3366
|
readonly absolute_path: {
|
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",
|