@orion-js/core 3.1.10 → 3.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const execute_1 = __importDefault(require("../helpers/execute"));
7
+ async function default_1({ name, kit }) {
8
+ if (!name) {
9
+ throw new Error('Please set the name of the app');
10
+ }
11
+ if (!kit) {
12
+ throw new Error('Please select which kit to use');
13
+ }
14
+ const repo = `https://github.com/siturra/boilerplate-orionjs-${kit}`;
15
+ console.log('Downloading starter kit...');
16
+ await (0, execute_1.default)(`git clone ${repo} ${name}`);
17
+ await (0, execute_1.default)(`cd ${name} && rm -rf .git`);
18
+ console.log('Your starter kit is ready');
19
+ }
20
+ exports.default = default_1;
package/lib/index.js CHANGED
@@ -8,6 +8,7 @@ require("reflect-metadata");
8
8
  const commander_1 = require("commander");
9
9
  const start_1 = __importDefault(require("./start"));
10
10
  const build_1 = __importDefault(require("./build"));
11
+ const create_1 = __importDefault(require("./create"));
11
12
  const safe_1 = __importDefault(require("colors/safe"));
12
13
  const test_1 = __importDefault(require("./test"));
13
14
  require("./handleErrors");
@@ -50,6 +51,12 @@ program
50
51
  .description('Adds a new environment to the encrypted env file')
51
52
  .option('--env-path <path>', 'Specify the env file name')
52
53
  .action(run(add_1.default));
54
+ program
55
+ .command('create')
56
+ .description('Creates a new Orionjs project')
57
+ .option('--name [name]', 'Name of the project')
58
+ .option('--kit [kit]', 'Which starter kit to use')
59
+ .action(run(create_1.default));
53
60
  program.version(version_1.default, '-v --version');
54
61
  program.parse(process.argv);
55
62
  if (!process.argv.slice(2).length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-js/core",
3
- "version": "3.1.10",
3
+ "version": "3.1.12",
4
4
  "main": "index.js",
5
5
  "author": "nicolaslopezj",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  "upgrade-interactive": "yarn upgrade-interactive"
17
17
  },
18
18
  "dependencies": {
19
- "@orion-js/crypto": "^3.1.10",
19
+ "@orion-js/crypto": "^3.1.12",
20
20
  "chokidar": "3.5.3",
21
21
  "colors": "^1.4.0",
22
22
  "commander": "^8.3.0",
@@ -34,7 +34,7 @@
34
34
  "engines": {
35
35
  "node": ">=14.0.0"
36
36
  },
37
- "gitHead": "40fa0800303f49ad08890b2bedff2cdadb81360d",
37
+ "gitHead": "a6b82a931bea3179dfac4099579096c4f7a780bb",
38
38
  "devDependencies": {
39
39
  "@shelf/jest-mongodb": "^2.1.0",
40
40
  "@types/prompts": "^2.0.14"