mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-07 23:32:15 +00:00
fix: build
This commit is contained in:
2
packages/es-mapping-generator/app.js
Normal file
2
packages/es-mapping-generator/app.js
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./lib/cli.js')
|
||||
3891
packages/es-mapping-generator/package-lock.json
generated
3891
packages/es-mapping-generator/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,20 @@
|
||||
{
|
||||
"name": "@openstapps/es-mapping-generator",
|
||||
"version": "0.6.0",
|
||||
"version": "0.4.0",
|
||||
"description": "Tool to convert TypeScript Interfaces to Elasticsearch Mappings",
|
||||
"version": "2.1.0",
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
"bin": {
|
||||
"openstapps-es-mapping-generator": "./lib/cli.js"
|
||||
"openstapps-es-mapping-generator": "app.js"
|
||||
},
|
||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||
"scripts": {
|
||||
"build": "npm run lint && npm run compile",
|
||||
"build": "rimraf lib && tsc",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||
"check-configuration": "openstapps-configuration",
|
||||
"compile": "rimraf lib && tsc && prepend lib/cli.js '#!/usr/bin/env node\n'",
|
||||
"documentation": "typedoc --includeDeclarations --mode modules --out docs --readme README.md --listInvalidSymbolLinks src",
|
||||
"version": "npm run changelog",
|
||||
"prepublishOnly": "npm ci && npm run build",
|
||||
@@ -25,36 +26,27 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "8.4.0",
|
||||
"@openstapps/logger": "1.1.1",
|
||||
"commander": "9.5.0",
|
||||
"deepmerge": "4.2.2",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"commander": "10.0.0",
|
||||
"deepmerge": "4.3.0",
|
||||
"flatted": "3.2.7",
|
||||
"got": "11.8.6",
|
||||
"got": "12.6.0",
|
||||
"typedoc": "0.18.0",
|
||||
"typescript": "3.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/configuration": "0.34.0",
|
||||
"@openstapps/configuration": "workspace:*",
|
||||
"@testdeck/mocha": "0.3.3",
|
||||
"@openstapps/eslint-config": "1.1.0",
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
"@types/chai": "4.3.4",
|
||||
"@types/mocha": "9.1.1",
|
||||
"@types/node": "14.18.36",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"chai": "4.3.7",
|
||||
"conventional-changelog-cli": "2.2.2",
|
||||
"mocha": "9.2.2",
|
||||
"mocha": "10.2.0",
|
||||
"nock": "13.3.0",
|
||||
"prepend-file-cli": "1.0.6",
|
||||
"rimraf": "3.0.2",
|
||||
"rimraf": "4.4.0",
|
||||
"ts-node": "10.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.40.0",
|
||||
"@typescript-eslint/parser": "5.40.0",
|
||||
"eslint": "8.25.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-jsdoc": "39.3.6",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-unicorn": "44.0.2",
|
||||
"prettier": "2.7.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {Command} from 'commander';
|
||||
import {readFileSync, writeFileSync} from 'fs';
|
||||
import {mkdirSync, readFileSync, writeFileSync} from 'fs';
|
||||
import got from 'got';
|
||||
import path from 'path';
|
||||
import {exit} from 'process';
|
||||
@@ -65,18 +65,21 @@ commander
|
||||
// write documentation to file
|
||||
if (typeof options.aggPath !== 'undefined') {
|
||||
const aggPath = path.resolve(options.aggPath);
|
||||
mkdirSync(path.dirname(aggPath), {recursive: true});
|
||||
// tslint:disable-next-line:no-magic-numbers
|
||||
writeFileSync(aggPath, JSON.stringify(result.aggregations, null, 2));
|
||||
Logger.ok(`Elasticsearch aggregations written to ${aggPath}.`);
|
||||
}
|
||||
if (typeof options.mappingPath !== 'undefined') {
|
||||
const mappingPath = path.resolve(options.mappingPath);
|
||||
mkdirSync(path.dirname(mappingPath), {recursive: true});
|
||||
// tslint:disable-next-line:no-magic-numbers
|
||||
writeFileSync(mappingPath, JSON.stringify(result.mappings, null, 2));
|
||||
Logger.ok(`Elasticsearch mappings written to ${mappingPath}.`);
|
||||
}
|
||||
if (typeof options.errorPath !== 'undefined') {
|
||||
const errorPath = path.resolve(options.errorPath);
|
||||
mkdirSync(path.dirname(errPath), {recursive: true});
|
||||
// tslint:disable-next-line:no-magic-numbers
|
||||
writeFileSync(errorPath, JSON.stringify(result.errors, null, 2));
|
||||
Logger.ok(`Mapping errors written to ${errorPath}.`);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"experimentalDecorators": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"inlineSourceMap": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"noErrorTruncation": true,
|
||||
|
||||
Reference in New Issue
Block a user