@squiz/component-cli-lib 1.15.0 → 1.16.0

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,6 +6,13 @@
6
6
  "description": "Default example component",
7
7
  "version": "0.0.1",
8
8
  "mainFunction": "main",
9
+ "icon": {
10
+ "id": "fiber_new",
11
+ "color": {
12
+ "type": "enum",
13
+ "value": "green"
14
+ }
15
+ },
9
16
  "functions": [
10
17
  {
11
18
  "name": "main",
@@ -6,6 +6,15 @@
6
6
  "description": "Default example component",
7
7
  "version": "0.0.1",
8
8
  "mainFunction": "main",
9
+
10
+ "icon": {
11
+ "id": "fiber_new",
12
+ "color": {
13
+ "type": "enum",
14
+ "value": "blue"
15
+ }
16
+ },
17
+
9
18
  "functions": [
10
19
  {
11
20
  "name": "main",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/component-cli-lib",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -13,12 +13,12 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "devDependencies": {
16
- "@squiz/component-lib": "1.15.0",
17
- "@squiz/component-web-api-lib": "1.15.0",
18
- "@squiz/dx-common-lib": "1.15.0",
19
- "@squiz/dx-json-schema-lib": "1.15.0",
20
- "@squiz/dx-logger-lib": "1.15.0",
21
- "@squiz/virus-scanner-lib": "1.15.0",
16
+ "@squiz/component-lib": "1.16.0",
17
+ "@squiz/component-web-api-lib": "1.16.0",
18
+ "@squiz/dx-common-lib": "1.16.0",
19
+ "@squiz/dx-json-schema-lib": "1.16.0",
20
+ "@squiz/dx-logger-lib": "1.16.0",
21
+ "@squiz/virus-scanner-lib": "1.16.0",
22
22
  "@types/cli-color": "2.0.2",
23
23
  "@types/express": "4.17.17",
24
24
  "@types/jest": "28.1.8",
@@ -32,12 +32,12 @@
32
32
  "typescript": "4.9.4"
33
33
  },
34
34
  "dependencies": {
35
- "@squiz/render-runtime-lib": "1.15.0",
35
+ "@squiz/render-runtime-lib": "1.16.0",
36
36
  "archiver": "5.3.1",
37
37
  "axios": "1.3.2",
38
38
  "cli-color": "^2.0.2",
39
39
  "open": "^8.4.0",
40
40
  "supertest": "^6.2.3"
41
41
  },
42
- "gitHead": "e5c51e3f2bdd1b61437d0abd41ffdf414c045705"
42
+ "gitHead": "6fbf11b4507a80f8ef6dd09b489bbebf2bcfbac1"
43
43
  }
@@ -1,4 +1,4 @@
1
- import fs from 'fs-extra';
1
+ import fse from 'fs-extra';
2
2
  import path from 'path';
3
3
  import { getLogger, LoggerOptions } from '@squiz/dx-logger-lib';
4
4
 
@@ -31,18 +31,18 @@ export default async function componentInit(options: {
31
31
  const destination = path.resolve(options.destination);
32
32
 
33
33
  // If the destination folder already exists, and it's not empty, throw an error
34
- if (await fs.pathExists(destination)) {
35
- const files = await fs.readdir(destination);
34
+ if (await fse.pathExists(destination)) {
35
+ const files = await fse.readdir(destination);
36
36
  if (files.length > 0) {
37
37
  throw new Error('The destination folder already exists and is not empty.');
38
38
  }
39
39
  } else {
40
40
  // If the destination folder doesn't exist, create it
41
- await fs.mkdirp(destination);
41
+ await fse.mkdirp(destination);
42
42
  }
43
43
 
44
44
  // Copy the contents of the source folder to the destination folder
45
- await fs.copy(sourceFolder, destination);
45
+ await fse.copy(sourceFolder, destination);
46
46
 
47
47
  logger.info('Component initialized!');
48
48
  }
@@ -6,6 +6,13 @@
6
6
  "description": "Default example component",
7
7
  "version": "0.0.1",
8
8
  "mainFunction": "main",
9
+ "icon": {
10
+ "id": "fiber_new",
11
+ "color": {
12
+ "type": "enum",
13
+ "value": "green"
14
+ }
15
+ },
9
16
  "functions": [
10
17
  {
11
18
  "name": "main",
@@ -6,6 +6,15 @@
6
6
  "description": "Default example component",
7
7
  "version": "0.0.1",
8
8
  "mainFunction": "main",
9
+
10
+ "icon": {
11
+ "id": "fiber_new",
12
+ "color": {
13
+ "type": "enum",
14
+ "value": "blue"
15
+ }
16
+ },
17
+
9
18
  "functions": [
10
19
  {
11
20
  "name": "main",