@orion-js/core 3.0.15 → 3.0.31
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.
package/LICENSE
CHANGED
package/lib/index.js
CHANGED
|
@@ -4,13 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const commander_1 =
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
8
|
const start_1 = __importDefault(require("./start"));
|
|
9
9
|
const build_1 = __importDefault(require("./build"));
|
|
10
10
|
const safe_1 = __importDefault(require("colors/safe"));
|
|
11
11
|
const test_1 = __importDefault(require("./test"));
|
|
12
12
|
require("./handleErrors");
|
|
13
13
|
const version_1 = __importDefault(require("./version"));
|
|
14
|
+
const program = new commander_1.Command();
|
|
14
15
|
const run = function (action) {
|
|
15
16
|
return async function (...args) {
|
|
16
17
|
try {
|
|
@@ -21,20 +22,20 @@ const run = function (action) {
|
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
program
|
|
25
26
|
.command('start')
|
|
26
27
|
.description('Run the Orionjs app')
|
|
27
28
|
.option('--shell', 'Opens a shell in Chrome developer tools')
|
|
28
29
|
.option('--clean', 'Build the typescript project from scratch')
|
|
29
30
|
.action(run(start_1.default));
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
program.command('test').allowUnknownOption().description('Deprecated command').action(run(test_1.default));
|
|
32
|
+
program
|
|
32
33
|
.command('build')
|
|
33
34
|
.description('Compiles an Orionjs app and exports it to a simple nodejs app')
|
|
34
35
|
.option('-o, --output [output]', 'Output directory')
|
|
35
36
|
.action(run(build_1.default));
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
program.version(version_1.default, '-v --version');
|
|
38
|
+
program.parse(process.argv);
|
|
38
39
|
if (!process.argv.slice(2).length) {
|
|
39
|
-
|
|
40
|
+
program.outputHelp();
|
|
40
41
|
}
|
|
@@ -23,7 +23,7 @@ function ensureConfigComplies(configPath) {
|
|
|
23
23
|
(0, writeFile_1.default)(configPath, (0, comment_json_1.stringify)(newConfig, null, 2));
|
|
24
24
|
}
|
|
25
25
|
catch (error) {
|
|
26
|
-
console.log(`Error reading tsconfig
|
|
26
|
+
console.log(`Error reading tsconfig ${error.message}`);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.ensureConfigComplies = ensureConfigComplies;
|
|
@@ -8,11 +8,12 @@ const typescript_1 = __importDefault(require("typescript"));
|
|
|
8
8
|
const ensureConfigComplies_1 = require("./ensureConfigComplies");
|
|
9
9
|
function getConfigPath() {
|
|
10
10
|
const appBasePath = process.cwd();
|
|
11
|
-
const configPath = typescript_1.default.findConfigFile(appBasePath, typescript_1.default.sys.fileExists, 'tsconfig.json')
|
|
12
|
-
|
|
11
|
+
const configPath = typescript_1.default.findConfigFile(appBasePath, typescript_1.default.sys.fileExists, 'tsconfig.server.json') ||
|
|
12
|
+
typescript_1.default.findConfigFile(appBasePath, typescript_1.default.sys.fileExists, 'tsconfig.json');
|
|
13
13
|
if (!configPath) {
|
|
14
14
|
throw new Error("Could not find a valid 'tsconfig.json'.");
|
|
15
15
|
}
|
|
16
|
+
(0, ensureConfigComplies_1.ensureConfigComplies)(configPath);
|
|
16
17
|
return configPath;
|
|
17
18
|
}
|
|
18
19
|
exports.getConfigPath = getConfigPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.31",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,24 +12,15 @@
|
|
|
12
12
|
"prepare": "yarn run build",
|
|
13
13
|
"clean": "rm -rf ./lib",
|
|
14
14
|
"build": "yarn run clean && tsc",
|
|
15
|
-
"watch": "
|
|
15
|
+
"watch": "tsc -w",
|
|
16
|
+
"upgrade-interactive": "yarn upgrade-interactive"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@babel/core": "^7.15.8",
|
|
19
|
-
"@orion-js/resolvers": "^3.0.15",
|
|
20
|
-
"@orion-js/schema": "^3.0.7",
|
|
21
|
-
"async-exit-hook": "^2.0.1",
|
|
22
|
-
"chokidar": "^3.5.1",
|
|
23
19
|
"colors": "^1.4.0",
|
|
24
|
-
"commander": "^
|
|
20
|
+
"commander": "^8.3.0",
|
|
25
21
|
"comment-json": "^4.1.1",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"process-exists": "^3.1.0",
|
|
29
|
-
"request": "^2.88.0x",
|
|
30
|
-
"request-promise": "^4.2.5",
|
|
31
|
-
"typescript": "^4.4.4",
|
|
32
|
-
"walk-sync": "^0.3.3"
|
|
22
|
+
"lodash": "^4.17.21",
|
|
23
|
+
"typescript": "^4.4.4"
|
|
33
24
|
},
|
|
34
25
|
"publishConfig": {
|
|
35
26
|
"access": "public"
|
|
@@ -37,7 +28,7 @@
|
|
|
37
28
|
"engines": {
|
|
38
29
|
"node": ">=14.0.0"
|
|
39
30
|
},
|
|
40
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "8d1f8b92ea815c14ffeaecfa8879ca775bc1d991",
|
|
41
32
|
"devDependencies": {
|
|
42
33
|
"@shelf/jest-mongodb": "^2.1.0"
|
|
43
34
|
}
|