@ui5/dts-generator
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -6,2 +6,8 @@ # Change Log | ||
# [2.3.0](https://github.com/SAP/ui5-typescript/compare/v2.2.1...v2.3.0) (2021-07-14) | ||
### Features | ||
- enable use for custom namespaces ([#272](https://github.com/SAP/ui5-typescript/issues/272)) ([874111d](https://github.com/SAP/ui5-typescript/commit/874111d68b3255f794a280bc28ac3ad231ceb6b6)) | ||
## [2.2.1](https://github.com/SAP/ui5-typescript/compare/v2.2.0...v2.2.1) (2021-04-22) | ||
@@ -8,0 +14,0 @@ |
@@ -19,2 +19,3 @@ const _ = require("lodash"); | ||
}, | ||
topLevelNamespaceSymbol: "sap", | ||
}; | ||
@@ -35,5 +36,10 @@ | ||
// Transform The api.json files to an hierarchical well defined Data structure (see ast.d.ts) | ||
const targetLibAst = jsonToAst(targetLibFixedJson); | ||
const targetLibAst = jsonToAst( | ||
targetLibFixedJson, | ||
actualOptions.topLevelNamespaceSymbol | ||
); | ||
const depsAsts = timer(function buildAst() { | ||
return _.map(depsFixedJsons, jsonToAst); | ||
return _.map(depsFixedJsons, function (dep) { | ||
return jsonToAst(dep, actualOptions.topLevelNamespaceSymbol); | ||
}); | ||
}); | ||
@@ -40,0 +46,0 @@ |
const _ = require("lodash"); | ||
const { assertKnownProps } = require("../utils/runtime-checks"); | ||
function jsonToAst(jsonObj) { | ||
function jsonToAst(jsonObj, topLevelNamespaceSymbol) { | ||
console.error(topLevelNamespaceSymbol); | ||
return { | ||
version: jsonObj.version, | ||
topLevelNamespace: buildNamespace(jsonObj.symbols, "sap"), | ||
topLevelNamespace: buildNamespace(jsonObj.symbols, topLevelNamespaceSymbol), | ||
}; | ||
@@ -9,0 +10,0 @@ } |
{ | ||
"name": "@ui5/dts-generator", | ||
"description": "Generates TypeScript Definitions from UI5 api.json files", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"license": "Apache-2.0", | ||
@@ -32,3 +32,3 @@ "repository": { | ||
}, | ||
"gitHead": "62a4ca489f0a3e000b1ab4bb1e49d080421ba6c0" | ||
"gitHead": "0043dadccbec98b29db75c86567750c587ba056b" | ||
} |
@@ -37,2 +37,3 @@ [](https://www.npmjs.com/package/@ui5/dts-generator) | ||
], | ||
topLevelNamespaceSymbol: "sap", //The first part of the namespace to analyze defaults to 'sap' | ||
}); | ||
@@ -39,0 +40,0 @@ |
Sorry, the diff of this file is not supported yet
90564
2059
51