@orion-js/core
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -14,2 +14,3 @@ #!/usr/bin/env node | ||
const version_1 = __importDefault(require("./version")); | ||
require("dotenv/config"); | ||
const program = new commander_1.Command(); | ||
@@ -16,0 +17,0 @@ const run = function (action) { |
@@ -6,13 +6,30 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const execute_1 = __importDefault(require("../../helpers/execute")); | ||
const fs_1 = __importDefault(require("fs")); | ||
const path_1 = __importDefault(require("path")); | ||
/** | ||
* Remove directory recursively | ||
* @param {string} dir_path | ||
* @see https://stackoverflow.com/a/42505874/3027390 | ||
*/ | ||
function rimraf(dir_path) { | ||
if (fs_1.default.existsSync(dir_path)) { | ||
fs_1.default.readdirSync(dir_path).forEach(function (entry) { | ||
var entry_path = path_1.default.join(dir_path, entry); | ||
if (fs_1.default.lstatSync(entry_path).isDirectory()) { | ||
rimraf(entry_path); | ||
} | ||
else { | ||
fs_1.default.unlinkSync(entry_path); | ||
} | ||
}); | ||
fs_1.default.rmdirSync(dir_path); | ||
} | ||
} | ||
async function cleanDirectory() { | ||
try { | ||
await (0, execute_1.default)(`rm -rf ${process.cwd()}/.orion/build`); | ||
const path = `${process.cwd()}/.orion/build`; | ||
rimraf(path); | ||
} | ||
catch { } | ||
try { | ||
await (0, execute_1.default)(`rm ${process.cwd()}/.orion/tsconfig.tsbuildinfo`); | ||
} | ||
catch { } | ||
} | ||
exports.default = cleanDirectory; |
@@ -7,7 +7,11 @@ "use strict"; | ||
const typescript_1 = __importDefault(require("typescript")); | ||
const cleanDirectory_1 = __importDefault(require("./cleanDirectory")); | ||
const getHost_1 = require("./getHost"); | ||
const watchDeletes_1 = require("./watchDeletes"); | ||
async function watchAndCompile(runner) { | ||
await (0, cleanDirectory_1.default)(); | ||
const host = (0, getHost_1.getHost)(runner); | ||
typescript_1.default.createWatchProgram(host); | ||
(0, watchDeletes_1.watchDeletes)(); | ||
} | ||
exports.default = watchAndCompile; |
{ | ||
"name": "@orion-js/core", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"main": "index.js", | ||
@@ -19,5 +19,7 @@ "author": "nicolaslopezj", | ||
"dependencies": { | ||
"chokidar": "3.5.3", | ||
"colors": "^1.4.0", | ||
"commander": "^8.3.0", | ||
"comment-json": "^4.1.1", | ||
"dotenv": "^16.0.0", | ||
"lodash": "^4.17.21", | ||
@@ -32,3 +34,3 @@ "typescript": "^4.4.4" | ||
}, | ||
"gitHead": "776fc314f67ab21707912ebeadc9ed8b525cbaee", | ||
"gitHead": "36598f7a3c10b52efdce40e8e874e83634f2f22e", | ||
"devDependencies": { | ||
@@ -35,0 +37,0 @@ "@shelf/jest-mongodb": "^2.1.0" |
Sorry, the diff of this file is not supported yet
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
31370
31
612
7
10
+ Addedchokidar@3.5.3
+ Addeddotenv@^16.0.0
+ Addedanymatch@3.1.3(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@3.5.3(transitive)
+ Addeddotenv@16.4.5(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addednormalize-path@3.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)