arylo-init
Advanced tools
Comparing version 2.1.1 to 2.1.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const child_process = require("child_process"); | ||
const fs = require("fs"); | ||
@@ -15,4 +16,4 @@ const constants = require("../constants"); | ||
resources_1.moveFiles(constants.targetPath, () => { | ||
child_process.execSync(`git init -q ${folderPath}`); | ||
out.pipe("CREATE", "./.git"); | ||
require("child_process").exec(`git init -q ${folderPath}`); | ||
out.pipe("\n Path:", constants.targetPath); | ||
@@ -19,0 +20,0 @@ }); |
@@ -61,4 +61,4 @@ "use strict"; | ||
patches_1.getVersion(version).add(filePoint); | ||
out.pipe("CREATE", "./" + filePoint); | ||
} | ||
out.pipe("CREATE", "./" + filePoint); | ||
} | ||
@@ -72,4 +72,4 @@ for (const filePoint of Object.keys(UPDATE_MAP)) { | ||
patches_1.getVersion(version).update(filePoint); | ||
out.pipe("UPDATE", "./" + filePoint); | ||
} | ||
out.pipe("UPDATE", "./" + filePoint); | ||
} | ||
@@ -80,4 +80,4 @@ for (const filePoint of Object.keys(REMOVE_MAP)) { | ||
patches_1.getVersion(version).remove(filePoint); | ||
out.pipe("DELETE", "./" + filePoint); | ||
} | ||
out.pipe("DELETE", "./" + filePoint); | ||
} | ||
@@ -84,0 +84,0 @@ const FILE_OPTIONS = { |
@@ -10,7 +10,3 @@ "use strict"; | ||
exports.rootPath = path_1.resolve(__dirname, "..", fs_1.existsSync(`${__dirname}/../../package.json`) ? ".." : ""); | ||
// tslint:disable-next-line:no-var-requires | ||
exports.pkg = require(path_1.resolve(...[ | ||
exports.rootPath, | ||
"package.json" | ||
])); | ||
exports.pkg = JSON.parse(fs_1.readFileSync(path_1.resolve(exports.rootPath, "package.json"), { encoding: "utf-8" })); | ||
/** | ||
@@ -17,0 +13,0 @@ * 当前模块版本 |
@@ -0,1 +1,2 @@ | ||
import child_process = require("child_process"); | ||
import fs = require("fs"); | ||
@@ -18,4 +19,4 @@ import constants = require("../constants"); | ||
moveFiles(constants.targetPath, () => { | ||
child_process.execSync(`git init -q ${folderPath}`); | ||
out.pipe("CREATE", "./.git"); | ||
require("child_process").exec(`git init -q ${folderPath}`); | ||
out.pipe("\n Path:", constants.targetPath); | ||
@@ -22,0 +23,0 @@ }); |
@@ -69,4 +69,4 @@ import fs = require("fs"); | ||
getVersion(version).add(filePoint); | ||
out.pipe("CREATE", "./" + filePoint); | ||
} | ||
out.pipe("CREATE", "./" + filePoint); | ||
} | ||
@@ -80,4 +80,4 @@ for (const filePoint of Object.keys(UPDATE_MAP)) { | ||
getVersion(version).update(filePoint); | ||
out.pipe("UPDATE", "./" + filePoint); | ||
} | ||
out.pipe("UPDATE", "./" + filePoint); | ||
} | ||
@@ -88,4 +88,4 @@ for (const filePoint of Object.keys(REMOVE_MAP)) { | ||
getVersion(version).remove(filePoint); | ||
out.pipe("DELETE", "./" + filePoint); | ||
} | ||
out.pipe("DELETE", "./" + filePoint); | ||
} | ||
@@ -92,0 +92,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { existsSync } from "fs"; | ||
import { existsSync, readFileSync } from "fs"; | ||
import { basename, resolve } from "path"; | ||
@@ -13,7 +13,5 @@ import { nameFilter } from "./utils"; | ||
); | ||
// tslint:disable-next-line:no-var-requires | ||
export const pkg = require(resolve(...[ | ||
rootPath, | ||
"package.json" | ||
])); | ||
export const pkg = JSON.parse( | ||
readFileSync(resolve(rootPath, "package.json"), { encoding: "utf-8" }) | ||
); | ||
/** | ||
@@ -20,0 +18,0 @@ * 当前模块版本 |
{ | ||
"name": "arylo-init", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Initial Node.js Project for Arylo Edition", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
43155
12
914