move child_process import to top
This commit is contained in:
parent
01ff9604bd
commit
2bd645e271
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"target": "ESNext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"strictFunctionTypes": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"allowUmdGlobalAccess": true,
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"**/node_modules/*"
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,5 +1,9 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
// native node modules
|
||||||
|
const child_process = require('child_process')
|
||||||
|
|
||||||
|
|
||||||
createDefaultFiles();
|
createDefaultFiles();
|
||||||
|
|
||||||
function createDefaultFiles() {
|
function createDefaultFiles() {
|
||||||
|
@ -838,11 +842,11 @@ function getVersion() {
|
||||||
const pkgJson = require('./package.json');
|
const pkgJson = require('./package.json');
|
||||||
pkgVersion = pkgJson.version;
|
pkgVersion = pkgJson.version;
|
||||||
if (!process.pkg && commandExistsSync('git')) {
|
if (!process.pkg && commandExistsSync('git')) {
|
||||||
gitRevision = require('child_process')
|
gitRevision = child_process
|
||||||
.execSync('git rev-parse --short HEAD', { cwd: process.cwd(), stdio: ['ignore', 'pipe', 'ignore'] })
|
.execSync('git rev-parse --short HEAD', { cwd: process.cwd(), stdio: ['ignore', 'pipe', 'ignore'] })
|
||||||
.toString().trim();
|
.toString().trim();
|
||||||
|
|
||||||
gitBranch = require('child_process')
|
gitBranch = child_process
|
||||||
.execSync('git rev-parse --abbrev-ref HEAD', { cwd: process.cwd(), stdio: ['ignore', 'pipe', 'ignore'] })
|
.execSync('git rev-parse --abbrev-ref HEAD', { cwd: process.cwd(), stdio: ['ignore', 'pipe', 'ignore'] })
|
||||||
.toString().trim();
|
.toString().trim();
|
||||||
}
|
}
|
||||||
|
@ -1855,6 +1859,7 @@ app.post("/getstatus_novelai", jsonParser, function (request, response_getstatus
|
||||||
data: data,
|
data: data,
|
||||||
headers: { "Content-Type": "application/json", "Authorization": "Bearer " + api_key_novel }
|
headers: { "Content-Type": "application/json", "Authorization": "Bearer " + api_key_novel }
|
||||||
};
|
};
|
||||||
|
|
||||||
client.get(api_novelai + "/user/subscription", args, function (data, response) {
|
client.get(api_novelai + "/user/subscription", args, function (data, response) {
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
|
|
Loading…
Reference in New Issue