create-gasket-app 7.4.14 → 7.4.16

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.
@@ -6,10 +6,18 @@ import { runShellCommand } from '@gasket/utils';
6
6
  * @type {import('../../internal.d.js').gitInit}
7
7
  */
8
8
  async function gitInit({ context }) {
9
- await runShellCommand('git', ['init'], { cwd: context.dest });
10
- await runShellCommand('git', ['checkout', '-b', 'main'], { cwd: context.dest });
11
- await runShellCommand('git', ['add', '.'], { cwd: context.dest });
12
- await runShellCommand('git', ['commit', '-m', '🎉 Created new repository with create-gasket-app'], { cwd: context.dest });
9
+ try {
10
+ await runShellCommand('git', ['init'], { cwd: context.dest });
11
+ await runShellCommand('git', ['checkout', '-b', 'main'], { cwd: context.dest });
12
+ await runShellCommand('git', ['add', '.'], { cwd: context.dest });
13
+ await runShellCommand('git', ['commit', '-m', '🎉 Created new repository with create-gasket-app'], { cwd: context.dest });
14
+ } catch (error) {
15
+ if (error.stderr.includes('fatal: a branch named \'main\' already exists')) {
16
+ context.warnings.push('A branch named \'main\' already exists');
17
+ } else {
18
+ context.warnings.push('Failed to initialize git repository');
19
+ }
20
+ }
13
21
  }
14
22
 
15
23
  export default withSpinner('Initialize git repo', gitInit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-gasket-app",
3
- "version": "7.4.14",
3
+ "version": "7.4.16",
4
4
  "description": "starter pack for creating a gasket app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,14 +32,14 @@
32
32
  "mkdirp": "^1.0.4",
33
33
  "ora": "^3.4.0",
34
34
  "semver": "^7.7.1",
35
- "@gasket/core": "^7.6.3",
36
- "@gasket/plugin-command": "^7.5.3",
37
- "@gasket/plugin-docs": "^7.4.8",
38
- "@gasket/plugin-docusaurus": "^7.4.6",
39
- "@gasket/plugin-dynamic-plugins": "^7.4.2",
35
+ "@gasket/core": "^7.7.0",
36
+ "@gasket/plugin-command": "^7.6.1",
37
+ "@gasket/plugin-docs": "^7.5.1",
38
+ "@gasket/plugin-docusaurus": "^7.5.0",
39
+ "@gasket/plugin-dynamic-plugins": "^7.5.0",
40
40
  "@gasket/plugin-git": "^7.4.7",
41
- "@gasket/plugin-logger": "^7.3.8",
42
- "@gasket/plugin-metadata": "^7.5.4",
41
+ "@gasket/plugin-logger": "^7.4.0",
42
+ "@gasket/plugin-metadata": "^7.5.6",
43
43
  "@gasket/request": "^7.5.4",
44
44
  "@gasket/utils": "^7.6.3"
45
45
  },