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.6 to 3.1.8

lib/env/add/encryptValue.js

4

lib/build/index.js

@@ -9,4 +9,5 @@ "use strict";

const writeIndex_1 = __importDefault(require("../start/watchAndCompile/writeIndex"));
const writeEnvFile_1 = require("../start/watchAndCompile/writeEnvFile");
const compile_1 = require("./compile");
async function default_1({ output }) {
async function default_1({ output, envPath }) {
if (!output) {

@@ -20,4 +21,5 @@ output = './build';

(0, writeIndex_1.default)({ basePath: output });
(0, writeEnvFile_1.writeEnvFile)({ basePath: output, envPath });
console.log(safe_1.default.bold('Build created'));
}
exports.default = default_1;

@@ -6,7 +6,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getFileContents = void 0;
const fs_1 = __importDefault(require("fs"));
function getFileContents(path) {
return fs_1.default.readFileSync(path).toString();
function readFile(filePath) {
if (!fs_1.default.existsSync(filePath))
return null;
return fs_1.default.readFileSync(filePath).toString();
}
exports.getFileContents = getFileContents;
exports.default = readFile;

@@ -7,2 +7,3 @@ #!/usr/bin/env node

Object.defineProperty(exports, "__esModule", { value: true });
require("reflect-metadata");
const commander_1 = require("commander");

@@ -16,2 +17,4 @@ const start_1 = __importDefault(require("./start"));

require("dotenv/config");
const init_1 = __importDefault(require("./env/init"));
const add_1 = __importDefault(require("./env/add"));
const program = new commander_1.Command();

@@ -33,2 +36,3 @@ const run = function (action) {

.option('--clean', 'Build the typescript project from scratch')
.option('--env-path <path>', 'Specify the env file name')
.action(run(start_1.default));

@@ -40,3 +44,14 @@ program.command('test').allowUnknownOption().description('Deprecated command').action(run(test_1.default));

.option('-o, --output [output]', 'Output directory')
.option('--env-path <path>', 'Specify the env file name')
.action(run(build_1.default));
program
.command('env-init')
.description('Creates a new encrypted env file')
.option('--env-path <path>', 'Specify the env file name')
.action(run(init_1.default));
program
.command('env-add')
.description('Adds a new environment to the encrypted env file')
.option('--env-path <path>', 'Specify the env file name')
.action(run(add_1.default));
program.version(version_1.default, '-v --version');

@@ -43,0 +58,0 @@ program.parse(process.argv);

@@ -36,4 +36,9 @@ "use strict";

};
return { restart, stop };
return {
restart,
stop,
envPath: options.envPath,
basePath: `${process.cwd()}/.orion/build`
};
}
exports.getRunner = getRunner;

@@ -7,3 +7,3 @@ "use strict";

exports.ensureConfigComplies = void 0;
const getFileContents_1 = require("../../helpers/getFileContents");
const getFileContents_1 = __importDefault(require("../../helpers/getFileContents"));
const writeFile_1 = __importDefault(require("../../helpers/writeFile"));

@@ -13,3 +13,3 @@ const comment_json_1 = require("comment-json");

try {
const configJSON = (0, getFileContents_1.getFileContents)(configPath);
const configJSON = (0, getFileContents_1.default)(configPath);
const config = (0, comment_json_1.parse)(configJSON);

@@ -16,0 +16,0 @@ const newConfig = {

@@ -12,2 +12,3 @@ "use strict";

const writeIndex_1 = __importDefault(require("./writeIndex"));
const writeEnvFile_1 = require("./writeEnvFile");
function getHost(runner) {

@@ -30,4 +31,4 @@ const reportWatchStatusChanged = (diagnostic) => {

}
const basePath = `${process.cwd()}/.orion/build`;
(0, writeIndex_1.default)({ basePath });
(0, writeIndex_1.default)({ basePath: runner.basePath });
(0, writeEnvFile_1.writeEnvFile)({ basePath: runner.basePath, envPath: runner.envPath });
runner.restart();

@@ -34,0 +35,0 @@ }

@@ -10,2 +10,3 @@ "use strict";

const watchDeletes_1 = require("./watchDeletes");
const writeEnvFile_1 = require("./writeEnvFile");
async function watchAndCompile(runner) {

@@ -16,3 +17,4 @@ await (0, cleanDirectory_1.default)();

(0, watchDeletes_1.watchDeletes)();
(0, writeEnvFile_1.watchEnvFile)(runner);
}
exports.default = watchAndCompile;

@@ -24,2 +24,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
require("./env");
require("./moduleAlias");

@@ -26,0 +27,0 @@ require("./app");

{
"name": "@orion-js/core",
"version": "3.1.6",
"version": "3.1.8",
"main": "index.js",

@@ -19,2 +19,3 @@ "author": "nicolaslopezj",

"dependencies": {
"@orion-js/crypto": "^3.1.8",
"chokidar": "3.5.3",

@@ -26,3 +27,6 @@ "colors": "^1.4.0",

"lodash": "^4.17.21",
"typescript": "^4.4.4"
"prompts": "^2.4.2",
"reflect-metadata": "^0.1.13",
"typescript": "^4.4.4",
"yaml": "^1.10.2"
},

@@ -35,6 +39,7 @@ "publishConfig": {

},
"gitHead": "cb180a6a89ee2042f9d3dc80725f3aa05705a963",
"gitHead": "32c704fcad8c4314cd1b05929da8640c5d0c2922",
"devDependencies": {
"@shelf/jest-mongodb": "^2.1.0"
"@shelf/jest-mongodb": "^2.1.0",
"@types/prompts": "^2.0.14"
}
}
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