@umijs/plugins 4.0.0-canary.20230207.1 → 4.0.0-canary.20230210.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.
@@ -0,0 +1,3 @@
1
+ import { IApi } from 'umi';
2
+ declare const _default: (api: IApi) => void;
3
+ export default _default;
@@ -0,0 +1,66 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/confetti.ts
20
+ var confetti_exports = {};
21
+ __export(confetti_exports, {
22
+ default: () => confetti_default
23
+ });
24
+ module.exports = __toCommonJS(confetti_exports);
25
+ var import_plugin_utils = require("umi/plugin-utils");
26
+ var handleConfetti = () => {
27
+ const confettiShell = `
28
+ open raycast://confetti;
29
+ exit;
30
+ `;
31
+ const confetti = (0, import_plugin_utils.crossSpawn)(confettiShell, [], {
32
+ stdio: "pipe",
33
+ shell: true
34
+ });
35
+ confetti.on("error", (err) => {
36
+ const errStr = "[confetti] " + err;
37
+ import_plugin_utils.logger.error(errStr);
38
+ });
39
+ confetti.stderr && confetti.stderr.on("data", () => {
40
+ const err = `[confetti] 未安装 Raycast , 请安装后尝试 https://www.raycast.com`;
41
+ import_plugin_utils.logger.error(err);
42
+ });
43
+ };
44
+ var confetti_default = (api) => {
45
+ api.describe({
46
+ key: "confetti",
47
+ config: {
48
+ schema(joi) {
49
+ return joi.object();
50
+ }
51
+ },
52
+ enableBy: api.EnableBy.config
53
+ });
54
+ api.onBuildComplete(({ err }) => {
55
+ if (!err) {
56
+ handleConfetti();
57
+ }
58
+ });
59
+ api.onDevCompileDone(({ isFirstCompile }) => {
60
+ if (isFirstCompile) {
61
+ handleConfetti();
62
+ }
63
+ });
64
+ };
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.0-canary.20230207.1",
3
+ "version": "4.0.0-canary.20230210.1",
4
4
  "description": "@umijs/plugins",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/plugins#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -29,7 +29,7 @@
29
29
  "@ant-design/pro-components": "^2.0.1",
30
30
  "@tanstack/react-query": "^4.22.0",
31
31
  "@tanstack/react-query-devtools": "^4.22.0",
32
- "@umijs/bundler-utils": "4.0.0-canary.20230207.1",
32
+ "@umijs/bundler-utils": "4.0.0-canary.20230210.1",
33
33
  "@umijs/valtio": "^1.0.3",
34
34
  "antd-dayjs-webpack-plugin": "^1.0.6",
35
35
  "axios": "^0.27.2",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "antd": "^4.24.1",
56
- "umi": "4.0.0-canary.20230207.1"
56
+ "umi": "4.0.0-canary.20230210.1"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"