@gls_spain/gps-common 34.31.8 → 35.0.0
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 +41 -29
- package/errors/AgenciaTributariaDNI.js +1 -1
- package/errors/CountersDoNotExistError.js +1 -1
- package/errors/DatabaseError.js +9 -0
- package/errors/DatabaseNotEmptyError.js +1 -1
- package/errors/DefaultsDoNotExistError.js +1 -1
- package/errors/ExpeditionAlreadyExistsError.js +1 -1
- package/errors/ExpeditionCannotBeDeletedError.js +1 -1
- package/errors/ExpeditionCannotBeUpdatedError.js +1 -1
- package/errors/ExpeditionDoesNotExistError.js +1 -1
- package/errors/GLSRecordingError.js +1 -1
- package/errors/GLSSpainError.js +1 -1
- package/errors/IbanNotCorrectError.js +1 -1
- package/errors/InconsistentSalesSettingsError.js +1 -1
- package/errors/InvalidSaleDestinationError.js +1 -1
- package/errors/LabelDoesNotExistError.js +1 -1
- package/errors/NetworkAlreadyExistsError.js +1 -1
- package/errors/NetworkCannotBeDeletedError.js +1 -1
- package/errors/NetworkCannotBeUpdatedError.js +1 -1
- package/errors/NetworkDoesNotExistError.js +1 -1
- package/errors/NifNotCorrectError.js +1 -1
- package/errors/RepresentativeAlreadyExistsError.js +1 -1
- package/errors/RepresentativeCannotBeDeletedError.js +1 -1
- package/errors/RepresentativeDoesNotExistError.js +1 -1
- package/errors/SaleAlreadyExistsError.js +1 -1
- package/errors/SaleDoesNotExistError.js +1 -1
- package/errors/ShopAlreadyExistsError.js +1 -1
- package/errors/ShopCannotBeDeletedError.js +1 -1
- package/errors/ShopCannotBeUpdatedError.js +1 -1
- package/errors/ShopCannotSellError.js +1 -1
- package/errors/ShopDoesNotExistError.js +1 -1
- package/errors/ShopNotEnabledError.js +1 -1
- package/errors/UserAlreadyExistsError.js +1 -1
- package/errors/UserCannotBeDeletedError.js +1 -1
- package/errors/UserCannotBeUpdatedError.js +1 -1
- package/errors/UserDoesNotExistError.js +1 -1
- package/errors/WrongNetworkError.js +1 -1
- package/errors/WrongPasswordError.js +1 -1
- package/errors/WrongShopError.js +1 -1
- package/errors/ZoneAlreadyExistsError.js +1 -1
- package/errors/ZoneCannotBeDeletedError.js +1 -1
- package/errors/ZoneDoesNotExistError.js +1 -1
- package/package.json +1 -4
- package/scripts/build-documentation.js +2 -2
- package/scripts/build-json-schemas.js +6 -5
- package/scripts/color-console-transport.js +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,39 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
# [35.0.0](https://github.com/GLS-Spain/gps-common/compare/v34.31.8...v35.0.0) (2024-04-04)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* nodejs 20 support ([782917a](https://github.com/GLS-Spain/gps-common/commit/782917a6cbfee5c87da008b1bfa9bb48c4bf1c8a))
|
|
7
7
|
|
|
8
|
-
## [34.31.7](https://github.com/GLS-Spain/gps-common/compare/v34.31.6...v34.31.7) (2023-11-21)
|
|
9
8
|
|
|
9
|
+
### BREAKING CHANGES
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* add new properties to json schema ([462bbbb](https://github.com/GLS-Spain/gps-common/commit/462bbbb8ed91ba9d206508e0a49a40b5384323fc))
|
|
14
|
-
* change parcelShopId type from number to string ([0cdae51](https://github.com/GLS-Spain/gps-common/commit/0cdae5183c12381c163d57ff75996139882ef598))
|
|
15
|
-
|
|
16
|
-
## [34.31.6](https://github.com/GLS-Spain/gps-common/compare/v34.31.5...v34.31.6) (2023-11-07)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Bug Fixes
|
|
20
|
-
|
|
21
|
-
* mdify supplierSHop ([d4ea59d](https://github.com/GLS-Spain/gps-common/commit/d4ea59d24f3a5257603a785d3830b80fadbf676b))
|
|
22
|
-
|
|
23
|
-
## [34.31.5](https://github.com/GLS-Spain/gps-common/compare/v34.31.4...v34.31.5) (2023-10-03)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Bug Fixes
|
|
27
|
-
|
|
28
|
-
* fix last update validation event supplier ([474d6be](https://github.com/GLS-Spain/gps-common/commit/474d6be01cb954c0ba05ba37d9425b919cb2a673))
|
|
29
|
-
|
|
30
|
-
## [34.31.4](https://github.com/GLS-Spain/gps-common/compare/v34.31.3...v34.31.4) (2023-10-03)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Bug Fixes
|
|
34
|
-
|
|
35
|
-
* fix validation ([89acbf3](https://github.com/GLS-Spain/gps-common/commit/89acbf3899efdbd9b4f8daa1bbd49acfd9d87dac))
|
|
11
|
+
* nodejs 20 support
|
|
36
12
|
|
|
13
|
+
## [34.31.8](https://github.com/GLS-Spain/gps-common/compare/v34.31.7...v34.31.8) (2023-11-22)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* fix array excludes to array of string array ([7d2c3ea](https://github.com/GLS-Spain/gps-common/commit/7d2c3ea72162d9994e9ef0dc0b49d7dc273c36eb))
|
|
19
|
+
|
|
20
|
+
## [34.31.7](https://github.com/GLS-Spain/gps-common/compare/v34.31.6...v34.31.7) (2023-11-21)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* add new properties to json schema ([462bbbb](https://github.com/GLS-Spain/gps-common/commit/462bbbb8ed91ba9d206508e0a49a40b5384323fc))
|
|
26
|
+
* change parcelShopId type from number to string ([0cdae51](https://github.com/GLS-Spain/gps-common/commit/0cdae5183c12381c163d57ff75996139882ef598))
|
|
27
|
+
|
|
28
|
+
## [34.31.6](https://github.com/GLS-Spain/gps-common/compare/v34.31.5...v34.31.6) (2023-11-07)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* mdify supplierSHop ([d4ea59d](https://github.com/GLS-Spain/gps-common/commit/d4ea59d24f3a5257603a785d3830b80fadbf676b))
|
|
34
|
+
|
|
35
|
+
## [34.31.5](https://github.com/GLS-Spain/gps-common/compare/v34.31.4...v34.31.5) (2023-10-03)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* fix last update validation event supplier ([474d6be](https://github.com/GLS-Spain/gps-common/commit/474d6be01cb954c0ba05ba37d9425b919cb2a673))
|
|
41
|
+
|
|
42
|
+
## [34.31.4](https://github.com/GLS-Spain/gps-common/compare/v34.31.3...v34.31.4) (2023-10-03)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* fix validation ([89acbf3](https://github.com/GLS-Spain/gps-common/commit/89acbf3899efdbd9b4f8daa1bbd49acfd9d87dac))
|
|
48
|
+
|
|
37
49
|
## [34.31.3](https://github.com/GLS-Spain/gps-common/compare/v34.31.2...v34.31.3) (2023-10-03)
|
|
38
50
|
|
|
39
51
|
|
package/errors/GLSSpainError.js
CHANGED
package/errors/WrongShopError.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gls_spain/gps-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "Errors, schemas and documentation for the Parcel Shops project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gls"
|
|
@@ -46,9 +46,6 @@
|
|
|
46
46
|
"@gls_spain/ajv-options": "^1.1.2",
|
|
47
47
|
"@gls_spain/common-errors": "^1.1.0",
|
|
48
48
|
"@gls_spain/common-json-schemas": "^1.2.4",
|
|
49
|
-
"@gls_spain/gps-common": "^34.30.5",
|
|
50
|
-
"@gls_spain/mongodb": "^1.2.0",
|
|
51
|
-
"@gls_spain/winston-transports": "^1.0.2",
|
|
52
49
|
"lodash": "^4.17.21",
|
|
53
50
|
"winston": "^3.3.3",
|
|
54
51
|
"yargs": "^15.4.1"
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const util = require('util');
|
|
6
|
-
const os = require('os');
|
|
6
|
+
// const os = require('os');
|
|
7
7
|
const childProcess = require('child_process');
|
|
8
8
|
const winston = require('winston');
|
|
9
|
-
const { ColorConsoleTransport } = require('@gls_spain/winston-transports');
|
|
10
9
|
const yargs = require('yargs');
|
|
11
10
|
const openApiSpec = require('../open-api-spec');
|
|
11
|
+
const { ColorConsoleTransport } = require('./color-console-transport');
|
|
12
12
|
|
|
13
13
|
const exec = util.promisify(childProcess.exec);
|
|
14
14
|
|
|
@@ -4,14 +4,15 @@ const fs = require('fs');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const winston = require('winston');
|
|
6
6
|
const kebabCase = require('lodash/kebabCase');
|
|
7
|
-
const yargs = require('yargs');
|
|
8
|
-
const { ColorConsoleTransport } = require('@gls_spain/winston-transports');
|
|
7
|
+
// const yargs = require('yargs');
|
|
8
|
+
// const { ColorConsoleTransport } = require('@gls_spain/winston-transports');
|
|
9
9
|
const schemas = require('../schemas');
|
|
10
10
|
const openapispec = require('../open-api-spec');
|
|
11
|
+
const { ColorConsoleTransport } = require('./color-console-transport');
|
|
11
12
|
|
|
12
|
-
const { argv } = yargs
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// const { argv } = yargs
|
|
14
|
+
// .option('output', { string: true, required: true, describe: 'directory path to put the json schemas in' })
|
|
15
|
+
// .usage('Usage: build-schemas --output output_dir');
|
|
15
16
|
|
|
16
17
|
const logger = winston.createLogger({ transports: new ColorConsoleTransport() });
|
|
17
18
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// eslint-disable-next-line camelcase
|
|
2
|
+
const winston_1 = require('winston');
|
|
3
|
+
|
|
4
|
+
exports.defaultOptions = {
|
|
5
|
+
format: winston_1.format.combine(
|
|
6
|
+
winston_1.format.colorize({ all: true }),
|
|
7
|
+
winston_1.format.timestamp(),
|
|
8
|
+
winston_1.format.printf(info => {
|
|
9
|
+
const { level, message, timestamp, label } = info;
|
|
10
|
+
return label !== undefined ? `${timestamp} [${label}] ${level}: ${message}` : `${timestamp} ${level}: ${message}`;
|
|
11
|
+
}),
|
|
12
|
+
),
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
class ColorConsoleTransport extends winston_1.transports.Console {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
super({ ...options, ...exports.defaultOptions });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = { ColorConsoleTransport };
|