@rxap/open-api 16.0.0-dev.2 → 16.0.0-dev.20
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/CHANGELOG.md +738 -0
- package/LICENSE +621 -21
- package/LICENSE.md +621 -0
- package/README.md +8 -33
- package/data-source/index.d.ts +5 -0
- package/data-source/lib/error.d.ts +4 -0
- package/data-source/lib/open-api-data-source.loader.d.ts +12 -0
- package/data-source/lib/open-api.data-source.d.ts +40 -0
- package/data-source/table/index.d.ts +4 -0
- package/data-source/table/lib/error.d.ts +4 -0
- package/data-source/table/lib/open-api-table.data-source.d.ts +29 -0
- package/data-source/table/lib/to-open-api-table-data-source.pipe.d.ts +17 -0
- package/data-source/table/lib/tokens.d.ts +2 -0
- package/esm2022/data-source/index.mjs +6 -0
- package/esm2022/data-source/lib/error.mjs +8 -0
- package/esm2022/data-source/lib/open-api-data-source.loader.mjs +36 -0
- package/esm2022/data-source/lib/open-api.data-source.mjs +154 -0
- package/esm2022/data-source/rxap-open-api-data-source.mjs +5 -0
- package/esm2022/data-source/table/index.mjs +5 -0
- package/esm2022/data-source/table/lib/error.mjs +8 -0
- package/esm2022/data-source/table/lib/open-api-table.data-source.mjs +131 -0
- package/esm2022/data-source/table/lib/to-open-api-table-data-source.pipe.mjs +29 -0
- package/esm2022/data-source/table/lib/tokens.mjs +3 -0
- package/esm2022/data-source/table/rxap-open-api-data-source-table.mjs +5 -0
- package/esm2022/index.mjs +2 -1
- package/esm2022/lib/error.mjs +1 -1
- package/esm2022/lib/open-api-config.service.mjs +41 -33
- package/esm2022/lib/open-api-http-response.error.mjs +7 -7
- package/esm2022/lib/open-api-init.mjs +27 -0
- package/esm2022/lib/open-api.meta-data.mjs +1 -1
- package/esm2022/lib/open-api.mjs +1 -1
- package/esm2022/lib/schema-validation.mixin.mjs +31 -16
- package/esm2022/lib/tokens.mjs +9 -3
- package/esm2022/lib/utilities.mjs +1 -1
- package/esm2022/remote-method/index.mjs +5 -0
- package/esm2022/remote-method/lib/error.mjs +1 -1
- package/esm2022/remote-method/lib/get-page-adapter.factory.mjs +60 -0
- package/esm2022/remote-method/lib/open-api-remote-method.loader.mjs +7 -8
- package/esm2022/remote-method/lib/open-api.remote-method.mjs +67 -54
- package/esm2022/remote-method/rxap-open-api-remote-method.mjs +2 -2
- package/esm2022/rxap-open-api.mjs +1 -1
- package/fesm2022/rxap-open-api-data-source-table.mjs +172 -0
- package/fesm2022/rxap-open-api-data-source-table.mjs.map +1 -0
- package/fesm2022/rxap-open-api-data-source.mjs +198 -0
- package/fesm2022/rxap-open-api-data-source.mjs.map +1 -0
- package/fesm2022/rxap-open-api-remote-method.mjs +126 -53
- package/fesm2022/rxap-open-api-remote-method.mjs.map +1 -1
- package/fesm2022/rxap-open-api.mjs +107 -50
- package/fesm2022/rxap-open-api.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/open-api-config.service.d.ts +9 -7
- package/lib/open-api-http-response.error.d.ts +1 -1
- package/lib/open-api-init.d.ts +6 -0
- package/lib/schema-validation.mixin.d.ts +4 -4
- package/package.json +80 -56
- package/remote-method/index.d.ts +4 -5
- package/remote-method/lib/get-page-adapter.factory.d.ts +29 -0
- package/remote-method/lib/open-api.remote-method.d.ts +5 -6
- package/theme.css +1 -0
- package/collection.json +0 -15
- package/esm2022/remote-method/public_api.mjs +0 -4
- package/migration.json +0 -4
- package/remote-method/public_api.d.ts +0 -3
- package/src/schematics/ng-add/index.d.ts +0 -2
- package/src/schematics/ng-add/index.js +0 -8
- package/src/schematics/ng-add/index.js.map +0 -1
- package/src/schematics/ng-add/schema.json +0 -7
- package/src/schematics/open-api/coerce-open-api-project.d.ts +0 -5
- package/src/schematics/open-api/coerce-open-api-project.js +0 -53
- package/src/schematics/open-api/coerce-open-api-project.js.map +0 -1
- package/src/schematics/open-api/const.d.ts +0 -4
- package/src/schematics/open-api/const.js +0 -8
- package/src/schematics/open-api/const.js.map +0 -1
- package/src/schematics/open-api/create-directive.d.ts +0 -2
- package/src/schematics/open-api/create-directive.js +0 -308
- package/src/schematics/open-api/create-directive.js.map +0 -1
- package/src/schematics/open-api/generate-openapi-provider.d.ts +0 -3
- package/src/schematics/open-api/generate-openapi-provider.js +0 -41
- package/src/schematics/open-api/generate-openapi-provider.js.map +0 -1
- package/src/schematics/open-api/generate-remote-method.d.ts +0 -3
- package/src/schematics/open-api/generate-remote-method.js +0 -173
- package/src/schematics/open-api/generate-remote-method.js.map +0 -1
- package/src/schematics/open-api/index.d.ts +0 -3
- package/src/schematics/open-api/index.js +0 -93
- package/src/schematics/open-api/index.js.map +0 -1
- package/src/schematics/open-api/options.d.ts +0 -14
- package/src/schematics/open-api/options.js +0 -3
- package/src/schematics/open-api/options.js.map +0 -1
- package/src/schematics/open-api/schema.json +0 -116
package/package.json
CHANGED
|
@@ -1,67 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "16.0.0-dev.20",
|
|
2
3
|
"name": "@rxap/open-api",
|
|
3
|
-
"version": "16.0.0-dev.2",
|
|
4
|
-
"private": false,
|
|
5
|
-
"author": "Merzough Münker",
|
|
6
|
-
"homepage": "https://gitlab.com/rxap/packages/libs/open-api",
|
|
7
|
-
"repository": "git@gitlab.com:rxap/packages.git",
|
|
8
|
-
"keywords": [
|
|
9
|
-
"rxap",
|
|
10
|
-
"remote-method",
|
|
11
|
-
"data-source",
|
|
12
|
-
"open-api",
|
|
13
|
-
"angular"
|
|
14
|
-
],
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
18
|
-
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
19
|
-
},
|
|
20
4
|
"description": "Provides the functionality to create DataSource and RemoteMethod instances from an OpenAPI config.",
|
|
5
|
+
"license": "GPL-3.0-or-later",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"ajv": "8.12.0",
|
|
8
|
+
"openapi-types": "10.0.0",
|
|
9
|
+
"tslib": "2.6.2"
|
|
10
|
+
},
|
|
21
11
|
"peerDependencies": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"@angular/common": "
|
|
25
|
-
"@angular/core": "
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@rxap/
|
|
30
|
-
"@rxap/definition": "^16.0.0-dev.1",
|
|
31
|
-
"@rxap/mixin": "^16.0.0-dev.1",
|
|
32
|
-
"@rxap/remote-method": "^16.0.0-dev.1",
|
|
33
|
-
"@rxap/utilities": "^16.0.0-dev.1",
|
|
34
|
-
"reflect-metadata": "^0.1.13",
|
|
35
|
-
"rxjs": "^6.6.0"
|
|
12
|
+
"ajv": "8.12.0",
|
|
13
|
+
"openapi-types": "10.0.0",
|
|
14
|
+
"@angular/common": "16.1.4",
|
|
15
|
+
"@angular/core": "16.1.4",
|
|
16
|
+
"@rxap/data-source": "16.0.0-dev.16",
|
|
17
|
+
"@rxap/mixin": "16.0.0-dev.13",
|
|
18
|
+
"@rxap/remote-method": "16.0.0-dev.14",
|
|
19
|
+
"@rxap/config": "16.0.0-dev.14"
|
|
36
20
|
},
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@rxap/schematics-utilities": "^16.0.0-dev.1",
|
|
41
|
-
"ajv-oai": "^1.2.1",
|
|
42
|
-
"openapi-types": "^10.0.0",
|
|
43
|
-
"ts-morph": "^13.0.3",
|
|
44
|
-
"tslib": "^2.3.1"
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Merzough Münker",
|
|
23
|
+
"email": "mmuenker@digitaix.com"
|
|
45
24
|
},
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
"
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
27
|
+
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https:/gitlab.com/rxap/packages/packages/angular/open-api",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"angular",
|
|
32
|
+
"angular-open-api",
|
|
33
|
+
"ngx",
|
|
34
|
+
"open-api",
|
|
35
|
+
"packages",
|
|
36
|
+
"rxap"
|
|
37
|
+
],
|
|
38
|
+
"nx-migrations": {
|
|
49
39
|
"packageGroup": [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
{
|
|
41
|
+
"package": "@rxap/config",
|
|
42
|
+
"version": "16.0.0-dev.13"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"package": "@rxap/data-source",
|
|
46
|
+
"version": "16.0.0-dev.15"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"package": "@rxap/mixin",
|
|
50
|
+
"version": "16.0.0-dev.12"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"package": "@rxap/remote-method",
|
|
54
|
+
"version": "16.0.0-dev.13"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"package": "@rxap/rxjs",
|
|
58
|
+
"version": "1.0.1-dev.8"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"package": "@rxap/utilities",
|
|
62
|
+
"version": "16.0.0-dev.16"
|
|
63
|
+
}
|
|
56
64
|
]
|
|
57
65
|
},
|
|
58
66
|
"publishConfig": {
|
|
59
|
-
"
|
|
60
|
-
"
|
|
67
|
+
"access": "public",
|
|
68
|
+
"directory": "../../../dist/packages/angular/open-api"
|
|
61
69
|
},
|
|
62
|
-
"
|
|
63
|
-
"
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "https://gitlab.com/rxap/packages.git",
|
|
73
|
+
"directory": "packages/angular/open-api"
|
|
64
74
|
},
|
|
75
|
+
"sideEffects": false,
|
|
76
|
+
"gitHead": "6679f090af3b55900bfeb02de0ed8f1febfdbb8b",
|
|
65
77
|
"module": "fesm2022/rxap-open-api.mjs",
|
|
66
78
|
"typings": "index.d.ts",
|
|
67
79
|
"exports": {
|
|
@@ -74,12 +86,24 @@
|
|
|
74
86
|
"esm": "./esm2022/rxap-open-api.mjs",
|
|
75
87
|
"default": "./fesm2022/rxap-open-api.mjs"
|
|
76
88
|
},
|
|
89
|
+
"./data-source": {
|
|
90
|
+
"types": "./data-source/index.d.ts",
|
|
91
|
+
"esm2022": "./esm2022/data-source/rxap-open-api-data-source.mjs",
|
|
92
|
+
"esm": "./esm2022/data-source/rxap-open-api-data-source.mjs",
|
|
93
|
+
"default": "./fesm2022/rxap-open-api-data-source.mjs"
|
|
94
|
+
},
|
|
77
95
|
"./remote-method": {
|
|
78
96
|
"types": "./remote-method/index.d.ts",
|
|
79
97
|
"esm2022": "./esm2022/remote-method/rxap-open-api-remote-method.mjs",
|
|
80
98
|
"esm": "./esm2022/remote-method/rxap-open-api-remote-method.mjs",
|
|
81
99
|
"default": "./fesm2022/rxap-open-api-remote-method.mjs"
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
},
|
|
101
|
+
"./data-source/table": {
|
|
102
|
+
"types": "./data-source/table/index.d.ts",
|
|
103
|
+
"esm2022": "./esm2022/data-source/table/rxap-open-api-data-source-table.mjs",
|
|
104
|
+
"esm": "./esm2022/data-source/table/rxap-open-api-data-source-table.mjs",
|
|
105
|
+
"default": "./fesm2022/rxap-open-api-data-source-table.mjs"
|
|
106
|
+
},
|
|
107
|
+
"./theme": "./theme.css"
|
|
108
|
+
}
|
|
109
|
+
}
|
package/remote-method/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './public_api';
|
|
1
|
+
export * from './lib/open-api-remote-method.loader';
|
|
2
|
+
export * from './lib/open-api.remote-method';
|
|
3
|
+
export * from './lib/error';
|
|
4
|
+
export * from './lib/get-page-adapter.factory';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseRemoteMethod } from '@rxap/remote-method';
|
|
2
|
+
import { TableEvent } from '@rxap/data-source/table';
|
|
3
|
+
import type { OpenApiRemoteMethod } from './open-api.remote-method';
|
|
4
|
+
import { PaginatorLike } from '@rxap/data-source/pagination';
|
|
5
|
+
export interface GetPageRemoteMethodParameters {
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
pageSize: number;
|
|
8
|
+
sortBy?: string;
|
|
9
|
+
sortDirection?: 'desc' | 'asc' | undefined | '';
|
|
10
|
+
filter: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetPageResponse<Data extends Record<string, any>> extends GetPageRemoteMethodParameters {
|
|
13
|
+
total: number;
|
|
14
|
+
rows: Data[];
|
|
15
|
+
}
|
|
16
|
+
export interface GetPageAdapterDefaultOptions {
|
|
17
|
+
sortBy?: string;
|
|
18
|
+
sortDirection?: 'asc' | 'desc';
|
|
19
|
+
}
|
|
20
|
+
export declare class GetPageAdapterRemoteMethod<Data extends Record<string, any>> extends BaseRemoteMethod<Data[], TableEvent> {
|
|
21
|
+
private readonly remoteMethod;
|
|
22
|
+
private readonly paginator?;
|
|
23
|
+
private readonly options?;
|
|
24
|
+
constructor(remoteMethod: OpenApiRemoteMethod<GetPageResponse<Data>, GetPageRemoteMethodParameters>, paginator?: PaginatorLike | undefined, options?: GetPageAdapterDefaultOptions | undefined);
|
|
25
|
+
static BuildFilter(filterEvent?: string | Record<string, any> | null): string[];
|
|
26
|
+
protected _call(event: TableEvent): Promise<Data[]>;
|
|
27
|
+
}
|
|
28
|
+
export declare function GetPageAdapterFactory(remoteMethod: OpenApiRemoteMethod, paginator?: PaginatorLike): GetPageAdapterRemoteMethod<Record<string, any>>;
|
|
29
|
+
export declare function GetPageAdapterFactoryWithOptions(options?: GetPageAdapterDefaultOptions): (remoteMethod: OpenApiRemoteMethod, paginator?: PaginatorLike) => GetPageAdapterRemoteMethod<Record<string, any>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { HttpClient, HttpResponse } from '@angular/common/http';
|
|
3
|
-
import {
|
|
3
|
+
import { OpenApiConfigService, OpenApiMetaData, OperationObjectWithMetadata, SchemaValidationMixin } from '@rxap/open-api';
|
|
4
4
|
import { BaseHttpRemoteMethod } from '@rxap/remote-method/http';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export interface OperationForMetadata {
|
|
@@ -24,8 +24,7 @@ export interface OperationFromMetadataInline {
|
|
|
24
24
|
}
|
|
25
25
|
export declare function IsOperationFromMetadataInline(metadata: OperationForMetadata | OperationFromMetadataInline): metadata is OperationFromMetadataInline;
|
|
26
26
|
export declare function RxapOpenApiRemoteMethod(operationOrId: string | OperationForMetadata | OperationFromMetadataInline, serverIndex?: number): (target: any) => void;
|
|
27
|
-
export
|
|
28
|
-
}
|
|
27
|
+
export type OpenApiRemoteMethodMetadata = OpenApiMetaData;
|
|
29
28
|
export interface OpenApiRemoteMethodParameter<Parameters extends Record<string, any> | void = any, RequestBody = any> {
|
|
30
29
|
parameters?: Parameters;
|
|
31
30
|
requestBody?: RequestBody;
|
|
@@ -33,17 +32,17 @@ export interface OpenApiRemoteMethodParameter<Parameters extends Record<string,
|
|
|
33
32
|
export interface OpenApiRemoteMethod<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> extends SchemaValidationMixin<Response, Parameters, RequestBody> {
|
|
34
33
|
}
|
|
35
34
|
export declare class OpenApiRemoteMethod<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> extends BaseHttpRemoteMethod<Response, any, OpenApiRemoteMethodParameter<Parameters, RequestBody>> {
|
|
36
|
-
get operation(): OperationObjectWithMetadata;
|
|
37
|
-
private readonly strict;
|
|
38
35
|
protected readonly disableSchemaValidation: boolean;
|
|
39
36
|
protected readonly disableValidation: boolean;
|
|
37
|
+
private readonly strict;
|
|
40
38
|
constructor(http: HttpClient, injector: Injector, openApiConfigService: OpenApiConfigService, metadata?: OpenApiRemoteMethodMetadata | null, strict?: boolean | null, disableSchemaValidation?: boolean | null, disableValidation?: boolean | null);
|
|
41
|
-
|
|
39
|
+
get operation(): OperationObjectWithMetadata;
|
|
42
40
|
/**
|
|
43
41
|
* Instead of returning the response body the full response object is returned
|
|
44
42
|
*/
|
|
45
43
|
callWithResponse(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<HttpResponse<Response>>;
|
|
46
44
|
_callWithResponse(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<HttpResponse<Response>>;
|
|
45
|
+
protected _call(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<Response>;
|
|
47
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiRemoteMethod<any, any, any>, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
48
47
|
static ɵprov: i0.ɵɵInjectableDeclaration<OpenApiRemoteMethod<any, any, any>>;
|
|
49
48
|
}
|
package/theme.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.contents{display:contents}.hidden{display:none}.w-full{width:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.gap-8{gap:2rem}.p-10{padding:2.5rem}.capitalize{text-transform:capitalize}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}
|
package/collection.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schematics": {
|
|
3
|
-
"ng-add": {
|
|
4
|
-
"description": "Setup the package @rxap/open-api for the workspace.",
|
|
5
|
-
"factory": "./src/schematics/ng-add/index",
|
|
6
|
-
"schema": "./src/schematics/ng-add/schema.json"
|
|
7
|
-
},
|
|
8
|
-
"generate": {
|
|
9
|
-
"description": "Generates for each operation a remote method or data source",
|
|
10
|
-
"factory": "./src/schematics/open-api/index",
|
|
11
|
-
"schema": "./src/schematics/open-api/schema.json"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json"
|
|
15
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './lib/open-api-remote-method.loader';
|
|
2
|
-
export * from './lib/open-api.remote-method';
|
|
3
|
-
export * from './lib/error';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvb3Blbi1hcGkvcmVtb3RlLW1ldGhvZC9zcmMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFDQUFxQyxDQUFDO0FBQ3BELGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxhQUFhLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9vcGVuLWFwaS1yZW1vdGUtbWV0aG9kLmxvYWRlcic7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9vcGVuLWFwaS5yZW1vdGUtbWV0aG9kJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Vycm9yJztcbiJdfQ==
|
package/migration.json
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
4
|
-
function default_1() {
|
|
5
|
-
return (0, schematics_utilities_1.InstallPeerDependencies)();
|
|
6
|
-
}
|
|
7
|
-
exports.default = default_1;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,qEAAqE;AAErE;IACE,OAAO,IAAA,8CAAuB,GAAE,CAAC;AACnC,CAAC;AAFD,4BAEC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoerceOpenApiProject = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated use function from the @rxap/schematics-utilities package
|
|
8
|
-
*/
|
|
9
|
-
function CoerceOpenApiProject(project, prefix, directory) {
|
|
10
|
-
return (host) => {
|
|
11
|
-
const angularJson = (0, schematics_utilities_1.GetAngularJson)(host);
|
|
12
|
-
const projectName = `${directory ? directory.split('/').join('-') + '-' : ''}${project}`;
|
|
13
|
-
if (!angularJson.projects.hasOwnProperty(projectName)) {
|
|
14
|
-
const defaultProject = angularJson.projects[angularJson.defaultProject];
|
|
15
|
-
const defaultProjectPrefix = prefix !== null && prefix !== void 0 ? prefix : defaultProject.prefix;
|
|
16
|
-
return (0, schematics_1.chain)([
|
|
17
|
-
(0, schematics_1.externalSchematic)('@nx/angular', 'library', {
|
|
18
|
-
name: project,
|
|
19
|
-
importPath: `@${defaultProjectPrefix}/${projectName}`,
|
|
20
|
-
prefix,
|
|
21
|
-
directory,
|
|
22
|
-
}),
|
|
23
|
-
(tree) => {
|
|
24
|
-
var _a, _b, _c, _d;
|
|
25
|
-
const baseTsconfig = JSON.parse((_b = (_a = tree.read('/tsconfig.base.json')) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '{}');
|
|
26
|
-
const paths = (_d = (_c = baseTsconfig === null || baseTsconfig === void 0 ? void 0 : baseTsconfig.compilerOptions) === null || _c === void 0 ? void 0 : _c.paths) !== null && _d !== void 0 ? _d : {};
|
|
27
|
-
if (Object.keys(paths).length) {
|
|
28
|
-
for (const key of Object.keys(paths)) {
|
|
29
|
-
if (directory) {
|
|
30
|
-
if (key.match(new RegExp(`\/${directory.split('/').join('-')}-${project}$`))) {
|
|
31
|
-
delete paths[key];
|
|
32
|
-
paths[key + '/*'] = [
|
|
33
|
-
`libs/${directory}/${project}/src/lib/*`,
|
|
34
|
-
];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
if (key.match(new RegExp(`\/${project}$`))) {
|
|
39
|
-
delete paths[key];
|
|
40
|
-
paths[key + '/*'] = [`libs/${project}/src/lib/*`];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
tree.overwrite('/tsconfig.base.json', JSON.stringify(baseTsconfig, undefined, 2));
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
]);
|
|
48
|
-
}
|
|
49
|
-
return (0, schematics_1.noop)();
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
exports.CoerceOpenApiProject = CoerceOpenApiProject;
|
|
53
|
-
//# sourceMappingURL=coerce-open-api-project.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,qEAAuE;AAEvE;;GAEG;AACH,SAAgB,oBAAoB,CAClC,OAAe,EACf,MAAc,EACd,SAAkB;IAElB,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,WAAW,GAAG,IAAA,qCAAc,EAAC,IAAI,CAAQ,CAAC;QAEhD,MAAM,WAAW,GAAG,GAClB,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EACrD,GAAG,OAAO,EAAE,CAAC;QAEb,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;YACrD,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;YACxE,MAAM,oBAAoB,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,cAAc,CAAC,MAAM,CAAC;YAC7D,OAAO,IAAA,kBAAK,EAAC;gBACX,IAAA,8BAAiB,EAAC,aAAa,EAAE,SAAS,EAAE;oBAC1C,IAAI,EAAE,OAAO;oBACb,UAAU,EAAE,IAAI,oBAAoB,IAAI,WAAW,EAAE;oBACrD,MAAM;oBACN,SAAS;iBACV,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,SAAS,EAAE;gCACb,IACE,GAAG,CAAC,KAAK,CACP,IAAI,MAAM,CACR,KAAK,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,CAClD,CACF,EACD;oCACA,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;oCAClB,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG;wCAClB,QAAQ,SAAS,IAAI,OAAO,YAAY;qCACzC,CAAC;iCACH;6BACF;iCAAM;gCACL,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE;oCAC1C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;oCAClB,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,OAAO,YAAY,CAAC,CAAC;iCACnD;6BACF;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,IAAA,iBAAI,GAAE,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AA/DD,oDA+DC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REMOTE_METHOD_FILE_SUFFIX = exports.REMOTE_METHOD_BASE_PATH = exports.DATA_SOURCE_FILE_SUFFIX = exports.DATA_SOURCE_BASE_PATH = void 0;
|
|
4
|
-
exports.DATA_SOURCE_BASE_PATH = 'data-sources';
|
|
5
|
-
exports.DATA_SOURCE_FILE_SUFFIX = 'data-source';
|
|
6
|
-
exports.REMOTE_METHOD_BASE_PATH = 'remote-methods';
|
|
7
|
-
exports.REMOTE_METHOD_FILE_SUFFIX = 'remote-method';
|
|
8
|
-
//# sourceMappingURL=const.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../../../libs/open-api/src/schematics/open-api/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAO,cAAc,CAAC;AAC3C,QAAA,uBAAuB,GAAK,aAAa,CAAC;AAC1C,QAAA,uBAAuB,GAAK,gBAAgB,CAAC;AAC7C,QAAA,yBAAyB,GAAG,eAAe,CAAC"}
|