@team-supercharge/oasg 13.2.0-feature-csharp-functions-c1cbb3b0.0 → 13.2.0-feature-csharp-functions-22a33fb4.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/bin/exec.js +12 -2
- package/bin/oasg +3 -2
- package/package.json +1 -1
package/bin/exec.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
const { exit } = require('process');
|
2
2
|
const { execSync } = require('child_process');
|
3
3
|
|
4
|
-
function
|
4
|
+
function execCommand(command, stdio) {
|
5
5
|
try {
|
6
6
|
execSync(`bash -e -c "${command}"`, { stdio: stdio || 'inherit' });
|
7
7
|
} catch (e) {
|
@@ -10,4 +10,14 @@ function exec(command, stdio) {
|
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|
13
|
-
|
13
|
+
function execScript(script, stdio) {
|
14
|
+
try {
|
15
|
+
execSync(`bash -e ${script}`, { stdio: stdio || 'inherit' });
|
16
|
+
} catch (e) {
|
17
|
+
console.error(e.message);
|
18
|
+
exit(1);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
exports.exec = execCommand;
|
23
|
+
exports.execScript = execScript;
|
package/bin/oasg
CHANGED
@@ -15,6 +15,7 @@ const expressHttpProxy = require('express-http-proxy');
|
|
15
15
|
const { exit } = require('process');
|
16
16
|
|
17
17
|
const { exec } = require(`${__dirname}/exec.js`);
|
18
|
+
const { execScript } = require(`${__dirname}/exec.js`);
|
18
19
|
const { merge } = require(`${__dirname}/merger.js`);
|
19
20
|
const { applyOverrides } = require(`${__dirname}/overrider.js`);
|
20
21
|
const { openApiTarget } = require(`${__dirname}/openapi-target.js`);
|
@@ -517,7 +518,7 @@ async function generate(argv) {
|
|
517
518
|
const templateDir = customizeTemplates(target);
|
518
519
|
|
519
520
|
// run generation
|
520
|
-
|
521
|
+
execScript(
|
521
522
|
`${__dirname}/../targets/${target.type}/generate.sh ${VERSION} ${binary} ${CONFIG_FILE_NAME} ${target.id} ${
|
522
523
|
sources[target.source]
|
523
524
|
} ${formatter} ${target.generatorId} ${preRelease.toString()} ${templateDir}`
|
@@ -550,7 +551,7 @@ async function publish(argv) {
|
|
550
551
|
formatter = fetchFormatter(target);
|
551
552
|
}
|
552
553
|
|
553
|
-
|
554
|
+
execScript(
|
554
555
|
`${__dirname}/../targets/${target.type}/publish.sh ${VERSION} ${binary} ${CONFIG_FILE_NAME} ${target.id} ${
|
555
556
|
sources[target.source]
|
556
557
|
} ${formatter} ${target.generatorId} ${preRelease.toString()}`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@team-supercharge/oasg",
|
3
|
-
"version": "13.2.0-feature-csharp-functions-
|
3
|
+
"version": "13.2.0-feature-csharp-functions-22a33fb4.0",
|
4
4
|
"description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
|
5
5
|
"author": "Supercharge",
|
6
6
|
"license": "MIT",
|