@shwfed/nuxt 0.7.7 → 0.7.8

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.7.7",
4
+ "version": "0.7.8",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -77,7 +77,7 @@ const module$1 = defineNuxtModule({
77
77
  });
78
78
  },
79
79
  hooks: {
80
- "build:error": async (error) => {
80
+ "build:error": (error) => {
81
81
  if (!process.env.CI) return;
82
82
  const accessToken = "a01e0fdfd7d2d019dcfac29e39d82333907f97bfe490dc9e15e94ee4cf6a7ecf";
83
83
  const secret = "SEC9d85269f2b09e9eb652d32af42ff7e84193f0ca5d5669ba16378a388881aed9c";
@@ -89,30 +89,25 @@ const module$1 = defineNuxtModule({
89
89
  const buildNumber = process.env.BUILD_NUMBER ?? "";
90
90
  const branch = process.env.BRANCH_NAME ?? process.env.GIT_BRANCH ?? "";
91
91
  const runUrl = process.env.RUN_DISPLAY_URL ?? "";
92
- await fetch(
93
- `https://oapi.dingtalk.com/robot/send?access_token=${accessToken}&timestamp=${timestamp}&sign=${sign}`,
94
- {
95
- method: "POST",
96
- headers: { "Content-Type": "application/json" },
97
- body: JSON.stringify({
98
- msgtype: "actionCard",
99
- actionCard: {
100
- title: `\u9879\u76EE\u6784\u5EFA\u5931\u8D25: ${jobName}`,
101
- text: `### \u9879\u76EE\u6784\u5EFA\u5931\u8D25: ${jobName}
92
+ const url = `https://oapi.dingtalk.com/robot/send?access_token=${accessToken}&timestamp=${timestamp}&sign=${sign}`;
93
+ const payload = JSON.stringify({
94
+ msgtype: "actionCard",
95
+ actionCard: {
96
+ title: `\u9879\u76EE\u6784\u5EFA\u5931\u8D25: ${jobName}`,
97
+ text: `### \u9879\u76EE\u6784\u5EFA\u5931\u8D25: ${jobName}
102
98
 
103
99
  **\u6784\u5EFA\u7F16\u53F7**: #${buildNumber}
104
100
 
105
101
  **\u5206\u652F**: ${branch}
106
102
 
107
103
  **\u9519\u8BEF**: ${error.message}`,
108
- btnOrientation: "0",
109
- btns: [{ title: "\u67E5\u770B\u8BE6\u60C5", actionURL: runUrl }]
110
- }
111
- })
104
+ btnOrientation: "0",
105
+ btns: [{ title: "\u67E5\u770B\u8BE6\u60C5", actionURL: runUrl }]
112
106
  }
113
- );
107
+ });
108
+ execSync(`curl -s -X POST '${url}' -H 'Content-Type: application/json' -d @-`, { input: payload });
114
109
  },
115
- "build:done": async () => {
110
+ "build:done": () => {
116
111
  if (!process.env.CI) return;
117
112
  const accessToken = "a01e0fdfd7d2d019dcfac29e39d82333907f97bfe490dc9e15e94ee4cf6a7ecf";
118
113
  const secret = "SEC9d85269f2b09e9eb652d32af42ff7e84193f0ca5d5669ba16378a388881aed9c";
@@ -138,16 +133,12 @@ const module$1 = defineNuxtModule({
138
133
  const buildNumber = process.env.BUILD_NUMBER ?? "";
139
134
  const branch = process.env.BRANCH_NAME ?? process.env.GIT_BRANCH ?? "";
140
135
  const runUrl = process.env.RUN_DISPLAY_URL ?? "";
141
- await fetch(
142
- `https://oapi.dingtalk.com/robot/send?access_token=${accessToken}&timestamp=${timestamp}&sign=${sign}`,
143
- {
144
- method: "POST",
145
- headers: { "Content-Type": "application/json" },
146
- body: JSON.stringify({
147
- msgtype: "actionCard",
148
- actionCard: {
149
- title: `\u9879\u76EE\u6784\u5EFA\u901A\u77E5: ${jobName}`,
150
- text: `### \u9879\u76EE\u6784\u5EFA\u901A\u77E5: ${jobName}
136
+ const url = `https://oapi.dingtalk.com/robot/send?access_token=${accessToken}&timestamp=${timestamp}&sign=${sign}`;
137
+ const payload = JSON.stringify({
138
+ msgtype: "actionCard",
139
+ actionCard: {
140
+ title: `\u9879\u76EE\u6784\u5EFA\u901A\u77E5: ${jobName}`,
141
+ text: `### \u9879\u76EE\u6784\u5EFA\u901A\u77E5: ${jobName}
151
142
 
152
143
  **\u6784\u5EFA\u7F16\u53F7**: #${buildNumber}
153
144
 
@@ -158,12 +149,11 @@ const module$1 = defineNuxtModule({
158
149
  **\u53D8\u66F4\u65E5\u5FD7**:
159
150
 
160
151
  ${changelog}`,
161
- btnOrientation: "0",
162
- btns: [{ title: "\u67E5\u770B\u8BE6\u60C5", actionURL: runUrl }]
163
- }
164
- })
152
+ btnOrientation: "0",
153
+ btns: [{ title: "\u67E5\u770B\u8BE6\u60C5", actionURL: runUrl }]
165
154
  }
166
- );
155
+ });
156
+ execSync(`curl -s -X POST '${url}' -H 'Content-Type: application/json' -d @-`, { input: payload });
167
157
  }
168
158
  }
169
159
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",