@orderly.network/npm-release 0.0.2-alpha.5 → 0.0.2-alpha.7
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/index.mjs +7 -2
- package/package.json +6 -1
- package/.gitlab-ci.yml +0 -4
package/index.mjs
CHANGED
|
@@ -94,12 +94,17 @@ function getPackagePageUrl(pkgName) {
|
|
|
94
94
|
async function sendSlackNotify({ success, error }) {
|
|
95
95
|
if (!slackWebhookUrl) return;
|
|
96
96
|
|
|
97
|
+
const raw = npm.registry || "https://registry.npmjs.org";
|
|
98
|
+
const registry = raw.replace(/\/$/, "");
|
|
99
|
+
const isPublic = !npm.registry || registry === "https://registry.npmjs.org";
|
|
100
|
+
const registryLabel = isPublic ? "public" : "internal";
|
|
101
|
+
|
|
97
102
|
const { name: pkgName, version } = readPackageJson();
|
|
98
103
|
const packageUrl = getPackagePageUrl(pkgName);
|
|
99
104
|
const linkedPkg = `<${packageUrl}|${pkgName}@${version}>`;
|
|
100
105
|
const text = success
|
|
101
|
-
? `packages published successfully:\n${linkedPkg}`
|
|
102
|
-
: `packages publish failed:\n${linkedPkg}\n${error || "Unknown error"}`;
|
|
106
|
+
? `packages published successfully (${registryLabel} registry):\n${linkedPkg}`
|
|
107
|
+
: `packages publish failed (${registryLabel} registry):\n${linkedPkg}\n${error || "Unknown error"}`;
|
|
103
108
|
|
|
104
109
|
try {
|
|
105
110
|
const res = await fetch(slackWebhookUrl, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderly.network/npm-release",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.7",
|
|
4
4
|
"main": "index.mjs",
|
|
5
5
|
"module": "index.mjs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"release": "node index.mjs"
|
|
15
15
|
},
|
|
16
|
+
"files": [
|
|
17
|
+
"index.mjs",
|
|
18
|
+
"README.md",
|
|
19
|
+
"package.json"
|
|
20
|
+
],
|
|
16
21
|
"dependencies": {
|
|
17
22
|
"release-it": "^19.2.4",
|
|
18
23
|
"zx": "^8.8.5"
|
package/.gitlab-ci.yml
DELETED