picker-db 5.0.8 → 5.0.9-dp-13924-2
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/.semgrepignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Tests — not production code
|
|
2
|
+
test/
|
|
3
|
+
|
|
4
|
+
# Build artifacts
|
|
5
|
+
dist/
|
|
6
|
+
|
|
7
|
+
# Dependencies
|
|
8
|
+
node_modules/
|
|
9
|
+
|
|
10
|
+
# Docker & deployment configs
|
|
11
|
+
Dockerfile
|
|
12
|
+
Dockerfile.prod
|
|
13
|
+
docker-compose.yml
|
|
14
|
+
docker-compose.prod.yml
|
|
15
|
+
|
|
16
|
+
# Lock files
|
|
17
|
+
package-lock.json
|
|
18
|
+
|
|
19
|
+
# Tooling configs
|
|
20
|
+
tsconfig.json
|
|
21
|
+
.eslintrc*
|
|
22
|
+
.prettierrc*
|
|
23
|
+
.editorconfig
|
package/bitbucket-pipelines.yml
CHANGED
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
image: node:16.13.1
|
|
7
7
|
|
|
8
|
+
definitions:
|
|
9
|
+
steps:
|
|
10
|
+
- step: &semgrep-scan
|
|
11
|
+
name: Semgrep SAST
|
|
12
|
+
image: semgrep/semgrep
|
|
13
|
+
script:
|
|
14
|
+
- semgrep scan --config p/typescript --config p/nodejs --config p/secrets --sarif --output semgrep-results.sarif . || true
|
|
15
|
+
- semgrep scan --config p/typescript --config p/nodejs --config p/secrets --text . || true
|
|
16
|
+
artifacts:
|
|
17
|
+
- semgrep-results.sarif
|
|
18
|
+
|
|
8
19
|
pipelines:
|
|
9
20
|
pull-requests:
|
|
10
21
|
'**':
|
|
@@ -14,6 +25,7 @@ pipelines:
|
|
|
14
25
|
- node
|
|
15
26
|
script:
|
|
16
27
|
- npm install
|
|
28
|
+
- step: *semgrep-scan
|
|
17
29
|
tags:
|
|
18
30
|
'v*':
|
|
19
31
|
- step:
|
|
@@ -22,6 +34,9 @@ pipelines:
|
|
|
22
34
|
- pipe: atlassian/npm-publish:0.3.3
|
|
23
35
|
variables:
|
|
24
36
|
NPM_TOKEN: $NPM_TOKEN
|
|
37
|
+
branches:
|
|
38
|
+
master:
|
|
39
|
+
- step: *semgrep-scan
|
|
25
40
|
custom:
|
|
26
41
|
weekly-security-audit:
|
|
27
42
|
- step:
|
package/constants.js
CHANGED
|
@@ -235,6 +235,10 @@ module.exports = {
|
|
|
235
235
|
INDEX: 34,
|
|
236
236
|
TEXT: "RETURNED_TO_PICKUP",
|
|
237
237
|
},
|
|
238
|
+
IN_TRANSIT: {
|
|
239
|
+
INDEX: 35,
|
|
240
|
+
TEXT: "IN_TRANSIT",
|
|
241
|
+
},
|
|
238
242
|
},
|
|
239
243
|
PROOF_OF_DELIVERY: {
|
|
240
244
|
NONE:{
|
|
@@ -466,5 +470,12 @@ module.exports = {
|
|
|
466
470
|
PICKUP_AND_DELIVER: "PICKUP_AND_DELIVER",
|
|
467
471
|
MULTI_PICKING: "MULTI_PICKING",
|
|
468
472
|
},
|
|
473
|
+
BOOKING_STOP_STATUSES: {
|
|
474
|
+
PENDING: "PENDING",
|
|
475
|
+
ACCEPTED: "ACCEPTED",
|
|
476
|
+
PICKED_UP: "PICKED_UP",
|
|
477
|
+
COMPLETED: "COMPLETED",
|
|
478
|
+
FAILED: "FAILED",
|
|
479
|
+
},
|
|
469
480
|
},
|
|
470
481
|
};
|
|
@@ -43,6 +43,11 @@ module.exports = (connection) => {
|
|
|
43
43
|
type: Number,
|
|
44
44
|
required: true,
|
|
45
45
|
},
|
|
46
|
+
status: {
|
|
47
|
+
type: String,
|
|
48
|
+
enum: Object.values(BOOKING.BOOKING_STOP_STATUSES),
|
|
49
|
+
default: BOOKING.BOOKING_STOP_STATUSES.PENDING,
|
|
50
|
+
},
|
|
46
51
|
}, { timestamps: true, strict: false });
|
|
47
52
|
|
|
48
53
|
return BookingStopSchema;
|
|
@@ -29,6 +29,7 @@ const ALLOWED_STATUSES = [
|
|
|
29
29
|
BOOKING_STATUS.RETURNING.INDEX,
|
|
30
30
|
BOOKING_STATUS.RETURNED.INDEX,
|
|
31
31
|
BOOKING_STATUS.RETURNED_TO_PICKUP.INDEX,
|
|
32
|
+
BOOKING_STATUS.IN_TRANSIT.INDEX,
|
|
32
33
|
];
|
|
33
34
|
|
|
34
35
|
const ALLOWED_STATUS_TEXTS = [
|
|
@@ -55,6 +56,7 @@ const ALLOWED_STATUS_TEXTS = [
|
|
|
55
56
|
BOOKING_STATUS.RETURNING.TEXT,
|
|
56
57
|
BOOKING_STATUS.RETURNED.TEXT,
|
|
57
58
|
BOOKING_STATUS.RETURNED_TO_PICKUP.TEXT,
|
|
59
|
+
BOOKING_STATUS.IN_TRANSIT.TEXT,
|
|
58
60
|
];
|
|
59
61
|
|
|
60
62
|
/** @param {import("mongoose")} connection */
|