ali-skills 0.1.8-beta.1 → 0.2.0
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/bin/cli.mjs +7 -7
- package/package.json +1 -3
- package/scripts/preinstall.mjs +0 -42
package/bin/cli.mjs
CHANGED
|
@@ -26,15 +26,15 @@ try {
|
|
|
26
26
|
|
|
27
27
|
请选择以下方式之一重新执行:
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
1. 配置内网源后重新执行:
|
|
30
|
+
npm config set registry ${INTERNAL_REGISTRY}
|
|
31
|
+
npx ali-skills
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
2. 使用 tnpx 执行:
|
|
34
|
+
tnpx ali-skills
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
3. 临时指定 registry 执行:
|
|
37
|
+
npx --registry ${INTERNAL_REGISTRY} ali-skills
|
|
38
38
|
`);
|
|
39
39
|
} else {
|
|
40
40
|
console.error(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ali-skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "The open agent skills ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"bin",
|
|
12
|
-
"scripts",
|
|
13
12
|
"README.md"
|
|
14
13
|
],
|
|
15
14
|
"keywords": [
|
|
@@ -26,7 +25,6 @@
|
|
|
26
25
|
"url": "git+http://gitlab.alibaba-inc.com/trip-tools/ali-skills.git"
|
|
27
26
|
},
|
|
28
27
|
"scripts": {
|
|
29
|
-
"preinstall": "node scripts/preinstall.mjs",
|
|
30
28
|
"publish:beta": "npm version prerelease --preid=beta --no-git-tag-version && npm publish --tag beta",
|
|
31
29
|
"publish:latest:patch": "npm version patch && npm publish && git push --follow-tags && tnpm sync ali-skills",
|
|
32
30
|
"publish:latest:minor": "npm version minor && npm publish && git push --follow-tags && tnpm sync ali-skills"
|
package/scripts/preinstall.mjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* 安装前检测 npm registry 是否为阿里内网源
|
|
4
|
-
* 内网包 @ali/cli-skills 只在内网 registry 上发布,非内网环境无法安装
|
|
5
|
-
*
|
|
6
|
-
* 注意:npx 默认使用 --ignore-scripts,此脚本在 npx 场景下不会触发
|
|
7
|
-
* 运行时检测逻辑在 bin/cli.mjs 中,此脚本仅覆盖 npm install 场景
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const INTERNAL_REGISTRY = 'https://registry.anpm.alibaba-inc.com';
|
|
11
|
-
const registry = (process.env.npm_config_registry || '').replace(/\/$/, '');
|
|
12
|
-
|
|
13
|
-
// 已配置内网源,直接通过
|
|
14
|
-
if (!registry || registry.includes('alibaba-inc.com') || registry.includes('anpm.alibaba')) {
|
|
15
|
-
process.exit(0);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
console.error(`
|
|
19
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
20
|
-
│ ali-skills 安装失败 │
|
|
21
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
22
|
-
│ │
|
|
23
|
-
│ 当前 npm registry 不是阿里内网源,无法安装内部依赖包 │
|
|
24
|
-
│ │
|
|
25
|
-
│ 当前 registry: ${registry.slice(0, 47).padEnd(47)} │
|
|
26
|
-
│ │
|
|
27
|
-
│ 请选择以下方式之一继续: │
|
|
28
|
-
│ │
|
|
29
|
-
│ ① 配置内网源后重新执行: │
|
|
30
|
-
│ npm config set registry ${INTERNAL_REGISTRY} │
|
|
31
|
-
│ npx ali-skills │
|
|
32
|
-
│ │
|
|
33
|
-
│ ② 使用 tnpx 执行: │
|
|
34
|
-
│ tnpx ali-skills │
|
|
35
|
-
│ │
|
|
36
|
-
│ ③ 临时指定 registry 执行: │
|
|
37
|
-
│ npx --registry ${INTERNAL_REGISTRY} ali-skills │
|
|
38
|
-
│ │
|
|
39
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
40
|
-
`);
|
|
41
|
-
|
|
42
|
-
process.exit(1);
|