mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
feat: improve monorepo dev experience
This commit is contained in:
@@ -25,6 +25,16 @@
|
||||
],
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts"
|
||||
},
|
||||
"./schema.json": {
|
||||
"import": "./lib/schema.json",
|
||||
"types": "./lib/schema.d.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"test/resources",
|
||||
@@ -41,7 +51,6 @@
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@openstapps/core-tools": "workspace:*",
|
||||
"@types/geojson": "1.0.6",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"http-status-codes": "2.2.0",
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ValidationError} from '@openstapps/core-tools';
|
||||
import {StatusCodes} from 'http-status-codes';
|
||||
import {SCError} from '../error.js';
|
||||
|
||||
@@ -24,14 +23,14 @@ export class SCValidationErrorResponse extends SCError {
|
||||
/**
|
||||
* List of validatation errors
|
||||
*/
|
||||
additionalData: ValidationError[];
|
||||
additionalData: unknown[]; // TODO
|
||||
|
||||
/**
|
||||
* Create a SCValidationErrorResponse
|
||||
* @param errors List of validation errors
|
||||
* @param stack Set to true if a stack trace should be created
|
||||
*/
|
||||
constructor(errors: ValidationError[], stack?: boolean) {
|
||||
constructor(errors: unknown[] /* TODO */, stack?: boolean) {
|
||||
super('ValidationError', 'Validation of request failed', StatusCodes.BAD_REQUEST, stack);
|
||||
this.additionalData = errors;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"extends": "@openstapps/tsconfig"
|
||||
"extends": "@openstapps/tsconfig",
|
||||
"compilerOptions": {
|
||||
"typeRoots": ["./node_modules/@openstapps/json-schema-generator/types"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export default defineConfig({
|
||||
format: 'esm',
|
||||
outDir: 'lib',
|
||||
plugins: [
|
||||
jsonSchemaPlugin('index.schema.json', elasticsearchMappingGenerator('elasticsearch.json')),
|
||||
openapiPlugin('openapi.json', 'index.schema.json'),
|
||||
jsonSchemaPlugin('schema.json', elasticsearchMappingGenerator('elasticsearch.json')),
|
||||
openapiPlugin('openapi.json', 'schema.json'),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user