@next-core/build-next-bricks 1.1.0 → 1.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/build-next-bricks",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Build next bricks",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/build-next-bricks",
6
6
  "license": "GPL-3.0",
@@ -46,5 +46,5 @@
46
46
  "typescript": "^5.0.2",
47
47
  "webpack": "^5.76.2"
48
48
  },
49
- "gitHead": "286f6b5ed8f4c5dc42e6c361b994d456b1613205"
49
+ "gitHead": "f4639c59925a6f007fdf03630bcb9a9b0163cd8b"
50
50
  }
package/src/scanBricks.js CHANGED
@@ -248,12 +248,14 @@ export default async function scanBricks(packageDir) {
248
248
  }
249
249
  } else if (
250
250
  callee.type === "Identifier" &&
251
- callee.name === "wrapBrick" &&
251
+ (callee.name === "wrapBrick" || callee.name === "unwrapProvider") &&
252
252
  args.length >= 1
253
253
  ) {
254
254
  const { type, value: brickName } = args[0];
255
255
  if (type !== "StringLiteral") {
256
- throw new Error("Please call `wrapBrick` only with literal string");
256
+ throw new Error(
257
+ `Please call \`${callee.name}\` only with literal string`
258
+ );
257
259
  }
258
260
  const bricks = usingWrappedBricks.get(filePath);
259
261
  if (bricks) {