@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.
Files changed (2) hide show
  1. package/cli.js +11 -13
  2. 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
- let CADRICIEL_PERMALINK = '';
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
- if (pkg.version.indexOf('-beta') > -1)
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
- loadGlobalCommands();
559
- process.argv.shift();
560
- process.argv.shift();
561
- if (process.argv.length <= 0) return displayBanner();
562
- processCommands(process.argv);
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerema/cadriciel",
3
- "version": "1.6.1-beta",
3
+ "version": "1.6.2-beta",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "npm": ">=8.0.0",