@cerema/cadriciel 0.5.5 → 0.5.7

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 CHANGED
@@ -4,7 +4,6 @@ const { Command } = require('commander');
4
4
  const figlet = require('figlet');
5
5
  const chalk = require('chalk-v2');
6
6
  const fs = require('fs');
7
-
8
7
  const log = require('log-beautify');
9
8
 
10
9
  const program = new Command();
package/cmd/init.js CHANGED
@@ -41,6 +41,7 @@ module.exports = function (program) {
41
41
  var text = fs.readFileSync(input, 'utf-8');
42
42
  text = text.replace(/§§project§§/g, o.project);
43
43
  text = text.replace(/§§projectUpper§§/g, o.project.toUpperCase());
44
+ text = text.replace(/§§projectNS§§/g, capitalizeFirstLetter(o.project));
44
45
  text = text.replace(/§§projectID§§/g, capitalizeFirstLetter(o.project));
45
46
  text = text.replace(/§§pg_port§§/g, o.pg_port);
46
47
  text = text.replace(/§§inbucket_port§§/g, o.inbucket_port);
@@ -88,7 +89,16 @@ module.exports = function (program) {
88
89
  process.cwd() + '/' + o.project + '/.project',
89
90
  JSON.stringify(o)
90
91
  );
92
+ var gitignore = fs.readFileSync(__dirname + '/.gitignore', 'utf-8');
93
+ fs.writeFileSync(
94
+ process.cwd() + '/' + o.project + '/.gitignore',
95
+ gitignore
96
+ );
91
97
  spinner.succeed(`projet ${o.project} crée avec succès.`);
98
+ console.log('\n');
99
+ console.log('cd ' + o.project);
100
+ console.log('cd ' + o.project);
101
+ console.log('\n');
92
102
  console.log('\n🚀 Happy coding !\n');
93
103
  });
94
104
  });
package/lib/s3.js CHANGED
@@ -1,7 +1,6 @@
1
1
  const os = require('os');
2
2
  const fs = require('fs');
3
3
  const util = require('util');
4
- const log = require('log-beautify');
5
4
  const userHomeDir = os.homedir();
6
5
  const S3_URI = 's3.siipro.fr';
7
6
  const Minio = require('minio');
package/lib/util.js CHANGED
@@ -1,9 +1,14 @@
1
+ /** helper utils */
2
+
3
+ /** adding libraries */
1
4
  const os = require('os');
2
5
  const fs = require('fs');
3
6
  const util = require('util');
4
7
  const userHomeDir = os.homedir();
5
8
  const log = require('log-beautify');
6
9
  const readFile = util.promisify(fs.readFile);
10
+
11
+ /** helpers */
7
12
  const capitalizeFirstLetter = (string) => {
8
13
  return string.charAt(0).toUpperCase() + string.slice(1);
9
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerema/cadriciel",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "npm": ">=8.0.0",
@@ -1,15 +0,0 @@
1
- module.exports = function (program) {
2
- program
3
- .command('start')
4
- .description('Démarrage des services pour un développement local')
5
- .action((str, options) => {
6
- spawn(
7
- 'docker-compose',
8
- ['-f', process.cwd() + '/docker/docker-compose.yml', 'up', '-d'],
9
- {
10
- stdio: 'inherit',
11
- }
12
- );
13
- info();
14
- });
15
- };
@@ -1,16 +0,0 @@
1
- module.exports = function (program) {
2
- program
3
- .command('stop')
4
- .description('Arrête les services')
5
- .action((str, options) => {
6
- console.log(chalk.white('Arrêter les services du Cadriciel'));
7
- spawn(
8
- 'docker-compose',
9
- ['-f', process.cwd() + '/docker/docker-compose.yml', 'down'],
10
- {
11
- stdio: 'inherit',
12
- }
13
- );
14
- log.success('OK');
15
- });
16
- };