@krlwlfrt/omeco
Advanced tools
Comparing version 0.4.1 to 0.5.0
import { convertableToString } from 'xml2js'; | ||
/** | ||
* Async version of parseString | ||
* | ||
* @param xml XML to parse | ||
*/ | ||
export declare function asyncParseString(xml: convertableToString): Promise<object>; | ||
export declare function asyncParseString(xml: convertableToString): Promise<unknown>; |
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -28,7 +14,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
const xml2js_1 = require("xml2js"); | ||
/** | ||
* Async version of parseString | ||
* | ||
* @param xml XML to parse | ||
*/ | ||
function asyncParseString(xml) { | ||
@@ -49,2 +30,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
exports.asyncParseString = asyncParseString; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXN5bmMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0dBYUc7Ozs7Ozs7Ozs7OztBQUVILG1DQUF3RDtBQUV4RDs7OztHQUlHO0FBQ0gsU0FBc0IsZ0JBQWdCLENBQUMsR0FBd0I7O1FBQzdELE9BQU8sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsTUFBTSxFQUFFLEVBQUU7WUFDckMsb0JBQVcsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxHQUFzQixFQUFFLE1BQWMsRUFBRSxFQUFFO2dCQUMxRCxJQUFJLEdBQUcsWUFBWSxLQUFLLEVBQUU7b0JBQ3hCLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztpQkFDYjtxQkFBTTtvQkFDTCxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7aUJBQ2pCO1lBQ0gsQ0FBQyxDQUFDLENBQUM7UUFDTCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FBQTtBQVZELDRDQVVDIn0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXN5bmMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBZUEsbUNBQXdEO0FBT3hELFNBQXNCLGdCQUFnQixDQUFDLEdBQXdCOztRQUM3RCxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFO1lBQ3JDLG9CQUFXLENBQUMsR0FBRyxFQUFFLENBQUMsR0FBRyxFQUFFLE1BQU0sRUFBRSxFQUFFO2dCQUMvQixJQUFJLEdBQUcsWUFBWSxLQUFLLEVBQUU7b0JBQ3hCLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztpQkFDYjtxQkFBTTtvQkFDTCxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7aUJBQ2pCO1lBQ0gsQ0FBQyxDQUFDLENBQUM7UUFDTCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FBQTtBQVZELDRDQVVDIn0= |
#!/usr/bin/env node | ||
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -37,3 +23,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
const extract_1 = require("./extract"); | ||
// read and parse package file | ||
const pkgJson = JSON.parse(fs_1.readFileSync(path_1.join(__dirname, '..', 'package.json')) | ||
@@ -43,4 +28,4 @@ .toString()); | ||
commander | ||
.version(pkgJson.version) // set version of cli | ||
.allowUnknownOption(false); // disallow unknown options | ||
.version(pkgJson.version) | ||
.allowUnknownOption(false); | ||
commander | ||
@@ -53,7 +38,5 @@ .command('convert <metadataXml> [targetDir]') | ||
.action((metadataXml, relativeTargetDir, cmd) => __awaiter(void 0, void 0, void 0, function* () { | ||
// check if supplied metadata file exists | ||
if (!fs_1.existsSync(metadataXml)) { | ||
throw new Error(`File '${metadataXml}' does not exist!`); | ||
} | ||
// set default value for targetDir | ||
let targetDir = path_1.dirname(metadataXml); | ||
@@ -63,5 +46,3 @@ if (typeof targetDir !== 'undefined') { | ||
} | ||
// set target file name | ||
const targetFileName = path_1.join(targetDir, path_1.basename(metadataXml, '.xml')); | ||
// check if files in target directory exist | ||
[ | ||
@@ -77,7 +58,4 @@ '.d.ts', | ||
}); | ||
// read metadata file | ||
const buffer = yield promises_1.readFile(metadataXml); | ||
// extract data | ||
const extractedData = yield extract_1.extractData(buffer.toString()); | ||
// output debug information if desired | ||
if (cmd.debug) { | ||
@@ -88,3 +66,2 @@ const convertedMetadata = yield async_1.asyncParseString(buffer.toString()); | ||
} | ||
// sort entities and properties by name | ||
if (cmd.sort) { | ||
@@ -101,7 +78,4 @@ extractedData.sort((a, b) => { | ||
const extractedDataCopy = [...extractedData]; | ||
// generate and compile TypeScript interfaces | ||
yield promises_1.writeFile(`${targetFileName}.d.ts`, tsg_1.generateTypeScript(extractedData, common_1.generateName, compile_typescript_1.generatePropertyType)); | ||
// generate and compile PlantUML description | ||
yield promises_1.writeFile(`${targetFileName}.puml`, compile_plantuml_1.compilePlantUml(extractedDataCopy)); | ||
// generate PNG from PlantUML | ||
compile_plantuml_1.writePlantUmlPng(`${targetFileName}.puml`, `${targetFileName}.png`); | ||
@@ -114,2 +88,2 @@ })); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7R0FhRzs7Ozs7Ozs7Ozs7QUFFSCx1Q0FBaUQ7QUFDakQseUNBQWtDO0FBQ2xDLDJCQUE0QztBQUM1QywwQ0FBZ0Q7QUFDaEQsK0JBQXNEO0FBQ3RELG1DQUF5QztBQUN6QyxxQ0FBbUQ7QUFDbkQseURBQXFFO0FBQ3JFLDZEQUEwRDtBQUMxRCx1Q0FBc0M7QUFFdEMsOEJBQThCO0FBQzlCLE1BQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQ3hCLGlCQUFZLENBQUMsV0FBSSxDQUFDLFNBQVMsRUFBRSxJQUFJLEVBQUUsY0FBYyxDQUFDLENBQUM7S0FDaEQsUUFBUSxFQUFFLENBQ2QsQ0FBQztBQUVGLE1BQU0sU0FBUyxHQUFHLElBQUksbUJBQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUV2QyxTQUFTO0tBQ04sT0FBTyxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0F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WMsT0FBTyxFQUFFLEdBQUcsY0FBYyxNQUFNLENBQUMsQ0FBQztBQUN0RSxDQUFDLENBQUEsQ0FBQyxDQUFDO0FBRUwsU0FBUztLQUNOLEtBQUssQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFHdkIsSUFBSSxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7SUFDN0IsU0FBUyxDQUFDLElBQUksRUFBRSxDQUFDO0NBQ2xCIn0= |
import { ThingWithNameAndNamespace } from '@krlwlfrt/tsg'; | ||
export declare const INDENTATION = 2; | ||
/** | ||
* Generate name for a thing | ||
* | ||
* @param thing Thing to generate name for | ||
* @param separator Separator for namespace and name | ||
*/ | ||
export declare function generateName(thing: ThingWithNameAndNamespace, separator?: string): string; | ||
/** | ||
* Check whether something is a string or not | ||
* | ||
* @param something Something to check | ||
*/ | ||
export declare function isString(something: unknown): something is string; |
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isString = exports.generateName = exports.INDENTATION = void 0; | ||
exports.INDENTATION = 2; | ||
/** | ||
* Generate name for a thing | ||
* | ||
* @param thing Thing to generate name for | ||
* @param separator Separator for namespace and name | ||
*/ | ||
function generateName(thing, separator = '__') { | ||
@@ -34,7 +14,2 @@ if (typeof thing.namespace === 'undefined' || thing.namespace === 'Edm') { | ||
exports.generateName = generateName; | ||
/** | ||
* Check whether something is a string or not | ||
* | ||
* @param something Something to check | ||
*/ | ||
function isString(something) { | ||
@@ -44,2 +19,2 @@ return typeof something === 'string'; | ||
exports.isString = isString; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbW1vbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7R0FhRzs7O0FBSVUsUUFBQSxXQUFXLEdBQUcsQ0FBQyxDQUFDO0FBRTdCOzs7OztHQUtHO0FBQ0gsU0FBZ0IsWUFBWSxDQUFDLEtBQWdDLEVBQUUsU0FBUyxHQUFHLElBQUk7SUFDN0UsSUFBSSxPQUFPLEtBQUssQ0FBQyxTQUFTLEtBQUssV0FBVyxJQUFJLEtBQUssQ0FBQyxTQUFTLEtBQUssS0FBSyxFQUFFO1FBQ3ZFLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQztLQUNuQjtJQUVELE9BQU8sR0FBRyxLQUFLLENBQUMsU0FBUztTQUN0QixLQUFLLENBQUMsR0FBRyxDQUFDO1NBQ1YsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLFNBQVMsR0FBRyxLQUFLLENBQUMsSUFBSSxFQUFFLENBQUM7QUFDM0MsQ0FBQztBQVJELG9DQVFDO0FBRUQ7Ozs7R0FJRztBQUNILFNBQWdCLFFBQVEsQ0FBQyxTQUFrQjtJQUN6QyxPQUFPLE9BQU8sU0FBUyxLQUFLLFFBQVEsQ0FBQztBQUN2QyxDQUFDO0FBRkQsNEJBRUMifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbW1vbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFpQmEsUUFBQSxXQUFXLEdBQUcsQ0FBQyxDQUFDO0FBUTdCLFNBQWdCLFlBQVksQ0FBQyxLQUFnQyxFQUFFLFNBQVMsR0FBRyxJQUFJO0lBQzdFLElBQUksT0FBTyxLQUFLLENBQUMsU0FBUyxLQUFLLFdBQVcsSUFBSSxLQUFLLENBQUMsU0FBUyxLQUFLLEtBQUssRUFBRTtRQUN2RSxPQUFPLEtBQUssQ0FBQyxJQUFJLENBQUM7S0FDbkI7SUFFRCxPQUFPLEdBQUcsS0FBSyxDQUFDLFNBQVM7U0FDdEIsS0FBSyxDQUFDLEdBQUcsQ0FBQztTQUNWLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxTQUFTLEdBQUcsS0FBSyxDQUFDLElBQUksRUFBRSxDQUFDO0FBQzNDLENBQUM7QUFSRCxvQ0FRQztBQU9ELFNBQWdCLFFBQVEsQ0FBQyxTQUFrQjtJQUN6QyxPQUFPLE9BQU8sU0FBUyxLQUFLLFFBQVEsQ0FBQztBQUN2QyxDQUFDO0FBRkQsNEJBRUMifQ== |
import { Entity } from '@krlwlfrt/tsg'; | ||
/** | ||
* Compile entities to a PlantUML description | ||
* | ||
* @param entities List of entities to compile | ||
* @param rootNamespaces List of root namespaces | ||
*/ | ||
export declare function compilePlantUml(entities: Entity[], rootNamespaces?: string[]): string; | ||
/** | ||
* Write class diagram file (PNG) from PlantUML file | ||
* | ||
* @param sourceFile Source file to read PlantUML from | ||
* @param targetFile Target file to write class diagram (PNG) | ||
*/ | ||
export declare function writePlantUmlPng(sourceFile: string, targetFile: string): void; |
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -20,8 +6,2 @@ exports.writePlantUmlPng = exports.compilePlantUml = void 0; | ||
const common_1 = require("./common"); | ||
/** | ||
* Compile entities to a PlantUML description | ||
* | ||
* @param entities List of entities to compile | ||
* @param rootNamespaces List of root namespaces | ||
*/ | ||
function compilePlantUml(entities, rootNamespaces = ['Edm']) { | ||
@@ -65,8 +45,2 @@ let output = '@startuml\nset namespaceSeparator ::\n'; | ||
exports.compilePlantUml = compilePlantUml; | ||
/** | ||
* Write class diagram file (PNG) from PlantUML file | ||
* | ||
* @param sourceFile Source file to read PlantUML from | ||
* @param targetFile Target file to write class diagram (PNG) | ||
*/ | ||
function writePlantUmlPng(sourceFile, targetFile) { | ||
@@ -78,2 +52,2 @@ const plantuml = require('node-plantuml'); | ||
exports.writePlantUmlPng = writePlantUmlPng; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZS1wbGFudHVtbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21waWxlLXBsYW50dW1sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztHQWFHOzs7QUFHSCwyQkFBcUM7QUFDckMscUNBQXNDO0FBRXRDOzs7OztHQUtHO0FBQ0gsU0FBZ0IsZUFBZSxDQUFDLFFBQWtCLEVBQUUsY0FBYyxHQUFHLENBQUMsS0FBSyxDQUFDO0lBQzFFLElBQUksTUFBTSxHQUFHLHdDQUF3QyxDQUFDO0lBRXRELElBQUksVUFBVSxHQUFHLEVBQUUsQ0FBQztJQUVwQixJQUFJLFlBQVksR0FBRyxFQUFFLENBQUM7SUFFdEIsS0FBSyxNQUFNLE1BQU0sSUFBSSxRQUFR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1BQU0sSUFBSSxhQUFhLENBQUM7SUFFeEIsT0FBTyxNQUFNLENBQUM7QUFDaEIsQ0FBQztBQWhERCwwQ0FnREM7QUFRRCxTQUFnQixnQkFBZ0IsQ0FBQyxVQUFrQixFQUFFLFVBQWtCO0lBRXJFLE1BQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxlQUFlLENBQUMsQ0FBQztJQUMxQyxNQUFNLEdBQUcsR0FBRyxRQUFRLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQzFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLHNCQUFpQixDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7QUFDOUMsQ0FBQztBQUxELDRDQUtDIn0= |
import { Property } from '@krlwlfrt/tsg'; | ||
/** | ||
* Translate an OData type to a TypeScript type | ||
* | ||
* @param property Property to translate | ||
*/ | ||
export declare function generatePropertyType(property: Property): string; |
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generatePropertyType = void 0; | ||
const common_1 = require("./common"); | ||
/** | ||
* Translate an OData type to a TypeScript type | ||
* | ||
* @param property Property to translate | ||
*/ | ||
function generatePropertyType(property) { | ||
@@ -81,2 +62,2 @@ let typeScriptType = ''; | ||
exports.generatePropertyType = generatePropertyType; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGls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||
import { Metadata } from './metadata.v2'; | ||
/** | ||
* Extract entities and their properties from OData metadata | ||
* | ||
* @param metadataString Metadata to extract entities from | ||
*/ | ||
export declare function extractData(metadataString: string): Promise<Entity[]>; | ||
/** | ||
* Get name and namespace from dotted identifier | ||
* | ||
* @param identifier Dotted identifier to get name and namespace from | ||
*/ | ||
export declare function getNameAndNamespace(identifier: string): { | ||
@@ -18,7 +8,2 @@ name: string; | ||
}; | ||
/** | ||
* Extract entities from OData metadata version 2 | ||
* | ||
* @param metadata Metadata to extract entities from | ||
*/ | ||
export declare function extractDataV2(metadata: Metadata): Entity[]; |
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -29,5 +15,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
const common_1 = require("./common"); | ||
/** | ||
* List of known properties | ||
*/ | ||
const knownAttributes = [ | ||
@@ -43,11 +26,5 @@ 'FixedLength', | ||
]; | ||
/** | ||
* Extract entities and their properties from OData metadata | ||
* | ||
* @param metadataString Metadata to extract entities from | ||
*/ | ||
function extractData(metadataString) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const metadata = yield async_1.asyncParseString(metadataString); | ||
// get metadata version | ||
const version = metadata['edmx:Edmx'].$.Version; | ||
@@ -61,7 +38,2 @@ if (version !== '1.0') { | ||
exports.extractData = extractData; | ||
/** | ||
* Get name and namespace from dotted identifier | ||
* | ||
* @param identifier Dotted identifier to get name and namespace from | ||
*/ | ||
function getNameAndNamespace(identifier) { | ||
@@ -77,7 +49,2 @@ const parts = identifier.split('.'); | ||
exports.getNameAndNamespace = getNameAndNamespace; | ||
/** | ||
* Extract entities from OData metadata version 2 | ||
* | ||
* @param metadata Metadata to extract entities from | ||
*/ | ||
function extractDataV2(metadata) { | ||
@@ -88,13 +55,10 @@ const entities = []; | ||
} | ||
// iterate over data services | ||
for (const dataService of metadata['edmx:Edmx']['edmx:DataServices']) { | ||
if (!Array.isArray(dataService.Schema)) { | ||
// continue if data service doesn't contain schemas | ||
continue; | ||
} | ||
// iterate over contained schemas | ||
for (const schema of dataService.Schema) { | ||
const entityTypes = []; | ||
for (const key in schema) { | ||
if (!schema.hasOwnProperty(key) || key === '$') { | ||
if (!Object.prototype.hasOwnProperty.call(schema, key) || key === '$') { | ||
continue; | ||
@@ -107,10 +71,8 @@ } | ||
if (Array.isArray(schema.ComplexType)) { | ||
entityTypes.push.apply(entityTypes, schema.ComplexType); | ||
entityTypes.push(...schema.ComplexType); | ||
} | ||
if (Array.isArray(schema.EntityType)) { | ||
entityTypes.push.apply(entityTypes, schema.EntityType); | ||
entityTypes.push(...schema.EntityType); | ||
} | ||
// iterate over entity types | ||
for (const entityType of entityTypes) { | ||
// create a new interface | ||
const entity = { | ||
@@ -132,5 +94,3 @@ name: entityType.$.Name, | ||
} | ||
// add interface to list of interfaces | ||
entities.push(entity); | ||
// set parent for interface if entity type has base type | ||
if (typeof entityType.$.BaseType !== 'undefined' && common_1.isString(entityType.$.BaseType)) { | ||
@@ -140,3 +100,2 @@ entity.parent = getNameAndNamespace(entityType.$.BaseType); | ||
if (Array.isArray(entityType.Property)) { | ||
// iterate over properties | ||
for (const property of entityType.Property) { | ||
@@ -146,3 +105,2 @@ const attributes = []; | ||
if (knownAttributes.includes(attribute)) { | ||
// noop | ||
} | ||
@@ -214,3 +172,2 @@ else if (attribute.indexOf(':') >= 0) { | ||
} | ||
// return if schema doesn't contain navigation properties | ||
if (!Array.isArray(entityType.NavigationProperty)) { | ||
@@ -269,2 +226,2 @@ continue; | ||
exports.extractDataV2 = extractDataV2; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0cmFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztHQWFHOzs7Ozs7Ozs7Ozs7QUFLSCxtQ0FBeUM7QUFDekMscUNBQWtDO0FBR2xDOztHQUVHO0FBQ0gsTUFBTSxlQUFlLEdBQUc7SUFDdEIsYUFBYTtJQUNiLFdBQVc7SUFDWCxNQUFNO0lBQ04sTUFBTTtJQUNOLFVBQVU7SUFDVixXQUFXO0lBQ1gsT0FBTztJQUNQLFNBQVM7Q0FDVixDQUFDO0FBRUY7Ozs7R0FJRztBQUNILFNBQXNCLFdBQVcsQ0FBQyxjQUFzQjs7UUFDdEQsTUFBTSxRQUFRLEdBQUcsTUFBTSx3QkFBZ0IsQ0FBQyxjQUFjLENBQWEsQ0FBQztRQUVwRSx1QkFBdUI7UUFDdkIsTUFBTSxPQUFPLEdBQUcsUUFBUSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUM7UUFFaEQsSUFBSSxPQUFPLEtBQUssS0FBSyxFQUFFO1lBQ3JCLE1BQU0sSUFBSSxLQUFLLENBQUMscUJBQXFCLE9BQU8saUJBQWlCLENBQUMsQ0FBQztTQUNoRTtRQUVELE9BQU8sYUFBYSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQ2pDLENBQUM7Q0FBQTtBQVhELGtDQVdDO0FBRUQ7Ozs7R0FJRztBQUNILFNBQWdCLG1CQUFtQixDQUFDLFVBQWtCO0lBQ3BELE1BQU0sS0FBSyxHQUFHLFVBQVUsQ0FBQyxLQ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0FBQyxDQUFDO2lCQUNKO2FBQ0Y7U0FDRjtLQUNGO0lBRUQsT0FBTyxRQUFRLENBQUM7QUFDbEIsQ0FBQztBQXBORCxzQ0FvTkMifQ== |
@@ -37,5 +37,2 @@ export interface Metadata { | ||
$: { | ||
/** | ||
* NAMESPACE.NAME | ||
*/ | ||
EntityType: string; | ||
@@ -47,5 +44,2 @@ Name: string; | ||
$: { | ||
/** | ||
* NAMESPACE.NAME | ||
*/ | ||
Association: string; | ||
@@ -52,0 +46,0 @@ Name: string; |
"use strict"; | ||
/* | ||
* Copyright (C) 2019, 2020 Karl-Philipp Wulfert | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* unknown WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWRhdGEudjIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbWV0YWRhdGEudjIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0dBYUcifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWRhdGEudjIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbWV0YWRhdGEudjIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 |
{ | ||
"name": "@krlwlfrt/omeco", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "OData metadata converter", | ||
@@ -16,18 +16,17 @@ "repository": { | ||
"dependencies": { | ||
"@krlwlfrt/tsg": "0.6.1", | ||
"@types/xml2js": "0.4.8", | ||
"commander": "7.1.0", | ||
"@krlwlfrt/tsg": "0.10.0", | ||
"@types/xml2js": "0.4.9", | ||
"commander": "8.0.0", | ||
"xml2js": "0.4.23" | ||
}, | ||
"devDependencies": { | ||
"@openstapps/configuration": "0.26.0", | ||
"@krlwlfrt/otpc": "0.4.0", | ||
"@testdeck/mocha": "0.1.2", | ||
"@types/chai": "4.2.15", | ||
"@types/chai-as-promised": "7.1.3", | ||
"@types/mocha": "8.2.1", | ||
"@types/node": "14.14.31", | ||
"chai": "4.3.0", | ||
"chai-as-promised": "7.1.1", | ||
"@types/mocha": "9.0.0", | ||
"@types/node": "14.17.6", | ||
"@typescript-eslint/eslint-plugin": "4.28.4", | ||
"@typescript-eslint/parser": "4.28.4", | ||
"conventional-changelog-cli": "2.1.1", | ||
"mocha": "8.3.0", | ||
"eslint": "7.31.0", | ||
"mocha": "9.0.3", | ||
"node-plantuml": "0.9.0", | ||
@@ -37,7 +36,5 @@ "nyc": "15.1.0", | ||
"rimraf": "3.0.2", | ||
"ts-node": "9.1.1", | ||
"tslint": "6.1.2", | ||
"tslint-eslint-rules": "5.4.0", | ||
"typedoc": "0.20.27", | ||
"typescript": "4.1.5" | ||
"ts-node": "10.1.0", | ||
"typedoc": "0.21.4", | ||
"typescript": "4.3.5" | ||
}, | ||
@@ -48,13 +45,11 @@ "peerDependencies": { | ||
"scripts": { | ||
"build": "npm run tslint && npm run compile", | ||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'", | ||
"build": "npm run lint && npm run compile", | ||
"compile": "rimraf lib && tsc && prepend lib/cli.js '#!/usr/bin/env node\n'", | ||
"documentation": "typedoc --out docs --readme README.md --listInvalidSymbolLinks src", | ||
"prepublishOnly": "npm ci && npm run build", | ||
"lint": "eslint src --ext .ts", | ||
"prepublishOnly": "npm ci && npm run build && npm test", | ||
"preversion": "npm run prepublishOnly", | ||
"push": "git push && git push origin \"v$npm_package_version\"", | ||
"test": "nyc mocha --require ts-node/register 'test/**/*.spec.ts'", | ||
"tslint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'", | ||
"check-configuration": "openstapps-configuration", | ||
"postversion": "npm run changelog", | ||
"preversion": "npm run prepublishOnly", | ||
"push": "git push && git push origin \"v$npm_package_version\"" | ||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" | ||
}, | ||
@@ -64,3 +59,3 @@ "bin": { | ||
}, | ||
"main": "./lib/extract.js", | ||
"main": "lib/index.js", | ||
"typings": "./index.d.ts", | ||
@@ -94,3 +89,4 @@ "keywords": [ | ||
"html", | ||
"text-summary" | ||
"text-summary", | ||
"text" | ||
], | ||
@@ -107,3 +103,4 @@ "require": [ | ||
"node": ">=14" | ||
} | ||
}, | ||
"types": "lib/index.d.ts" | ||
} |
@@ -23,5 +23,5 @@ /* | ||
*/ | ||
export async function asyncParseString(xml: convertableToString): Promise<object> { | ||
export async function asyncParseString(xml: convertableToString): Promise<unknown> { | ||
return new Promise((resolve, reject) => { | ||
parseString(xml, (err: Error | undefined, result: object) => { | ||
parseString(xml, (err, result) => { | ||
if (err instanceof Error) { | ||
@@ -28,0 +28,0 @@ reject(err); |
@@ -117,4 +117,5 @@ /* | ||
// eslint-disable-next-line no-magic-numbers | ||
if (commander.args.length < 1) { | ||
commander.help(); | ||
} |
@@ -83,2 +83,3 @@ /* | ||
export function writePlantUmlPng(sourceFile: string, targetFile: string): void { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const plantuml = require('node-plantuml'); | ||
@@ -85,0 +86,0 @@ const gen = plantuml.generate(sourceFile); |
@@ -60,8 +60,10 @@ /* | ||
*/ | ||
export function getNameAndNamespace(identifier: string) { | ||
export function getNameAndNamespace(identifier: string): { name: string, namespace: string; } { | ||
const parts = identifier.split('.'); | ||
return { | ||
// eslint-disable-next-line no-magic-numbers | ||
name: parts[parts.length - 1], | ||
namespace: parts | ||
// eslint-disable-next-line no-magic-numbers | ||
.slice(0, parts.length - 1) | ||
@@ -96,3 +98,3 @@ .join('.'), | ||
for (const key in schema) { | ||
if (!schema.hasOwnProperty(key) || key === '$') { | ||
if (!Object.prototype.hasOwnProperty.call(schema, key) || key === '$') { | ||
continue; | ||
@@ -107,6 +109,6 @@ } | ||
if (Array.isArray(schema.ComplexType)) { | ||
entityTypes.push.apply(entityTypes, schema.ComplexType); | ||
entityTypes.push(...schema.ComplexType); | ||
} | ||
if (Array.isArray(schema.EntityType)) { | ||
entityTypes.push.apply(entityTypes, schema.EntityType); | ||
entityTypes.push(...schema.EntityType); | ||
} | ||
@@ -156,2 +158,3 @@ | ||
attributes.push({ | ||
// eslint-disable-next-line no-magic-numbers | ||
name: parts[1], | ||
@@ -158,0 +161,0 @@ namespace: parts[0], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16
71161
24
1295
1
+ Added@krlwlfrt/tsg@0.10.0(transitive)
+ Added@types/node@22.9.1(transitive)
+ Added@types/xml2js@0.4.9(transitive)
+ Addedcommander@8.0.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@krlwlfrt/tsg@0.6.1(transitive)
- Removed@types/node@14.14.28(transitive)
- Removed@types/xml2js@0.4.8(transitive)
- Removedcommander@7.1.0(transitive)
Updated@krlwlfrt/tsg@0.10.0
Updated@types/xml2js@0.4.9
Updatedcommander@8.0.0