@ama-openapi/create 0.0.0-placeholder.6 → 0.0.0-placeholder.8
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-openapi/create",
|
|
3
|
-
"version": "0.0.0-placeholder.
|
|
3
|
+
"version": "0.0.0-placeholder.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"postbuild": "cpy 'package.json' 'dist' && patch-package-json-main"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@o3r/telemetry": "
|
|
21
|
+
"@o3r/telemetry": "0.0.0-placeholder.8",
|
|
22
22
|
"type-fest": "^4.30.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ama-openapi/core": "
|
|
33
|
+
"@ama-openapi/core": "0.0.0-placeholder.8",
|
|
34
34
|
"ejs": "~3.1.9",
|
|
35
35
|
"globby": "^11.1.0",
|
|
36
36
|
"tslib": "^2.6.2",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@nx/eslint-plugin": "~21.6.0",
|
|
44
44
|
"@nx/jest": "~21.6.0",
|
|
45
45
|
"@nx/js": "~21.6.0",
|
|
46
|
-
"@o3r/build-helpers": "
|
|
47
|
-
"@o3r/eslint-config": "
|
|
48
|
-
"@o3r/eslint-plugin": "
|
|
49
|
-
"@o3r/telemetry": "
|
|
50
|
-
"@o3r/test-helpers": "
|
|
46
|
+
"@o3r/build-helpers": "0.0.0-placeholder.8",
|
|
47
|
+
"@o3r/eslint-config": "0.0.0-placeholder.8",
|
|
48
|
+
"@o3r/eslint-plugin": "0.0.0-placeholder.8",
|
|
49
|
+
"@o3r/telemetry": "0.0.0-placeholder.8",
|
|
50
|
+
"@o3r/test-helpers": "0.0.0-placeholder.8",
|
|
51
51
|
"@schematics/angular": "~20.3.0",
|
|
52
52
|
"@stylistic/eslint-plugin": "~5.5.0",
|
|
53
53
|
"@types/ejs": "^3.1.2",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"typescript-eslint": "~8.46.0"
|
|
87
87
|
},
|
|
88
88
|
"generatorDependencies": {
|
|
89
|
-
"@redocly/openapi-core": "~2.
|
|
89
|
+
"@redocly/openapi-core": "~2.11.0"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
92
|
"node": "^20.19.0 || ^22.17.0 || ^24.0.0",
|
package/src/generate-template.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateTemplate = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
|
+
const core_1 = require("@ama-openapi/core");
|
|
6
7
|
const ejs_1 = require("ejs");
|
|
7
8
|
const globby_1 = require("globby");
|
|
8
9
|
const TEMPLATE_EXTENSION = '.template';
|
|
@@ -14,11 +15,17 @@ const generateTemplate = async (options) => {
|
|
|
14
15
|
const { generatorDependencies } = JSON.parse(await node_fs_1.promises.readFile((0, node_path_1.resolve)(__dirname, '..', 'package.json'), { encoding: 'utf8' }));
|
|
15
16
|
const templatesDirectory = (0, node_path_1.resolve)(__dirname, '..', 'templates');
|
|
16
17
|
const regExpExtension = new RegExp(`\\${TEMPLATE_EXTENSION}$`);
|
|
18
|
+
const exportedFiles = [
|
|
19
|
+
'bundle',
|
|
20
|
+
'models',
|
|
21
|
+
...core_1.DEFAULT_MANIFEST_FILENAMES
|
|
22
|
+
];
|
|
17
23
|
const generatedCode = (0, globby_1.sync)('**/*', { cwd: templatesDirectory, dot: true })
|
|
18
24
|
.map(async (templatePath) => {
|
|
19
25
|
const templatePathAbsolute = (0, node_path_1.resolve)(templatesDirectory, templatePath);
|
|
20
26
|
const content = await (0, ejs_1.renderFile)(templatePathAbsolute, {
|
|
21
27
|
...options,
|
|
28
|
+
exportedFiles,
|
|
22
29
|
redoclyVersion: generatorDependencies['@redocly/openapi-core'],
|
|
23
30
|
standardGitignoreNode: await (await fetch('https://www.toptal.com/developers/gitignore/api/node')).text()
|
|
24
31
|
}, { async: true });
|
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
"description": "My Specification description",
|
|
7
7
|
"main": "bundle/specification.yaml",
|
|
8
8
|
"files": [
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
<%=
|
|
10
|
+
exportedFiles
|
|
11
|
+
.map((file) => ` "${file}"`)
|
|
12
|
+
.join(',\n')
|
|
13
|
+
%>
|
|
11
14
|
],
|
|
12
15
|
"readme": "README.md",
|
|
13
16
|
"scripts": {
|
|
14
17
|
"build": "redocly bundle",
|
|
15
18
|
"retrieve-externals": "ama-openapi install",
|
|
16
|
-
"watch:retrieve-externals": "ama-openapi
|
|
19
|
+
"watch:retrieve-externals": "ama-openapi watch",
|
|
17
20
|
"postinstall": "ama-openapi install"
|
|
18
21
|
},
|
|
19
22
|
"dependencies": {
|