@cerema/cadriciel 1.6.1-beta → 1.6.2-beta
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/cli.js +11 -13
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -13,10 +13,7 @@ const axios = require('axios'); // For making HTTP requests.
|
|
|
13
13
|
// Locating the '.cadriciel' directory starting from the current working directory.
|
|
14
14
|
const CADRICIEL_PATH = findCadricielDir(process.cwd());
|
|
15
15
|
const CADRICIEL_COMMAND = 'cad';
|
|
16
|
-
|
|
17
|
-
const pkg = require(path.join(__dirname, 'package.json'));
|
|
18
|
-
|
|
19
|
-
CADRICIEL_PERMALINK =
|
|
16
|
+
const CADRICIEL_PERMALINK =
|
|
20
17
|
'https://gist.githubusercontent.com/zucatti/08b37516b23c08028a2b07694f0329b6/raw/cadriciel-url.json';
|
|
21
18
|
global.CADRICIEL_URI = '';
|
|
22
19
|
//global.CADRICIEL_URI = 'http://localhost:3000/api';
|
|
@@ -512,14 +509,14 @@ const checkCachePermaLink = async () => {
|
|
|
512
509
|
|
|
513
510
|
const cachedData = getCachedData();
|
|
514
511
|
if (cachedData) {
|
|
515
|
-
|
|
516
|
-
global.CADRICIEL_URI = cachedData['api-recette'] + '/api';
|
|
517
|
-
else global.CADRICIEL_URI = cachedData.api + '/api';
|
|
512
|
+
global.CADRICIEL_URI = cachedData.api + '/api';
|
|
518
513
|
}
|
|
519
514
|
};
|
|
520
515
|
|
|
521
516
|
// Main function.
|
|
522
517
|
const main = async () => {
|
|
518
|
+
let version = await checkVersion();
|
|
519
|
+
/*
|
|
523
520
|
await checkCachePermaLink();
|
|
524
521
|
|
|
525
522
|
let version = await checkVersion();
|
|
@@ -555,12 +552,13 @@ const main = async () => {
|
|
|
555
552
|
if (process.argv.length <= 0) return displayBanner();
|
|
556
553
|
processCommands(process.argv);
|
|
557
554
|
} else {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
555
|
+
*/
|
|
556
|
+
loadGlobalCommands();
|
|
557
|
+
process.argv.shift();
|
|
558
|
+
process.argv.shift();
|
|
559
|
+
if (process.argv.length <= 0) return displayBanner();
|
|
560
|
+
processCommands(process.argv);
|
|
561
|
+
//}
|
|
564
562
|
};
|
|
565
563
|
|
|
566
564
|
main();
|