@rxap/schematics-ts-morph 18.1.4-dev.0 → 18.2.0-dev.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/CHANGELOG.md +10 -0
- package/package.json +4 -4
- package/src/lib/angular/coerce-dialog-table-action-component.d.ts +1 -1
- package/src/lib/angular/coerce-dialog-table-action-component.js +10 -13
- package/src/lib/angular/coerce-dialog-table-action-component.js.map +1 -1
- package/src/lib/angular/coerce-open-api-table-action.js +9 -10
- package/src/lib/angular/coerce-open-api-table-action.js.map +1 -1
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js +9 -9
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js +2 -2
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js.map +1 -1
- package/src/lib/nest/operation-id-utilities.d.ts +0 -36
- package/src/lib/nest/operation-id-utilities.js +1 -103
- package/src/lib/nest/operation-id-utilities.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [18.2.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@18.1.4-dev.1...@rxap/schematics-ts-morph@18.2.0-dev.0) (2024-08-15)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- update to buildable open api client sdk ([5407e3a](https://gitlab.com/rxap/packages/commit/5407e3ae0bf77d5321d910b07d9b9316fbbd2b78))
|
|
11
|
+
|
|
12
|
+
## [18.1.4-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@18.1.4-dev.0...@rxap/schematics-ts-morph@18.1.4-dev.1) (2024-08-12)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @rxap/schematics-ts-morph
|
|
15
|
+
|
|
6
16
|
## [18.1.4-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@18.1.3...@rxap/schematics-ts-morph@18.1.4-dev.0) (2024-08-12)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rxap/schematics-ts-morph
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "18.
|
|
2
|
+
"version": "18.2.0-dev.0",
|
|
3
3
|
"name": "@rxap/schematics-ts-morph",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"@angular-devkit/schematics": "18.0.7",
|
|
8
8
|
"@nx/devkit": "19.4.2",
|
|
9
9
|
"@rxap/schematics-utilities": "^18.0.5",
|
|
10
|
-
"@rxap/ts-morph": "^1.
|
|
10
|
+
"@rxap/ts-morph": "^1.5.0-dev.0",
|
|
11
11
|
"@rxap/utilities": "^16.3.0",
|
|
12
|
-
"@rxap/workspace-ts-morph": "^19.1.4-dev.
|
|
12
|
+
"@rxap/workspace-ts-morph": "^19.1.4-dev.2",
|
|
13
13
|
"@rxap/workspace-utilities": "^19.4.0",
|
|
14
14
|
"colors": "1.4.0",
|
|
15
15
|
"handlebars": "4.7.8",
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
"directory": "packages/schematic/ts-morph"
|
|
45
45
|
},
|
|
46
46
|
"type": "commonjs",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "6dffe27d523b5d32b75ed9931e95ad5c7310d74b",
|
|
48
48
|
"main": "./src/index.js"
|
|
49
49
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TsMorphAngularProjectTransformOptions } from '../ts-morph-transform';
|
|
2
1
|
import { CoerceDialogComponentOptions } from './coerce-dialog-component';
|
|
2
|
+
import { TsMorphAngularProjectTransformOptions } from '@rxap/workspace-ts-morph';
|
|
3
3
|
export interface CoerceDialogTableActionComponentOptions extends CoerceDialogComponentOptions, TsMorphAngularProjectTransformOptions {
|
|
4
4
|
operationId: string;
|
|
5
5
|
tableName: string;
|
|
@@ -3,10 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CoerceDialogTableActionComponentRule = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
5
|
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
-
const coerce_class_constructor_1 = require("../coerce-class-constructor");
|
|
7
|
-
const coerce_class_method_1 = require("../coerce-class-method");
|
|
8
6
|
const operation_id_utilities_1 = require("../nest/operation-id-utilities");
|
|
9
|
-
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
10
7
|
const coerce_parameter_declaration_1 = require("../ts-morph/coerce-parameter-declaration");
|
|
11
8
|
const add_component_import_1 = require("./add-component-import");
|
|
12
9
|
const coerce_dialog_component_1 = require("./coerce-dialog-component");
|
|
@@ -31,7 +28,7 @@ function CoerceDialogTableActionComponentRule(options) {
|
|
|
31
28
|
overwrite,
|
|
32
29
|
template,
|
|
33
30
|
coerceSubmitMethod: (classDeclaration) => {
|
|
34
|
-
(0,
|
|
31
|
+
(0, ts_morph_1.CoerceClassMethod)(classDeclaration, 'submit', {
|
|
35
32
|
isAsync: true,
|
|
36
33
|
statements: [
|
|
37
34
|
'this.loading$.enable();',
|
|
@@ -48,12 +45,12 @@ function CoerceDialogTableActionComponentRule(options) {
|
|
|
48
45
|
},
|
|
49
46
|
tsMorphTransform: (project, [componentSourceFile], [componentClass]) => {
|
|
50
47
|
(0, add_component_import_1.AddComponentImport)(componentSourceFile, 'MatSnackBarModule', '@angular/material/snack-bar');
|
|
51
|
-
const [constructorDeclaration] = (0,
|
|
48
|
+
const [constructorDeclaration] = (0, ts_morph_1.CoerceClassConstructor)(componentClass);
|
|
52
49
|
(0, coerce_parameter_declaration_1.CoerceParameterDeclaration)(constructorDeclaration, 'method').set({
|
|
53
50
|
isReadonly: true,
|
|
54
51
|
type: (0, operation_id_utilities_1.OperationIdToClassName)(operationId),
|
|
55
52
|
});
|
|
56
|
-
(0,
|
|
53
|
+
(0, ts_morph_1.CoerceImports)(componentSourceFile, {
|
|
57
54
|
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToClassImportPath)(operationId, scope),
|
|
58
55
|
namedImports: [(0, operation_id_utilities_1.OperationIdToClassName)(operationId)],
|
|
59
56
|
});
|
|
@@ -61,7 +58,7 @@ function CoerceDialogTableActionComponentRule(options) {
|
|
|
61
58
|
isReadonly: true,
|
|
62
59
|
type: 'MatSnackBar',
|
|
63
60
|
});
|
|
64
|
-
(0,
|
|
61
|
+
(0, ts_morph_1.CoerceImports)(componentSourceFile, {
|
|
65
62
|
moduleSpecifier: '@angular/material/snack-bar',
|
|
66
63
|
namedImports: ['MatSnackBar'],
|
|
67
64
|
});
|
|
@@ -69,7 +66,7 @@ function CoerceDialogTableActionComponentRule(options) {
|
|
|
69
66
|
isReadonly: true,
|
|
70
67
|
type: `I${(0, schematics_utilities_1.classify)(tableName)}`,
|
|
71
68
|
});
|
|
72
|
-
(0,
|
|
69
|
+
(0, ts_morph_1.CoerceImports)(componentSourceFile, [
|
|
73
70
|
{
|
|
74
71
|
moduleSpecifier: `../${tableName}`,
|
|
75
72
|
namedImports: [`I${(0, schematics_utilities_1.classify)(tableName)}`],
|
|
@@ -79,7 +76,7 @@ function CoerceDialogTableActionComponentRule(options) {
|
|
|
79
76
|
isReadonly: true,
|
|
80
77
|
type: `MatDialogRef<any>`,
|
|
81
78
|
});
|
|
82
|
-
(0,
|
|
79
|
+
(0, ts_morph_1.CoerceImports)(componentSourceFile, [
|
|
83
80
|
{
|
|
84
81
|
moduleSpecifier: '@angular/material/dialog',
|
|
85
82
|
namedImports: ['MatDialogRef'],
|
|
@@ -87,12 +84,12 @@ function CoerceDialogTableActionComponentRule(options) {
|
|
|
87
84
|
]);
|
|
88
85
|
(0, ts_morph_1.CoercePropertyDeclaration)(componentClass, 'state', {
|
|
89
86
|
initializer: '{} as any',
|
|
90
|
-
type: (0,
|
|
87
|
+
type: (0, ts_morph_1.OperationIdToRequestBodyClassName)(operationId),
|
|
91
88
|
});
|
|
92
|
-
(0,
|
|
89
|
+
(0, ts_morph_1.CoerceImports)(componentSourceFile, [
|
|
93
90
|
{
|
|
94
|
-
moduleSpecifier: (0,
|
|
95
|
-
namedImports: [(0,
|
|
91
|
+
moduleSpecifier: (0, ts_morph_1.OperationIdToRequestBodyClassImportPath)(operationId, scope),
|
|
92
|
+
namedImports: [(0, ts_morph_1.OperationIdToRequestBodyClassName)(operationId)],
|
|
96
93
|
},
|
|
97
94
|
]);
|
|
98
95
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-dialog-table-action-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-dialog-table-action-component.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,
|
|
1
|
+
{"version":3,"file":"coerce-dialog-table-action-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-dialog-table-action-component.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,6CAOwB;AACxB,2EAGwC;AACxC,2FAAsF;AACtF,iEAA4D;AAC5D,uEAGmC;AAUnC,SAAgB,oCAAoC,CAAC,OAAgD;IACnG,IAAI,EACF,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACX,KAAK,GACN,GAAG,OAAO,CAAC;IACZ,UAAU;QACR,IAAA,mCAAY,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACtC,IAAI,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,CAAC,SAAS,CAAC,CAAA,EAAE,CAAC;QACpC,IAAI,SAAS,aAAT,SAAS,uBAAT,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AAE,IAAA,kDAAuC,EAAC,WAAW,EAAE,KAAK,CAAC;oBAC5E,YAAY,EAAE,CAAE,IAAA,4CAAiC,EAAC,WAAW,CAAC,CAAE;iBACjE;aACF,CAAC,CAAC;QAEL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA9GD,oFA8GC"}
|
|
@@ -6,7 +6,6 @@ const ts_morph_1 = require("@rxap/ts-morph");
|
|
|
6
6
|
const utilities_1 = require("@rxap/utilities");
|
|
7
7
|
const ts_morph_2 = require("ts-morph");
|
|
8
8
|
const operation_id_utilities_1 = require("../nest/operation-id-utilities");
|
|
9
|
-
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
10
9
|
const coerce_table_action_1 = require("./coerce-table-action");
|
|
11
10
|
const toMappingObjectOptions = {
|
|
12
11
|
aliasFnc: (key, value) => {
|
|
@@ -26,7 +25,7 @@ function CoerceOpenApiTableActionRule(options) {
|
|
|
26
25
|
scope: ts_morph_2.Scope.Private,
|
|
27
26
|
module: ts_morph_1.Module.ANGULAR,
|
|
28
27
|
});
|
|
29
|
-
(0,
|
|
28
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
30
29
|
namedImports: [(0, operation_id_utilities_1.OperationIdToClassName)(operationId)],
|
|
31
30
|
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToClassImportPath)(operationId, scope),
|
|
32
31
|
});
|
|
@@ -37,12 +36,12 @@ function CoerceOpenApiTableActionRule(options) {
|
|
|
37
36
|
name: 'getBody',
|
|
38
37
|
parameterType: tableInterfaceName,
|
|
39
38
|
mapping: body,
|
|
40
|
-
returnType: (0,
|
|
39
|
+
returnType: (0, ts_morph_1.OperationIdToRequestBodyClassName)(operationId),
|
|
41
40
|
mappingOptions: toMappingObjectOptions,
|
|
42
41
|
});
|
|
43
|
-
(0,
|
|
44
|
-
namedImports: [(0,
|
|
45
|
-
moduleSpecifier: (0,
|
|
42
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
43
|
+
namedImports: [(0, ts_morph_1.OperationIdToRequestBodyClassName)(operationId)],
|
|
44
|
+
moduleSpecifier: (0, ts_morph_1.OperationIdToRequestBodyClassImportPath)(operationId, scope),
|
|
46
45
|
});
|
|
47
46
|
statements.push(`const requestBody = this.getBody(parameters);`);
|
|
48
47
|
}
|
|
@@ -51,12 +50,12 @@ function CoerceOpenApiTableActionRule(options) {
|
|
|
51
50
|
name: 'getParameters',
|
|
52
51
|
parameterType: tableInterfaceName,
|
|
53
52
|
mapping: parameters,
|
|
54
|
-
returnType: (0,
|
|
53
|
+
returnType: (0, ts_morph_1.OperationIdToParameterClassName)(operationId),
|
|
55
54
|
mappingOptions: toMappingObjectOptions,
|
|
56
55
|
});
|
|
57
|
-
(0,
|
|
58
|
-
namedImports: [(0,
|
|
59
|
-
moduleSpecifier: (0,
|
|
56
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
57
|
+
namedImports: [(0, ts_morph_1.OperationIdToParameterClassName)(operationId)],
|
|
58
|
+
moduleSpecifier: (0, ts_morph_1.OperationIdToParameterClassImportPath)(operationId, scope),
|
|
60
59
|
});
|
|
61
60
|
statements.push(`const requestParameters = this.getParameters(parameters);`);
|
|
62
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-open-api-table-action.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-open-api-table-action.ts"],"names":[],"mappings":";;;AAAA,qEAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"coerce-open-api-table-action.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-open-api-table-action.ts"],"names":[],"mappings":";;;AAAA,qEAAsD;AACtD,6CAUwB;AACxB,+CAAuC;AACvC,uCAAiC;AACjC,2EAGwC;AACxC,+DAG+B;AAS/B,MAAM,sBAAsB,GAA2B;IACrD,QAAQ,EAAE,CAAC,GAAW,EAAE,KAAa,EAAE,EAAE;QACvC,IAAI,CAAE,O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A3ED,oEA2EC"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTreeTableChildrenProxyRemoteMethodClass = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
4
5
|
const utilities_1 = require("@rxap/utilities");
|
|
5
|
-
const
|
|
6
|
+
const ts_morph_2 = require("ts-morph");
|
|
6
7
|
const operation_id_utilities_1 = require("../nest/operation-id-utilities");
|
|
7
|
-
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
8
8
|
const coerce_proxy_remote_method_class_1 = require("./coerce-proxy-remote-method-class");
|
|
9
9
|
function CoerceTreeTableChildrenProxyRemoteMethodClass(options) {
|
|
10
10
|
const { tsMorphTransform = utilities_1.noop, getChildrenOperationId, scope, } = options;
|
|
11
|
-
return (0, coerce_proxy_remote_method_class_1.CoerceProxyRemoteMethodClass)(Object.assign(Object.assign({}, options), { name: 'tree-table-children', sourceType:
|
|
12
|
-
(0,
|
|
11
|
+
return (0, coerce_proxy_remote_method_class_1.CoerceProxyRemoteMethodClass)(Object.assign(Object.assign({}, options), { name: 'tree-table-children', sourceType: ts_morph_2.Writers.object({ node: 'Node<unknown>' }), targetType: `OpenApiRemoteMethodParameter<${(0, ts_morph_1.OperationIdToParameterClassName)(getChildrenOperationId)}>`, proxyMethod: (0, operation_id_utilities_1.OperationIdToClassName)(getChildrenOperationId), tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
12
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
13
13
|
namedImports: [(0, operation_id_utilities_1.OperationIdToClassName)(getChildrenOperationId)],
|
|
14
14
|
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToClassImportPath)(getChildrenOperationId, scope),
|
|
15
15
|
});
|
|
16
|
-
(0,
|
|
16
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
17
17
|
namedImports: ['Node'],
|
|
18
18
|
moduleSpecifier: '@rxap/data-structure-tree',
|
|
19
19
|
});
|
|
20
|
-
(0,
|
|
20
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
21
21
|
namedImports: ['OpenApiRemoteMethodParameter'],
|
|
22
22
|
moduleSpecifier: '@rxap/open-api/remote-method',
|
|
23
23
|
});
|
|
24
|
-
(0,
|
|
25
|
-
namedImports: [(0,
|
|
26
|
-
moduleSpecifier: (0,
|
|
24
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
25
|
+
namedImports: [(0, ts_morph_1.OperationIdToParameterClassName)(getChildrenOperationId)],
|
|
26
|
+
moduleSpecifier: (0, ts_morph_1.OperationIdToParameterClassImportPath)(getChildrenOperationId, scope),
|
|
27
27
|
});
|
|
28
28
|
return tsMorphTransform(project, sourceFile, classDeclaration);
|
|
29
29
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-tree-table-children-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAAA,+CAAuC;AACvC,uCAKkB;AAClB,
|
|
1
|
+
{"version":3,"file":"coerce-tree-table-children-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAAA,6CAIwB;AACxB,+CAAuC;AACvC,uCAKkB;AAClB,2EAGwC;AACxC,yFAG4C;AAQ5C,SAAgB,6CAA6C,CAAC,OAA6D;IACzH,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,sBAAsB,EACtB,KAAK,GACN,GAAG,OAAO,CAAC;IACZ,OAAO,IAAA,+DAA4B,kCAC9B,OAAO,KACV,IAAI,EAAE,qBAAqB,EAC3B,UAAU,EAAE,kBAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,EACrD,UAAU,EAAE,gCAAiC,IAAA,0CAA+B,EAAC,sBAAsB,CAAE,GAAG,EACxG,WAAW,EAAE,IAAA,+CAAsB,EAAC,sBAAsB,CAAC,EAC3D,gBAAgB,EAAE,CAAC,OAAgB,EAAE,UAAsB,EAAE,gBAAkC,EAAE,EAAE;YACjG,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAA,+CAAsB,EAAC,sBAAsB,CAAC,CAAE;gBAChE,eAAe,EAAE,IAAA,qDAA4B,EAAC,sBAAsB,EAAE,KAAK,CAAC;aAC7E,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,MAAM,CAAE;gBACxB,eAAe,EAAE,2BAA2B;aAC7C,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,8BAA8B,CAAE;gBAChD,eAAe,EAAE,8BAA8B;aAChD,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAA,0CAA+B,EAAC,sBAAsB,CAAC,CAAE;gBACzE,eAAe,EAAE,IAAA,gDAAqC,EAAC,sBAAsB,EAAE,KAAK,CAAC;aACtF,CAAC,CAAC;YACH,OAAO,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QACjE,CAAC,IACD,CAAC;AACL,CAAC;AAhCD,sGAgCC"}
|
|
@@ -8,10 +8,10 @@ const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
|
8
8
|
const coerce_proxy_remote_method_class_1 = require("./coerce-proxy-remote-method-class");
|
|
9
9
|
function CoerceTreeTableRootProxyRemoteMethodClass(options) {
|
|
10
10
|
const { tsMorphTransform = utilities_1.noop, getRootOperationId, scope, identifier } = options;
|
|
11
|
-
return (0, coerce_proxy_remote_method_class_1.CoerceProxyRemoteMethodClass)(Object.assign(Object.assign({}, options), { name: 'tree-table-root', sourceType: 'Node<unknown>', targetType: `OpenApiRemoteMethodParameter<${identifier ? (0,
|
|
11
|
+
return (0, coerce_proxy_remote_method_class_1.CoerceProxyRemoteMethodClass)(Object.assign(Object.assign({}, options), { name: 'tree-table-root', sourceType: 'Node<unknown>', targetType: `OpenApiRemoteMethodParameter<${identifier ? (0, ts_morph_1.OperationIdToParameterClassName)(getRootOperationId) : 'void'}>`, proxyMethod: (0, operation_id_utilities_1.OperationIdToClassName)(getRootOperationId), tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
12
12
|
if (identifier) {
|
|
13
13
|
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
14
|
-
namedImports: [(0,
|
|
14
|
+
namedImports: [(0, ts_morph_1.OperationIdToParameterClassName)(getRootOperationId)],
|
|
15
15
|
moduleSpecifier: (0, ts_morph_1.OperationIdToParameterClassImportPath)(getRootOperationId, scope),
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-tree-table-root-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"coerce-tree-table-root-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAAA,6CAGwB;AACxB,+CAAuC;AAMvC,2EAGwC;AACxC,+DAA2D;AAC3D,yFAG4C;AAS5C,SAAgB,yCAAyC,CAAC,OAAyD;IACjH,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,kBAAkB,EAClB,KAAK,EACL,UAAU,EACX,GAAG,OAAO,CAAC;IACZ,OAAO,IAAA,+DAA4B,kCAC9B,OAAO,KACV,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,eAAe,EAC3B,UAAU,EAAE,gCAAiC,UAAU,CAAC,CAAC,CAAC,IAAA,0CAA+B,EAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,MAAO,GAAG,EAC1H,WAAW,EAAE,IAAA,+CAAsB,EAAC,kBAAkB,CAAC,EACvD,gBAAgB,EAAE,CAAC,OAAgB,EAAE,UAAsB,EAAE,gBAAkC,EAAE,EAAE;YACjG,IAAI,UAAU,EAAE,CAAC;gBACf,IAAA,8BAAa,EAAC,UAAU,EAAE;oBACxB,YAAY,EAAE,CAAE,IAAA,0CAA+B,EAAC,kBAAkB,CAAC,CAAE;oBACrE,eAAe,EAAE,IAAA,gDAAqC,EAAC,kBAAkB,EAAE,KAAK,CAAC;iBAClF,CAAC,CAAC;YACL,CAAC;YACD,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAA,+CAAsB,EAAC,kBAAkB,CAAC,CAAE;gBAC5D,eAAe,EAAE,IAAA,qDAA4B,EAAC,kBAAkB,EAAE,KAAK,CAAC;aACzE,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,MAAM,CAAE;gBACxB,eAAe,EAAE,2BAA2B;aAC7C,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,8BAA8B,CAAE;gBAChD,eAAe,EAAE,8BAA8B;aAChD,CAAC,CAAC;YACH,OAAO,gBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAClE,CAAC,IACD,CAAC;AACL,CAAC;AAnCD,8FAmCC"}
|
|
@@ -2,46 +2,10 @@
|
|
|
2
2
|
* @deprecated import from @rxap/ts-morph instead
|
|
3
3
|
*/
|
|
4
4
|
export declare function OperationIdToClassName(operationId: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
7
|
-
*/
|
|
8
|
-
export declare function ServiceOperationIdToClassName(operationId: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
11
|
-
*/
|
|
12
|
-
export declare function OperationIdToResponseClassName(operationId: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
15
|
-
*/
|
|
16
|
-
export declare function OperationIdToParameterClassName(operationId: string): string;
|
|
17
5
|
/**
|
|
18
6
|
* @deprecated import from @rxap/ts-morph instead
|
|
19
7
|
*/
|
|
20
8
|
export declare function OperationIdToClassImportPath(operationId: string, scope?: string | null): string;
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
23
|
-
*/
|
|
24
|
-
export declare function OperationIdToRequestBodyClassName(operationId: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
27
|
-
*/
|
|
28
|
-
export declare function ServiceOperationIdToClassImportPath(operationId: string, scope?: string | null): string;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
31
|
-
*/
|
|
32
|
-
export declare function OpenApiResponseClassImportPath(response: string, serverId: string, scope?: string | null): string;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
35
|
-
*/
|
|
36
|
-
export declare function OperationIdToResponseClassImportPath(operationId: string, scope?: string | null): string;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
39
|
-
*/
|
|
40
|
-
export declare function OperationIdToParameterClassImportPath(operationId: string, scope?: string | null): string;
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
43
|
-
*/
|
|
44
|
-
export declare function OperationIdToRequestBodyClassImportPath(operationId: string, scope?: string | null): string;
|
|
45
9
|
export declare function buildOperationId(options: {
|
|
46
10
|
project: string;
|
|
47
11
|
feature: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildOperationId = exports.
|
|
3
|
+
exports.buildOperationId = exports.OperationIdToClassImportPath = exports.OperationIdToClassName = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
5
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
6
6
|
/**
|
|
@@ -11,30 +11,6 @@ function OperationIdToClassName(operationId) {
|
|
|
11
11
|
return (0, schematics_utilities_1.classify)(id) + 'RemoteMethod';
|
|
12
12
|
}
|
|
13
13
|
exports.OperationIdToClassName = OperationIdToClassName;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
16
|
-
*/
|
|
17
|
-
function ServiceOperationIdToClassName(operationId) {
|
|
18
|
-
const [id] = operationId.split('@');
|
|
19
|
-
return (0, schematics_utilities_1.classify)(id) + 'Command';
|
|
20
|
-
}
|
|
21
|
-
exports.ServiceOperationIdToClassName = ServiceOperationIdToClassName;
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
24
|
-
*/
|
|
25
|
-
function OperationIdToResponseClassName(operationId) {
|
|
26
|
-
const [id] = operationId.split('@');
|
|
27
|
-
return (0, schematics_utilities_1.classify)(id) + 'Response';
|
|
28
|
-
}
|
|
29
|
-
exports.OperationIdToResponseClassName = OperationIdToResponseClassName;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
32
|
-
*/
|
|
33
|
-
function OperationIdToParameterClassName(operationId) {
|
|
34
|
-
const [id] = operationId.split('@');
|
|
35
|
-
return (0, schematics_utilities_1.classify)(id) + 'Parameter';
|
|
36
|
-
}
|
|
37
|
-
exports.OperationIdToParameterClassName = OperationIdToParameterClassName;
|
|
38
14
|
/**
|
|
39
15
|
* @deprecated import from @rxap/ts-morph instead
|
|
40
16
|
*/
|
|
@@ -49,84 +25,6 @@ function OperationIdToClassImportPath(operationId, scope) {
|
|
|
49
25
|
}
|
|
50
26
|
}
|
|
51
27
|
exports.OperationIdToClassImportPath = OperationIdToClassImportPath;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
54
|
-
*/
|
|
55
|
-
function OperationIdToRequestBodyClassName(operationId) {
|
|
56
|
-
const [id] = operationId.split('@');
|
|
57
|
-
return (0, schematics_utilities_1.classify)(id) + 'RequestBody';
|
|
58
|
-
}
|
|
59
|
-
exports.OperationIdToRequestBodyClassName = OperationIdToRequestBodyClassName;
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
62
|
-
*/
|
|
63
|
-
function ServiceOperationIdToClassImportPath(operationId, scope) {
|
|
64
|
-
let [id, serverId] = operationId.split('@');
|
|
65
|
-
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
66
|
-
if (scope) {
|
|
67
|
-
return `${scope}/service-open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/commands/${(0, schematics_utilities_1.dasherize)(id)}.command`;
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return `service-open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/commands/${(0, schematics_utilities_1.dasherize)(id)}.command`;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.ServiceOperationIdToClassImportPath = ServiceOperationIdToClassImportPath;
|
|
74
|
-
/**
|
|
75
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
76
|
-
*/
|
|
77
|
-
function OpenApiResponseClassImportPath(response, serverId, scope) {
|
|
78
|
-
if (scope) {
|
|
79
|
-
return `${scope}/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/responses/${(0, schematics_utilities_1.dasherize)(response)
|
|
80
|
-
.replace('-response', '')}.response`;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return `open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/responses/${(0, schematics_utilities_1.dasherize)(response)
|
|
84
|
-
.replace('-response', '')}.response`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.OpenApiResponseClassImportPath = OpenApiResponseClassImportPath;
|
|
88
|
-
/**
|
|
89
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
90
|
-
*/
|
|
91
|
-
function OperationIdToResponseClassImportPath(operationId, scope) {
|
|
92
|
-
let [id, serverId] = operationId.split('@');
|
|
93
|
-
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
94
|
-
if (scope) {
|
|
95
|
-
return `${scope}/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/responses/${(0, schematics_utilities_1.dasherize)(id)}.response`;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return `open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/responses/${(0, schematics_utilities_1.dasherize)(id)}.response`;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.OperationIdToResponseClassImportPath = OperationIdToResponseClassImportPath;
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
104
|
-
*/
|
|
105
|
-
function OperationIdToParameterClassImportPath(operationId, scope) {
|
|
106
|
-
let [id, serverId] = operationId.split('@');
|
|
107
|
-
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
108
|
-
if (scope) {
|
|
109
|
-
return `${scope}/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/parameters/${(0, schematics_utilities_1.dasherize)(id)}.parameter`;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
return `open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/parameters/${(0, schematics_utilities_1.dasherize)(id)}.parameter`;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.OperationIdToParameterClassImportPath = OperationIdToParameterClassImportPath;
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated import from @rxap/ts-morph instead
|
|
118
|
-
*/
|
|
119
|
-
function OperationIdToRequestBodyClassImportPath(operationId, scope) {
|
|
120
|
-
let [id, serverId] = operationId.split('@');
|
|
121
|
-
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
122
|
-
if (scope) {
|
|
123
|
-
return `${scope}/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/request-bodies/${(0, schematics_utilities_1.dasherize)(id)}.request-body`;
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
return `open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/request-bodies/${(0, schematics_utilities_1.dasherize)(id)}.request-body`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.OperationIdToRequestBodyClassImportPath = OperationIdToRequestBodyClassImportPath;
|
|
130
28
|
function buildOperationId(options, operation, controller) {
|
|
131
29
|
return `${(0, schematics_utilities_1.dasherize)(controller)}-controller-${(0, schematics_utilities_1.dasherize)(operation)}@${(0, workspace_utilities_1.buildNestProjectName)(options)}`;
|
|
132
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-id-utilities.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/operation-id-utilities.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,mEAAiE;AAEjE;;GAEG;AACH,SAAgB,sBAAsB,CAAC,WAAmB;IACxD,MAAM,CAAE,EAAE,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,IAAA,+BAAQ,EAAC,EAAE,CAAC,GAAG,cAAc,CAAC;AACvC,CAAC;AAHD,wDAGC;AAED;;GAEG;AACH,SAAgB,
|
|
1
|
+
{"version":3,"file":"operation-id-utilities.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/operation-id-utilities.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,mEAAiE;AAEjE;;GAEG;AACH,SAAgB,sBAAsB,CAAC,WAAmB;IACxD,MAAM,CAAE,EAAE,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,IAAA,+BAAQ,EAAC,EAAE,CAAC,GAAG,cAAc,CAAC;AACvC,CAAC;AAHD,wDAGC;AAED;;GAEG;AACH,SAAgB,4BAA4B,CAAC,WAAmB,EAAE,KAAqB;IACrF,IAAI,CAAE,EAAE,EAAE,QAAQ,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,QAAQ,EAAC;IACtB,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,GAAI,KAAM,aAAc,IAAA,gCAAS,EAAC,QAAQ,CAAE,mBAAoB,IAAA,gCAAS,EAAC,EAAE,CAAE,gBAAgB,CAAC;IACxG,CAAC;SAAM,CAAC;QACN,OAAO,YAAa,IAAA,gCAAS,EAAC,QAAQ,CAAE,mBAAoB,IAAA,gCAAS,EAAC,EAAE,CAAE,gBAAgB,CAAC;IAC7F,CAAC;AACH,CAAC;AARD,oEAQC;AAED,SAAgB,gBAAgB,CAAC,OAKhC,EAAE,SAAiB,EAAE,UAAkB;IACtC,OAAO,GAAI,IAAA,gCAAS,EAAC,UAAU,CAAE,eAAgB,IAAA,gCAAS,EAAC,SAAS,CAAE,IAAK,IAAA,0CAAoB,EAAC,OAAO,CAAE,EAAE,CAAC;AAC9G,CAAC;AAPD,4CAOC"}
|