Socket
Socket
Sign inDemoInstall

@orion-js/core

Package Overview
Dependencies
Maintainers
3
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orion-js/core - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

lib/start/watchAndCompile/watchDeletes.js

1

lib/index.js

@@ -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) {

29

lib/start/watchAndCompile/cleanDirectory.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc