@rxap/open-api 12.1.1 → 12.1.2-next.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/package.json +7 -5
- package/src/schematics/open-api/coerce-open-api-project.d.ts +1 -1
- package/src/schematics/open-api/coerce-open-api-project.js +3 -2
- package/src/schematics/open-api/coerce-open-api-project.js.map +1 -1
- package/src/schematics/open-api/index.js +3 -3
- package/src/schematics/open-api/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/open-api",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.2-next.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Merzough Münker",
|
|
6
6
|
"homepage": "https://gitlab.com/rxap/packages/libs/open-api",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"description": "Provides the functionality to create DataSource and RemoteMethod instances from an OpenAPI config.",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
+
"@angular-devkit/schematics": "^12.2.9",
|
|
22
23
|
"@angular/common": "^12.0.1",
|
|
23
24
|
"@angular/core": "^12.0.1",
|
|
24
25
|
"@angular/platform-browser": "^12.0.1",
|
|
@@ -26,14 +27,15 @@
|
|
|
26
27
|
"@rxap/definition": "^12.0.8",
|
|
27
28
|
"@rxap/mixin": "^12.0.7",
|
|
28
29
|
"@rxap/remote-method": "^12.0.9",
|
|
29
|
-
"@rxap/utilities": "^12.2.
|
|
30
|
+
"@rxap/utilities": "^12.2.2-next.0",
|
|
31
|
+
"@schematics/angular": "^12.2.9",
|
|
30
32
|
"reflect-metadata": "^0.1.13",
|
|
31
33
|
"rxjs": "^6.5.5"
|
|
32
34
|
},
|
|
33
35
|
"dependencies": {
|
|
34
|
-
"@rxap/schematics-open-api": "^12.0.
|
|
35
|
-
"@rxap/schematics-ts-morph": "^12.3.
|
|
36
|
-
"@rxap/schematics-utilities": "^12.
|
|
36
|
+
"@rxap/schematics-open-api": "^12.0.9",
|
|
37
|
+
"@rxap/schematics-ts-morph": "^12.3.2",
|
|
38
|
+
"@rxap/schematics-utilities": "^12.7.0",
|
|
37
39
|
"ajv-oai": "^1.2.1",
|
|
38
40
|
"openapi-types": "^9.0.0",
|
|
39
41
|
"ts-morph": "^10.1.0",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
export declare function CoerceOpenApiProject(project: string): Rule;
|
|
2
|
+
export declare function CoerceOpenApiProject(project: string, prefix: string): Rule;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CoerceOpenApiProject = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
|
-
function CoerceOpenApiProject(project) {
|
|
6
|
+
function CoerceOpenApiProject(project, prefix) {
|
|
7
7
|
return (host) => {
|
|
8
8
|
const angularJson = schematics_utilities_1.GetAngularJson(host);
|
|
9
9
|
if (!angularJson.projects.hasOwnProperty(project)) {
|
|
@@ -11,7 +11,8 @@ function CoerceOpenApiProject(project) {
|
|
|
11
11
|
return schematics_1.chain([
|
|
12
12
|
schematics_1.externalSchematic('@nrwl/angular', 'library', {
|
|
13
13
|
name: project,
|
|
14
|
-
importPath: `@${defaultProjectPrefix}/${project}
|
|
14
|
+
importPath: `@${defaultProjectPrefix}/${project}`,
|
|
15
|
+
prefix
|
|
15
16
|
}),
|
|
16
17
|
(tree) => {
|
|
17
18
|
var _a, _b, _c, _d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-open-api-project.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/schematics/open-api/coerce-open-api-project.ts"],"names":[],"mappings":";;;AAAA,2DAMoC;AACpC,qEAA4D;AAE5D,SAAgB,oBAAoB,CAAC,OAAe;
|
|
1
|
+
{"version":3,"file":"coerce-open-api-project.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/schematics/open-api/coerce-open-api-project.ts"],"names":[],"mappings":";;;AAAA,2DAMoC;AACpC,qEAA4D;AAE5D,SAAgB,oBAAoB,CAAC,OAAe,EAAE,MAAc;IAClE,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,WAAW,GAAG,qCAAc,CAAC,IAAI,CAAQ,CAAC;QAEhD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACjD,MAAM,oBAAoB,GAClB,WAAW,CAAC,QAAQ,CAAE,WAAW,CAAC,cAAc,CAAE,CAAC,MAAM,CAAC;YAClE,OAAO,kBAAK,CAAC;gBACX,8BAAiB,CAAC,eAAe,EAAE,SAAS,EAAE;oBAC5C,IAAI,EAAQ,OAAO;oBACnB,UAAU,EAAE,IAAI,oBAAoB,IAAI,OAAO,EAAE;oBACjD,MAAM;iBACP,CAAC;gBACF,CAAC,IAAI,EAAE,EAAE;;oBACP,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAC7B,MAAA,MAAA,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,0CAAE,QAAQ,EAAE,mCAAI,IAAI,CACrD,CAAC;oBAEF,MAAM,KAAK,GAAG,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,eAAe,0CAAE,KAAK,mCAAI,EAAE,CAAC;oBAEzD,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE;wBAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;4BACpC,IAAI,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;gCAC5B,OAAO,KAAK,CAAE,GAAG,CAAE,CAAC;gCACpB,KAAK,CAAE,GAAG,GAAG,IAAI,CAAE,GAAG,CAAE,yBAAyB,CAAE,CAAC;6BACrD;yBACF;wBAED,IAAI,CAAC,SAAS,CACZ,qBAAqB,EACrB,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,CAC3C,CAAC;qBACH;gBACH,CAAC;aACF,CAAC,CAAC;SACJ;QAED,OAAO,iBAAI,EAAE,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAvCD,oDAuCC"}
|
|
@@ -13,7 +13,7 @@ const const_1 = require("./const");
|
|
|
13
13
|
const coerce_open_api_project_1 = require("./coerce-open-api-project");
|
|
14
14
|
function default_1(options) {
|
|
15
15
|
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
var _a;
|
|
16
|
+
var _a, _b;
|
|
17
17
|
const openapi = yield schematics_open_api_1.LoadOpenApiConfig(host, options);
|
|
18
18
|
const project = new ts_morph_1.Project({
|
|
19
19
|
manipulationSettings: {
|
|
@@ -28,7 +28,7 @@ function default_1(options) {
|
|
|
28
28
|
}
|
|
29
29
|
const projectBasePath = path_1.join('libs', options.project, 'src');
|
|
30
30
|
const basePath = path_1.join(projectBasePath, 'lib');
|
|
31
|
-
options.prefix = (_a = options.prefix) !== null && _a !== void 0 ? _a : schematics_utilities_1.GetProjectPrefix(host, options.project);
|
|
31
|
+
options.prefix = (_b = (_a = options.prefix) !== null && _a !== void 0 ? _a : (schematics_utilities_1.HasProject(host, options.project) ? schematics_utilities_1.GetProjectPrefix(host, options.project) : schematics_utilities_1.GetDefaultPrefix(host))) !== null && _b !== void 0 ? _b : 'rxap';
|
|
32
32
|
if (!options.debug) {
|
|
33
33
|
// TODO : reset the hack after the schematic execution is finished
|
|
34
34
|
console.debug = function () { };
|
|
@@ -42,7 +42,7 @@ function default_1(options) {
|
|
|
42
42
|
const_1.DATA_SOURCE_BASE_PATH,
|
|
43
43
|
const_1.REMOTE_METHOD_BASE_PATH
|
|
44
44
|
], basePath),
|
|
45
|
-
coerce_open_api_project_1.CoerceOpenApiProject(options.project),
|
|
45
|
+
coerce_open_api_project_1.CoerceOpenApiProject(options.project, options.prefix),
|
|
46
46
|
() => schematics_open_api_1.GenerateOperation(openapi, project, options, [
|
|
47
47
|
generate_data_source_1.GenerateDataSource,
|
|
48
48
|
generate_remote_method_1.GenerateRemoteMethod
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/schematics/open-api/index.ts"],"names":[],"mappings":";;;AAAA,2DAIoC;AACpC,+BAA4B;AAC5B,uCAIkB;AAClB,mEAGmC;AACnC,mEASmC;AAEnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/schematics/open-api/index.ts"],"names":[],"mappings":";;;AAAA,2DAIoC;AACpC,+BAA4B;AAC5B,uCAIkB;AAClB,mEAGmC;AACnC,mEASmC;AAEnC,qEAKoC;AACpC,qEAAgE;AAChE,iEAA4D;AAC5D,mCAGiB;AACjB,uEAAiE;AAEjE,mBAAwB,OAAsB;IAC5C,OAAO,CAAO,IAAU,EAAE,EAAE;;QAC1B,MAAM,OAAO,GAAG,MAAM,uCAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvD,MAAM,OAAO,GAAG,IAAI,kBAAO,CAAC;YAC1B,oBAAoB,EAAG;gBACrB,eAAe,EAAI,0BAAe,CAAC,SAAS;gBAC5C,SAAS,EAAU,oBAAS,CAAC,MAAM;gBACnC,iBAAiB,EAAE,IAAI;aACxB;YACD,qBAAqB,EAAE,IAAI;SAC5B,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC;SAC9B;QAED,MAAM,eAAe,GAAG,WAAI,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,WAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAE9C,OAAO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