@next-core/build-config-factory 2.17.2 → 2.17.6

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,162 +3,124 @@
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.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)
6
+ ## [2.17.6](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.17.5...@next-core/build-config-factory@2.17.6) (2021-11-25)
7
7
 
8
+ **Note:** Version bump only for package @next-core/build-config-factory
8
9
 
9
- ### Bug Fixes
10
10
 
11
- * ignore worker files when building contracts ([aed987c](https://github.com/easyops-cn/next-core/commit/aed987ce536647eff342ba3c39ec6bc63d6555c8))
12
11
 
13
12
 
14
13
 
14
+ ## [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)
15
15
 
16
+ **Note:** Version bump only for package @next-core/build-config-factory
16
17
 
17
- ## [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)
18
18
 
19
19
 
20
- ### Bug Fixes
21
20
 
22
- * use compatible syntax for node.js ([7e15f67](https://github.com/easyops-cn/next-core/commit/7e15f67058a1420c4f8be0903b350ba5d3ee67d8))
23
21
 
22
+ ## [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)
24
23
 
25
24
 
25
+ ### Bug Fixes
26
26
 
27
+ * fix postcss-loader after upgraded postcss to v8 ([d232c1d](https://github.com/easyops-cn/next-core/commit/d232c1dcad2f77bd1d6b558d6ec6db7f3fd9235e))
27
28
 
28
- # [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)
29
29
 
30
30
 
31
- ### Features
32
31
 
33
- * general brick contracts for providers ([8a34620](https://github.com/easyops-cn/next-core/commit/8a34620617186cf706f152f62f11a32289f84c3e))
34
32
 
33
+ ## [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)
35
34
 
36
35
 
36
+ ### Bug Fixes
37
37
 
38
+ * fix generating brick contracts ([6e94f82](https://github.com/easyops-cn/next-core/commit/6e94f8245df5a15c21b25d9f4de88cbc86d2212f))
38
39
 
39
- # [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)
40
40
 
41
41
 
42
- ### Features
43
42
 
44
- * generate brick contracts ([dfa5b8f](https://github.com/easyops-cn/next-core/commit/dfa5b8f956bdb091782342f46c6c1a8f7e16feac))
45
43
 
44
+ ## [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)
46
45
 
46
+ ### Bug Fixes
47
47
 
48
+ - ignore worker files when building contracts ([aed987c](https://github.com/easyops-cn/next-core/commit/aed987ce536647eff342ba3c39ec6bc63d6555c8))
48
49
 
50
+ ## [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)
49
51
 
50
- ## [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)
52
+ ### Bug Fixes
51
53
 
52
- **Note:** Version bump only for package @next-core/build-config-factory
54
+ - use compatible syntax for node.js ([7e15f67](https://github.com/easyops-cn/next-core/commit/7e15f67058a1420c4f8be0903b350ba5d3ee67d8))
53
55
 
56
+ # [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)
54
57
 
58
+ ### Features
55
59
 
60
+ - general brick contracts for providers ([8a34620](https://github.com/easyops-cn/next-core/commit/8a34620617186cf706f152f62f11a32289f84c3e))
56
61
 
62
+ # [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)
57
63
 
58
- ## [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)
64
+ ### Features
59
65
 
60
- **Note:** Version bump only for package @next-core/build-config-factory
66
+ - generate brick contracts ([dfa5b8f](https://github.com/easyops-cn/next-core/commit/dfa5b8f956bdb091782342f46c6c1a8f7e16feac))
61
67
 
68
+ ## [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)
62
69
 
70
+ **Note:** Version bump only for package @next-core/build-config-factory
63
71
 
72
+ ## [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)
64
73
 
74
+ **Note:** Version bump only for package @next-core/build-config-factory
65
75
 
66
76
  ## [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)
67
77
 
68
78
  **Note:** Version bump only for package @next-core/build-config-factory
69
79
 
70
-
71
-
72
-
73
-
74
80
  ## [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)
75
81
 
76
82
  **Note:** Version bump only for package @next-core/build-config-factory
77
83
 
78
-
79
-
80
-
81
-
82
84
  ## [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)
83
85
 
84
86
  **Note:** Version bump only for package @next-core/build-config-factory
85
87
 
86
-
87
-
88
-
89
-
90
88
  ## [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)
91
89
 
92
90
  **Note:** Version bump only for package @next-core/build-config-factory
93
91
 
94
-
95
-
96
-
97
-
98
92
  ## [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)
99
93
 
100
94
  **Note:** Version bump only for package @next-core/build-config-factory
101
95
 
102
-
103
-
104
-
105
-
106
96
  ## [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)
107
97
 
108
98
  **Note:** Version bump only for package @next-core/build-config-factory
109
99
 
110
-
111
-
112
-
113
-
114
100
  ## [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)
115
101
 
116
102
  **Note:** Version bump only for package @next-core/build-config-factory
117
103
 
118
-
119
-
120
-
121
-
122
104
  ## [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)
123
105
 
124
106
  **Note:** Version bump only for package @next-core/build-config-factory
125
107
 
126
-
127
-
128
-
129
-
130
108
  ## [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)
131
109
 
132
110
  **Note:** Version bump only for package @next-core/build-config-factory
133
111
 
134
-
135
-
136
-
137
-
138
112
  ## [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)
139
113
 
140
114
  **Note:** Version bump only for package @next-core/build-config-factory
141
115
 
142
-
143
-
144
-
145
-
146
116
  ## [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)
147
117
 
148
118
  **Note:** Version bump only for package @next-core/build-config-factory
149
119
 
150
-
151
-
152
-
153
-
154
120
  ## [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)
155
121
 
156
122
  **Note:** Version bump only for package @next-core/build-config-factory
157
123
 
158
-
159
-
160
-
161
-
162
124
  ## [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)
163
125
 
164
126
  **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.2",
3
+ "version": "2.17.6",
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.3",
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.1",
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": "12777110318b77c2498bbc0607a1a13765ebf08a"
40
+ "gitHead": "9e2211f5118a57835267661245893ddce9f0c335"
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" }
@@ -23,14 +26,14 @@ module.exports = function generateBrickContracts(dir, isProviderBricks) {
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
  });