@next-core/build-config-factory 2.17.1 → 2.17.5

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/CHANGELOG.md CHANGED
@@ -3,151 +3,116 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [2.17.1](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.0...@next-core/build-config-factory@2.17.1) (2021-11-16)
7
-
6
+ ## [2.17.5](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.4...@next-core/build-config-factory@2.17.5) (2021-11-23)
8
7
 
9
- ### Bug Fixes
8
+ **Note:** Version bump only for package @next-core/build-config-factory
10
9
 
11
- * use compatible syntax for node.js ([7e15f67](https://github.com/easyops-cn/next-core/commit/7e15f67058a1420c4f8be0903b350ba5d3ee67d8))
12
10
 
13
11
 
14
12
 
15
13
 
14
+ ## [2.17.4](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.3...@next-core/build-config-factory@2.17.4) (2021-11-19)
16
15
 
17
- # [2.17.0](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.16.0...@next-core/build-config-factory@2.17.0) (2021-11-15)
18
16
 
17
+ ### Bug Fixes
19
18
 
20
- ### Features
21
-
22
- * general brick contracts for providers ([8a34620](https://github.com/easyops-cn/next-core/commit/8a34620617186cf706f152f62f11a32289f84c3e))
19
+ * fix postcss-loader after upgraded postcss to v8 ([d232c1d](https://github.com/easyops-cn/next-core/commit/d232c1dcad2f77bd1d6b558d6ec6db7f3fd9235e))
23
20
 
24
21
 
25
22
 
26
23
 
27
24
 
28
- # [2.16.0](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.41...@next-core/build-config-factory@2.16.0) (2021-11-15)
25
+ ## [2.17.3](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.2...@next-core/build-config-factory@2.17.3) (2021-11-18)
29
26
 
30
27
 
31
- ### Features
28
+ ### Bug Fixes
32
29
 
33
- * generate brick contracts ([dfa5b8f](https://github.com/easyops-cn/next-core/commit/dfa5b8f956bdb091782342f46c6c1a8f7e16feac))
30
+ * fix generating brick contracts ([6e94f82](https://github.com/easyops-cn/next-core/commit/6e94f8245df5a15c21b25d9f4de88cbc86d2212f))
34
31
 
35
32
 
36
33
 
37
34
 
38
35
 
39
- ## [2.15.41](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.40...@next-core/build-config-factory@2.15.41) (2021-11-11)
36
+ ## [2.17.2](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.1...@next-core/build-config-factory@2.17.2) (2021-11-16)
40
37
 
41
- **Note:** Version bump only for package @next-core/build-config-factory
38
+ ### Bug Fixes
42
39
 
40
+ - ignore worker files when building contracts ([aed987c](https://github.com/easyops-cn/next-core/commit/aed987ce536647eff342ba3c39ec6bc63d6555c8))
43
41
 
42
+ ## [2.17.1](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.0...@next-core/build-config-factory@2.17.1) (2021-11-16)
44
43
 
44
+ ### Bug Fixes
45
45
 
46
+ - use compatible syntax for node.js ([7e15f67](https://github.com/easyops-cn/next-core/commit/7e15f67058a1420c4f8be0903b350ba5d3ee67d8))
46
47
 
47
- ## [2.15.40](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.39...@next-core/build-config-factory@2.15.40) (2021-11-09)
48
+ # [2.17.0](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.16.0...@next-core/build-config-factory@2.17.0) (2021-11-15)
48
49
 
49
- **Note:** Version bump only for package @next-core/build-config-factory
50
+ ### Features
50
51
 
52
+ - general brick contracts for providers ([8a34620](https://github.com/easyops-cn/next-core/commit/8a34620617186cf706f152f62f11a32289f84c3e))
51
53
 
54
+ # [2.16.0](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.41...@next-core/build-config-factory@2.16.0) (2021-11-15)
52
55
 
56
+ ### Features
53
57
 
58
+ - generate brick contracts ([dfa5b8f](https://github.com/easyops-cn/next-core/commit/dfa5b8f956bdb091782342f46c6c1a8f7e16feac))
54
59
 
55
- ## [2.15.39](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.38...@next-core/build-config-factory@2.15.39) (2021-11-02)
60
+ ## [2.15.41](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.40...@next-core/build-config-factory@2.15.41) (2021-11-11)
56
61
 
57
62
  **Note:** Version bump only for package @next-core/build-config-factory
58
63
 
64
+ ## [2.15.40](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.39...@next-core/build-config-factory@2.15.40) (2021-11-09)
59
65
 
66
+ **Note:** Version bump only for package @next-core/build-config-factory
60
67
 
68
+ ## [2.15.39](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.38...@next-core/build-config-factory@2.15.39) (2021-11-02)
61
69
 
70
+ **Note:** Version bump only for package @next-core/build-config-factory
62
71
 
63
72
  ## [2.15.38](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.37...@next-core/build-config-factory@2.15.38) (2021-11-01)
64
73
 
65
74
  **Note:** Version bump only for package @next-core/build-config-factory
66
75
 
67
-
68
-
69
-
70
-
71
76
  ## [2.15.37](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.36...@next-core/build-config-factory@2.15.37) (2021-11-01)
72
77
 
73
78
  **Note:** Version bump only for package @next-core/build-config-factory
74
79
 
75
-
76
-
77
-
78
-
79
80
  ## [2.15.36](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.35...@next-core/build-config-factory@2.15.36) (2021-10-28)
80
81
 
81
82
  **Note:** Version bump only for package @next-core/build-config-factory
82
83
 
83
-
84
-
85
-
86
-
87
84
  ## [2.15.35](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.34...@next-core/build-config-factory@2.15.35) (2021-10-28)
88
85
 
89
86
  **Note:** Version bump only for package @next-core/build-config-factory
90
87
 
91
-
92
-
93
-
94
-
95
88
  ## [2.15.34](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.33...@next-core/build-config-factory@2.15.34) (2021-10-25)
96
89
 
97
90
  **Note:** Version bump only for package @next-core/build-config-factory
98
91
 
99
-
100
-
101
-
102
-
103
92
  ## [2.15.33](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.32...@next-core/build-config-factory@2.15.33) (2021-10-22)
104
93
 
105
94
  **Note:** Version bump only for package @next-core/build-config-factory
106
95
 
107
-
108
-
109
-
110
-
111
96
  ## [2.15.32](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.31...@next-core/build-config-factory@2.15.32) (2021-10-21)
112
97
 
113
98
  **Note:** Version bump only for package @next-core/build-config-factory
114
99
 
115
-
116
-
117
-
118
-
119
100
  ## [2.15.31](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.30...@next-core/build-config-factory@2.15.31) (2021-10-20)
120
101
 
121
102
  **Note:** Version bump only for package @next-core/build-config-factory
122
103
 
123
-
124
-
125
-
126
-
127
104
  ## [2.15.30](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.29...@next-core/build-config-factory@2.15.30) (2021-10-20)
128
105
 
129
106
  **Note:** Version bump only for package @next-core/build-config-factory
130
107
 
131
-
132
-
133
-
134
-
135
108
  ## [2.15.29](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.28...@next-core/build-config-factory@2.15.29) (2021-10-13)
136
109
 
137
110
  **Note:** Version bump only for package @next-core/build-config-factory
138
111
 
139
-
140
-
141
-
142
-
143
112
  ## [2.15.28](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.27...@next-core/build-config-factory@2.15.28) (2021-10-12)
144
113
 
145
114
  **Note:** Version bump only for package @next-core/build-config-factory
146
115
 
147
-
148
-
149
-
150
-
151
116
  ## [2.15.27](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.15.26...@next-core/build-config-factory@2.15.27) (2021-09-30)
152
117
 
153
118
  **Note:** Version bump only for package @next-core/build-config-factory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/build-config-factory",
3
- "version": "2.17.1",
3
+ "version": "2.17.5",
4
4
  "description": "build config factory",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/build-config-factory",
6
6
  "license": "GPL-3.0",
@@ -18,10 +18,10 @@
18
18
  },
19
19
  "sideEffects": false,
20
20
  "dependencies": {
21
- "@next-core/brick-utils": "^2.30.0",
21
+ "@next-core/brick-utils": "^2.30.2",
22
22
  "@next-core/repo-config": "^0.2.1",
23
23
  "@next-core/typedoc-plugin-filter-inherit": "^1.0.0",
24
- "@next-core/webpack-config-factory": "^2.14.0",
24
+ "@next-core/webpack-config-factory": "^2.14.3",
25
25
  "change-case": "^4.1.2",
26
26
  "chokidar": "^3.5.2",
27
27
  "fs-extra": "^10.0.0",
@@ -31,11 +31,11 @@
31
31
  "lodash": "^4.17.21",
32
32
  "meow": "^9.0.0",
33
33
  "moment": "^2.29.1",
34
- "npmlog": "^5.0.0",
34
+ "npmlog": "^6.0.0",
35
35
  "prettier": "^2.4.1",
36
36
  "rimraf": "^3.0.2",
37
37
  "typedoc": "^0.19.2",
38
38
  "typedoc-plugin-no-inherit": "^1.2.2"
39
39
  },
40
- "gitHead": "d66d0bc68766222ffc09adea6caf1bbaeaab143e"
40
+ "gitHead": "d49372740260654c30e7b59c31c94c722ac3706f"
41
41
  }
@@ -9,6 +9,9 @@ const {
9
9
  } = require("@next-core/webpack-config-factory");
10
10
 
11
11
  module.exports = function generateBrickContracts(dir, isProviderBricks) {
12
+ console.log("Analyzing brick contracts...");
13
+ const startTime = Date.now();
14
+
12
15
  const brickEntriesFilePath = path.join(dir, "dist/brick-entries.json");
13
16
  const brickEntries = isProviderBricks
14
17
  ? { index: "src/index.ts" }
@@ -18,19 +21,19 @@ module.exports = function generateBrickContracts(dir, isProviderBricks) {
18
21
  if (err || stats.hasErrors()) {
19
22
  // [Handle errors here](#error-handling)
20
23
  console.error("Failed to generate brick contracts:");
21
- console.error(err || stats);
24
+ console.error(err || stats.toString());
22
25
  process.exitCode = 1;
23
26
  return;
24
27
  }
25
28
 
26
- try {
27
- // Done processing
28
- console.log("contracts.log generated.");
29
-
30
- if (!isProviderBricks) {
31
- fs.remove(brickEntriesFilePath);
32
- }
29
+ // Done processing
30
+ console.log(
31
+ `contracts.log generated in ${((Date.now() - startTime) / 1000).toFixed(
32
+ 2
33
+ )}s.`
34
+ );
33
35
 
36
+ try {
34
37
  const pkg = await fs.readJson(path.join(dir, "package.json"));
35
38
  const pkgLastName = pkg.name.split("/")[1];
36
39
  const bricks = (await fs.readJson(path.join(dir, "dist/bricks.json")))
@@ -88,8 +91,6 @@ module.exports = function generateBrickContracts(dir, isProviderBricks) {
88
91
  deps: depsMap.get(brick),
89
92
  }));
90
93
 
91
- console.log({ implementedBricks, depsMap });
92
-
93
94
  await fs.writeFile(
94
95
  path.join(dir, "deploy/contract.yaml"),
95
96
  yaml.safeDump(
@@ -97,8 +98,12 @@ module.exports = function generateBrickContracts(dir, isProviderBricks) {
97
98
  JSON.parse(JSON.stringify({ contracts: implementedBricks }))
98
99
  )
99
100
  );
101
+
102
+ if (!isProviderBricks) {
103
+ fs.remove(brickEntriesFilePath);
104
+ }
100
105
  } catch (error) {
101
- console.error(error);
106
+ console.error("Failed to analyse brick contracts:", error);
102
107
  process.exitCode = 1;
103
108
  }
104
109
  });