@rxap/plugin-open-api 19.1.1-dev.8 → 19.1.1-dev.9
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 +7 -0
- package/package.json +3 -3
- package/src/generators/init-library/generator.js +2 -103
- package/src/generators/init-library/generator.js.map +1 -1
- package/src/generators/init-library/init-project.d.ts +3 -0
- package/src/generators/init-library/init-project.js +131 -0
- package/src/generators/init-library/init-project.js.map +1 -0
- package/src/generators/init-library/init-workspace.js +2 -0
- package/src/generators/init-library/init-workspace.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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
|
+
## [19.1.1-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/plugin-open-api@19.1.1-dev.8...@rxap/plugin-open-api@19.1.1-dev.9) (2024-06-25)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- spelling ([14360cc](https://gitlab.com/rxap/packages/commit/14360cc293fc9227c959f93149496cfd8d7492a1))
|
|
11
|
+
- use the library init generator for open api projects ([d275054](https://gitlab.com/rxap/packages/commit/d275054aca1e4ebf6c75451b378d342b232d7bf2))
|
|
12
|
+
|
|
6
13
|
## [19.1.1-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/plugin-open-api@19.1.1-dev.7...@rxap/plugin-open-api@19.1.1-dev.8) (2024-06-25)
|
|
7
14
|
|
|
8
15
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "19.1.1-dev.
|
|
2
|
+
"version": "19.1.1-dev.9",
|
|
3
3
|
"name": "@rxap/plugin-open-api",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@nx/devkit": "19.3.0",
|
|
7
7
|
"@rxap/node-utilities": "^1.3.1-dev.1",
|
|
8
|
-
"@rxap/plugin-library": "^19.3.0-dev.
|
|
8
|
+
"@rxap/plugin-library": "^19.3.0-dev.5",
|
|
9
9
|
"@rxap/plugin-utilities": "^19.0.4-dev.4",
|
|
10
10
|
"@rxap/utilities": "^16.2.4-dev.1",
|
|
11
11
|
"@rxap/workspace-open-api": "^19.0.3-dev.4",
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
},
|
|
45
45
|
"schematics": "./generators.json",
|
|
46
46
|
"type": "commonjs",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e7b0983d33653056459feb2504ec6a378a0ffb5f",
|
|
48
48
|
"main": "./src/index.js"
|
|
49
49
|
}
|
|
@@ -3,120 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initLibraryGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const utilities_1 = require("@rxap/utilities");
|
|
7
6
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
|
-
const
|
|
9
|
-
const yaml_1 = require("yaml");
|
|
7
|
+
const init_project_1 = require("./init-project");
|
|
10
8
|
const init_workspace_1 = require("./init-workspace");
|
|
11
9
|
function initLibraryGenerator(tree, options) {
|
|
12
10
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
var _a;
|
|
14
11
|
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, options.project);
|
|
15
12
|
console.log(`The project root is: ${projectRoot}`);
|
|
16
13
|
const projectSourceRoot = (0, workspace_utilities_1.GetProjectSourceRoot)(tree, options.project);
|
|
17
14
|
console.log(`The project source root is: ${projectSourceRoot}`);
|
|
18
|
-
const apiProjectName = (0, path_1.basename)(projectRoot);
|
|
19
15
|
(0, workspace_utilities_1.GenerateSerializedSchematicFile)(tree, projectRoot, '@rxap/plugin-open-api', 'init-library', options);
|
|
20
16
|
(0, init_workspace_1.initWorkspace)(tree, options);
|
|
21
17
|
const projectConfiguration = (0, workspace_utilities_1.GetProject)(tree, options.project);
|
|
22
|
-
|
|
23
|
-
(0, workspace_utilities_1.RemoveIgnorePattern)(tree, (0, path_1.join)(projectRoot, '.gitignore'), ['src/lib']);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
(0, workspace_utilities_1.CoerceIgnorePattern)(tree, (0, path_1.join)(projectRoot, '.gitignore'), ['src/lib']);
|
|
27
|
-
}
|
|
28
|
-
if (options.external) {
|
|
29
|
-
(0, workspace_utilities_1.CoerceTarget)(projectConfiguration, 'generate-open-api', {
|
|
30
|
-
inputs: [(0, path_1.join)('{projectRoot}', 'src', 'openapi.yaml')],
|
|
31
|
-
outputs: [
|
|
32
|
-
(0, path_1.join)('{projectRoot}', 'src', 'lib'),
|
|
33
|
-
(0, path_1.join)('{projectRoot}', 'src', 'index.ts'),
|
|
34
|
-
],
|
|
35
|
-
options: {
|
|
36
|
-
options: {
|
|
37
|
-
project: options.project,
|
|
38
|
-
path: (0, path_1.join)(projectSourceRoot, 'openapi.yaml'),
|
|
39
|
-
serverId: apiProjectName
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}, workspace_utilities_1.Strategy.OVERWRITE);
|
|
43
|
-
(0, workspace_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'openapi.yaml'), (0, yaml_1.stringify)({
|
|
44
|
-
openapi: '3.0.0',
|
|
45
|
-
info: {
|
|
46
|
-
title: 'API',
|
|
47
|
-
version: '1.0.0'
|
|
48
|
-
},
|
|
49
|
-
paths: {}
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
if (!(0, workspace_utilities_1.HasProject)(tree, apiProjectName)) {
|
|
54
|
-
throw new Error(`The api project '${apiProjectName}' for the open api client sdk library '${options.project}' does not exists!`);
|
|
55
|
-
}
|
|
56
|
-
// region add the implicit dependency to the api project
|
|
57
|
-
(_a = projectConfiguration.implicitDependencies) !== null && _a !== void 0 ? _a : (projectConfiguration.implicitDependencies = []);
|
|
58
|
-
(0, utilities_1.CoerceArrayItems)(projectConfiguration.implicitDependencies, [apiProjectName]);
|
|
59
|
-
// endregion
|
|
60
|
-
}
|
|
61
|
-
(0, workspace_utilities_1.CoerceTarget)(projectConfiguration, 'build', {
|
|
62
|
-
executor: "@nx/js:tsc",
|
|
63
|
-
outputs: ["{options.outputPath}"],
|
|
64
|
-
options: {
|
|
65
|
-
outputPath: `dist/${projectRoot}`,
|
|
66
|
-
main: `${projectSourceRoot}/index.ts`,
|
|
67
|
-
tsConfig: `${projectRoot}/tsconfig.lib.json`,
|
|
68
|
-
generateExportsField: true,
|
|
69
|
-
additionalEntryPoints: [
|
|
70
|
-
`${projectSourceRoot}/lib/commands/index.ts`,
|
|
71
|
-
`${projectSourceRoot}/lib/components/index.ts`,
|
|
72
|
-
`${projectSourceRoot}/lib/data-sources/index.ts`,
|
|
73
|
-
`${projectSourceRoot}/lib/directives/index.ts`,
|
|
74
|
-
`${projectSourceRoot}/lib/parameters/index.ts`,
|
|
75
|
-
`${projectSourceRoot}/lib/remote-method/index.ts`,
|
|
76
|
-
`${projectSourceRoot}/lib/request-bodies/index.ts`,
|
|
77
|
-
`${projectSourceRoot}/lib/responses/index.ts`,
|
|
78
|
-
],
|
|
79
|
-
}
|
|
80
|
-
}, workspace_utilities_1.Strategy.OVERWRITE);
|
|
81
|
-
// region cleanup
|
|
82
|
-
if (tree.exists((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.ts`))) {
|
|
83
|
-
tree.delete((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.ts`));
|
|
84
|
-
}
|
|
85
|
-
if (tree.exists((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.spec.ts`))) {
|
|
86
|
-
tree.delete((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.spec.ts`));
|
|
87
|
-
}
|
|
88
|
-
if (tree.exists((0, path_1.join)(projectSourceRoot, 'index.ts'))) {
|
|
89
|
-
let indexFileContent = tree.read((0, path_1.join)(projectSourceRoot, 'index.ts'), 'utf-8');
|
|
90
|
-
if (indexFileContent) {
|
|
91
|
-
indexFileContent = indexFileContent.replace(new RegExp(`export \\* from './lib/${options.project}';\n`, 'g'), '');
|
|
92
|
-
(0, workspace_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'index.ts'), indexFileContent, true);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// endregion
|
|
96
|
-
// region align the tsconfig.base.json
|
|
97
|
-
const tsConfigBasePath = `tsconfig.base.json`;
|
|
98
|
-
if (!tree.exists(tsConfigBasePath)) {
|
|
99
|
-
throw new Error(`The tsconfig.base.json file does not exists in the workspace root!`);
|
|
100
|
-
}
|
|
101
|
-
(0, workspace_utilities_1.UpdateTsConfigJson)(tree, tsConfig => {
|
|
102
|
-
var _a, _b;
|
|
103
|
-
var _c;
|
|
104
|
-
(_a = tsConfig.compilerOptions) !== null && _a !== void 0 ? _a : (tsConfig.compilerOptions = {});
|
|
105
|
-
(_b = (_c = tsConfig.compilerOptions).paths) !== null && _b !== void 0 ? _b : (_c.paths = {});
|
|
106
|
-
if (tsConfig.compilerOptions.paths[options.project]) {
|
|
107
|
-
delete tsConfig.compilerOptions.paths[options.project];
|
|
108
|
-
}
|
|
109
|
-
tsConfig.compilerOptions.paths[`${options.project}/*`] = [`${projectSourceRoot}/lib/*`];
|
|
110
|
-
tsConfig.compilerOptions.paths[`${options.project}/commands`] = [`${projectSourceRoot}/lib/components/index.ts`];
|
|
111
|
-
tsConfig.compilerOptions.paths[`${options.project}/components`] = [`${projectSourceRoot}/lib/components/index.ts`];
|
|
112
|
-
tsConfig.compilerOptions.paths[`${options.project}/data-sources`] = [`${projectSourceRoot}/lib/data-sources/index.ts`];
|
|
113
|
-
tsConfig.compilerOptions.paths[`${options.project}/directives`] = [`${projectSourceRoot}/lib/directives/index.ts`];
|
|
114
|
-
tsConfig.compilerOptions.paths[`${options.project}/parameters`] = [`${projectSourceRoot}/lib/parameters/index.ts`];
|
|
115
|
-
tsConfig.compilerOptions.paths[`${options.project}/remote-methods`] = [`${projectSourceRoot}/lib/remote-method/index.ts`];
|
|
116
|
-
tsConfig.compilerOptions.paths[`${options.project}/request-bodies`] = [`${projectSourceRoot}/lib/request-bodies/index.ts`];
|
|
117
|
-
tsConfig.compilerOptions.paths[`${options.project}/responses`] = [`${projectSourceRoot}/lib/responses/index.ts`];
|
|
118
|
-
}, { infix: 'base' });
|
|
119
|
-
// endregion
|
|
18
|
+
yield (0, init_project_1.initProject)(tree, options.project, projectConfiguration, options);
|
|
120
19
|
(0, devkit_1.updateProjectConfiguration)(tree, options.project, projectConfiguration);
|
|
121
20
|
if (!options.skipFormat) {
|
|
122
21
|
yield (0, devkit_1.formatFiles)(tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/init-library/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAIoB;AACpB
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/init-library/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAIoB;AACpB,mEAKmC;AACnC,iDAA6C;AAC7C,qDAAiD;AAGjD,SAAsB,oBAAoB,CACxC,IAAU,EACV,OAAmC;;QAGnC,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,wBAAwB,WAAW,EAAE,CAAC,CAAC;QACnD,MAAM,iBAAiB,GAAG,IAAA,0CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,+BAA+B,iBAAiB,EAAE,CAAC,CAAC;QAEhE,IAAA,qDAA+B,EAC7B,IAAI,EACJ,WAAW,EACX,uBAAuB,EACvB,cAAc,EACd,OAAO,CACR,CAAC;QAEF,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE7B,MAAM,oBAAoB,GAAG,IAAA,gCAAU,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,IAAA,0BAAW,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAExE,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;QAExE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACxB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;IAEH,CAAC;CAAA;AA9BD,oDA8BC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initProject = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
6
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const yaml_1 = require("yaml");
|
|
9
|
+
const plugin_library_1 = require("@rxap/plugin-library");
|
|
10
|
+
function initProject(tree, projectName, project, options) {
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
var _a;
|
|
13
|
+
yield (0, plugin_library_1.LibraryInitProject)(tree, projectName, project, options);
|
|
14
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, options.project);
|
|
15
|
+
const projectSourceRoot = (0, workspace_utilities_1.GetProjectSourceRoot)(tree, options.project);
|
|
16
|
+
const apiProjectName = (0, path_1.basename)(projectRoot);
|
|
17
|
+
if (options.persistent) {
|
|
18
|
+
(0, workspace_utilities_1.RemoveIgnorePattern)(tree, (0, path_1.join)(projectRoot, '.gitignore'), ['src/lib']);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
(0, workspace_utilities_1.CoerceIgnorePattern)(tree, (0, path_1.join)(projectRoot, '.gitignore'), ['src/lib']);
|
|
22
|
+
}
|
|
23
|
+
if (options.external) {
|
|
24
|
+
(0, workspace_utilities_1.CoerceTarget)(project, 'generate-open-api', {
|
|
25
|
+
inputs: [(0, path_1.join)('{projectRoot}', 'src', 'openapi.yaml')],
|
|
26
|
+
outputs: [
|
|
27
|
+
(0, path_1.join)('{projectRoot}', 'src', 'lib'),
|
|
28
|
+
(0, path_1.join)('{projectRoot}', 'src', 'index.ts'),
|
|
29
|
+
],
|
|
30
|
+
options: {
|
|
31
|
+
options: {
|
|
32
|
+
project: options.project,
|
|
33
|
+
path: (0, path_1.join)(projectSourceRoot, 'openapi.yaml'),
|
|
34
|
+
serverId: apiProjectName
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, workspace_utilities_1.Strategy.OVERWRITE);
|
|
38
|
+
(0, workspace_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'openapi.yaml'), (0, yaml_1.stringify)({
|
|
39
|
+
openapi: '3.0.0',
|
|
40
|
+
info: {
|
|
41
|
+
title: 'API',
|
|
42
|
+
version: '1.0.0'
|
|
43
|
+
},
|
|
44
|
+
paths: {}
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
if (!(0, workspace_utilities_1.HasProject)(tree, apiProjectName)) {
|
|
49
|
+
throw new Error(`The api project '${apiProjectName}' for the open api client sdk library '${options.project}' does not exists!`);
|
|
50
|
+
}
|
|
51
|
+
// region add the implicit dependency to the api project
|
|
52
|
+
(_a = project.implicitDependencies) !== null && _a !== void 0 ? _a : (project.implicitDependencies = []);
|
|
53
|
+
(0, utilities_1.CoerceArrayItems)(project.implicitDependencies, [apiProjectName]);
|
|
54
|
+
// endregion
|
|
55
|
+
}
|
|
56
|
+
(0, workspace_utilities_1.CoerceTarget)(project, 'build', {
|
|
57
|
+
executor: "@nx/js:tsc",
|
|
58
|
+
outputs: ["{options.outputPath}"],
|
|
59
|
+
options: {
|
|
60
|
+
outputPath: `dist/${projectRoot}`,
|
|
61
|
+
main: `${projectSourceRoot}/index.ts`,
|
|
62
|
+
tsConfig: `${projectRoot}/tsconfig.lib.json`,
|
|
63
|
+
generateExportsField: true,
|
|
64
|
+
additionalEntryPoints: [
|
|
65
|
+
`${projectSourceRoot}/lib/commands/index.ts`,
|
|
66
|
+
`${projectSourceRoot}/lib/components/index.ts`,
|
|
67
|
+
`${projectSourceRoot}/lib/data-sources/index.ts`,
|
|
68
|
+
`${projectSourceRoot}/lib/directives/index.ts`,
|
|
69
|
+
`${projectSourceRoot}/lib/parameters/index.ts`,
|
|
70
|
+
`${projectSourceRoot}/lib/remote-methods/index.ts`,
|
|
71
|
+
`${projectSourceRoot}/lib/request-bodies/index.ts`,
|
|
72
|
+
`${projectSourceRoot}/lib/responses/index.ts`,
|
|
73
|
+
],
|
|
74
|
+
}
|
|
75
|
+
}, workspace_utilities_1.Strategy.OVERWRITE);
|
|
76
|
+
(0, workspace_utilities_1.CoerceTarget)(project, 'index-export', {
|
|
77
|
+
outputs: [
|
|
78
|
+
`{projectRoot}/src/index.ts`,
|
|
79
|
+
`{projectRoot}/src/lib/commands/index.ts`,
|
|
80
|
+
`{projectRoot}/src/lib/components/index.ts`,
|
|
81
|
+
`{projectRoot}/src/lib/data-sources/index.ts`,
|
|
82
|
+
`{projectRoot}/src/lib/directives/index.ts`,
|
|
83
|
+
`{projectRoot}/src/lib/parameters/index.ts`,
|
|
84
|
+
`{projectRoot}/src/lib/remote-methods/index.ts`,
|
|
85
|
+
`{projectRoot}/src/lib/request-bodies/index.ts`,
|
|
86
|
+
`{projectRoot}/src/lib/responses/index.ts`,
|
|
87
|
+
]
|
|
88
|
+
}, workspace_utilities_1.Strategy.OVERWRITE);
|
|
89
|
+
// region cleanup
|
|
90
|
+
if (tree.exists((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.ts`))) {
|
|
91
|
+
tree.delete((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.ts`));
|
|
92
|
+
}
|
|
93
|
+
if (tree.exists((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.spec.ts`))) {
|
|
94
|
+
tree.delete((0, path_1.join)(projectSourceRoot, 'lib', `${options.project}.spec.ts`));
|
|
95
|
+
}
|
|
96
|
+
if (tree.exists((0, path_1.join)(projectSourceRoot, 'index.ts'))) {
|
|
97
|
+
let indexFileContent = tree.read((0, path_1.join)(projectSourceRoot, 'index.ts'), 'utf-8');
|
|
98
|
+
if (indexFileContent) {
|
|
99
|
+
indexFileContent = indexFileContent.replace(new RegExp(`export \\* from './lib/${options.project}';\n`, 'g'), '');
|
|
100
|
+
(0, workspace_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'index.ts'), indexFileContent, true);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// endregion
|
|
104
|
+
// region align the tsconfig.base.json
|
|
105
|
+
const tsConfigBasePath = `tsconfig.base.json`;
|
|
106
|
+
if (!tree.exists(tsConfigBasePath)) {
|
|
107
|
+
throw new Error(`The tsconfig.base.json file does not exists in the workspace root!`);
|
|
108
|
+
}
|
|
109
|
+
(0, workspace_utilities_1.UpdateTsConfigJson)(tree, tsConfig => {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
var _c;
|
|
112
|
+
(_a = tsConfig.compilerOptions) !== null && _a !== void 0 ? _a : (tsConfig.compilerOptions = {});
|
|
113
|
+
(_b = (_c = tsConfig.compilerOptions).paths) !== null && _b !== void 0 ? _b : (_c.paths = {});
|
|
114
|
+
if (tsConfig.compilerOptions.paths[options.project]) {
|
|
115
|
+
delete tsConfig.compilerOptions.paths[options.project];
|
|
116
|
+
}
|
|
117
|
+
// tsConfig.compilerOptions.paths[`${options.project}/*`] = [ `${projectSourceRoot}/lib/*` ];
|
|
118
|
+
tsConfig.compilerOptions.paths[`${options.project}/commands`] = [`${projectSourceRoot}/lib/components/index.ts`];
|
|
119
|
+
tsConfig.compilerOptions.paths[`${options.project}/components`] = [`${projectSourceRoot}/lib/components/index.ts`];
|
|
120
|
+
tsConfig.compilerOptions.paths[`${options.project}/data-sources`] = [`${projectSourceRoot}/lib/data-sources/index.ts`];
|
|
121
|
+
tsConfig.compilerOptions.paths[`${options.project}/directives`] = [`${projectSourceRoot}/lib/directives/index.ts`];
|
|
122
|
+
tsConfig.compilerOptions.paths[`${options.project}/parameters`] = [`${projectSourceRoot}/lib/parameters/index.ts`];
|
|
123
|
+
tsConfig.compilerOptions.paths[`${options.project}/remote-methods`] = [`${projectSourceRoot}/lib/remote-methods/index.ts`];
|
|
124
|
+
tsConfig.compilerOptions.paths[`${options.project}/request-bodies`] = [`${projectSourceRoot}/lib/request-bodies/index.ts`];
|
|
125
|
+
tsConfig.compilerOptions.paths[`${options.project}/responses`] = [`${projectSourceRoot}/lib/responses/index.ts`];
|
|
126
|
+
}, { infix: 'base' });
|
|
127
|
+
// endregion
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
exports.initProject = initProject;
|
|
131
|
+
//# sourceMappingURL=init-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/init-library/init-project.ts"],"names":[],"mappings":";;;;AAIA,+CAAmD;AACnD,mEAUmC;AACnC,+BAGc;AACd,+BAAiC;AAEjC,yDAA0D;AAE1D,SAAsB,WAAW,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B,EAAE,OAAmC;;;QAEnI,MAAM,IAAA,mCAAkB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAE9D,MAAM,WAAW,GAAG,IAAA,oCAAc,EA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AAC,eAAe,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,CAAE,GAAG,iBAAiB,8BAA8B,CAAE,CAAC;YAC7H,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,CAAE,GAAG,iBAAiB,8BAA8B,CAAE,CAAC;YAC7H,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,YAAY,CAAC,GAAG,CAAE,GAAG,iBAAiB,yBAAyB,CAAE,CAAC;QACrH,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACtB,YAAY;IACd,CAAC;CAAA;AA3HD,kCA2HC"}
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initWorkspace = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
6
|
+
const plugin_library_1 = require("@rxap/plugin-library");
|
|
6
7
|
function initWorkspace(tree, options) {
|
|
8
|
+
(0, plugin_library_1.LibraryInitWorkspace)(tree, options);
|
|
7
9
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
8
10
|
if (!nxJson) {
|
|
9
11
|
throw new Error('No nx.json found');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-workspace.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/init-library/init-workspace.ts"],"names":[],"mappings":";;;AAAA,uCAIoB;AACpB,mEAGmC;
|
|
1
|
+
{"version":3,"file":"init-workspace.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/open-api/src/generators/init-library/init-workspace.ts"],"names":[],"mappings":";;;AAAA,uCAIoB;AACpB,mEAGmC;AAEnC,yDAA4D;AAE5D,SAAgB,aAAa,CAAC,IAAU,EAAE,OAAmC;IAE3E,IAAA,qCAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEpC,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,IAAA,oDAA8B,EAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5D,IAAA,kCAAY,EAAC,MAAM,EAAE,mBAAmB,EAAE;QACxC,QAAQ,EAAE,oCAAoC;QAC9C,OAAO,EAAE;YACP,SAAS,EAAE,gCAAgC;SAC5C;KACF,CAAC,CAAC;IAEH,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7B,CAAC;AApBD,sCAoBC"}
|