@boses/github-clone 1.1.6 → 1.2.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,24 +1,33 @@
1
1
  {
2
2
  "name": "@boses/github-clone",
3
- "version": "1.1.6",
3
+ "version": "1.2.1",
4
4
  "main": "./dist/gitClone.js",
5
5
  "module": "./dist/gitClone.esm.js",
6
6
  "license": "MIT",
7
7
  "bin": {
8
8
  "g": "./dist/main.js"
9
9
  },
10
- "types": "./dist/src/gitClone.d.ts",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/gitClone.esm.js",
15
+ "require": "./dist/gitClone.js"
16
+ }
17
+ },
11
18
  "engines": {
12
- "node": ">=10.6.0"
19
+ "node": ">=22"
13
20
  },
21
+ "packageManager": "pnpm@10.32.0",
14
22
  "files": [
15
- "/dist"
23
+ "dist"
16
24
  ],
25
+ "sideEffects": false,
17
26
  "author": {
18
27
  "name": "boses",
19
28
  "email": "yangboses@gmail.com"
20
29
  },
21
- "description": "解决国内 Github clone 速度慢的工具",
30
+ "description": "解决国内 GitHub clone 速度慢的工具",
22
31
  "keywords": [
23
32
  "git",
24
33
  "github",
@@ -27,63 +36,49 @@
27
36
  ],
28
37
  "repository": {
29
38
  "type": "git",
30
- "url": "https://github.com/bosens-China/github-clone"
39
+ "url": "git+https://github.com/bosens-China/github-clone.git"
40
+ },
41
+ "homepage": "https://github.com/bosens-China/github-clone#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/bosens-China/github-clone/issues"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "provenance": true
31
48
  },
32
49
  "devDependencies": {
33
- "@babel/core": "^7.15.8",
34
- "@babel/plugin-transform-runtime": "^7.16.0",
35
- "@babel/preset-env": "^7.15.8",
36
- "@babel/preset-typescript": "^7.15.0",
37
- "@rollup/plugin-babel": "^5.3.0",
38
- "@rollup/plugin-commonjs": "^21.0.1",
39
- "@rollup/plugin-json": "^4.1.0",
40
- "@rollup/plugin-node-resolve": "^13.0.6",
41
- "@types/babel__core": "^7.1.16",
42
- "@types/fs-extra": "^9.0.13",
43
- "@types/jest": "^27.0.2",
44
- "@types/node": "^16.11.6",
45
- "@typescript-eslint/eslint-plugin": "^5.2.0",
46
- "@typescript-eslint/parser": "^5.2.0",
47
- "babel-jest": "^27.3.1",
48
- "commitizen": "^4.2.4",
49
- "cz-conventional-changelog": "3.3.0",
50
- "eslint": "^8.1.0",
51
- "eslint-config-prettier": "^8.3.0",
52
- "eslint-config-standard": "^16.0.3",
53
- "eslint-plugin-import": "^2.25.2",
54
- "eslint-plugin-node": "^11.1.0",
55
- "eslint-plugin-prettier": "^4.0.0",
56
- "eslint-plugin-promise": "^5.1.1",
57
- "fs-extra": "^10.0.0",
58
- "jest": "^27.3.1",
59
- "prettier": "^2.4.1",
60
- "rollup": "^2.58.3",
61
- "rollup-plugin-copy": "^3.4.0",
62
- "rollup-plugin-preserve-shebangs": "^0.2.0",
63
- "rollup-plugin-terser": "^7.0.2",
64
- "rollup-plugin-typescript2": "^0.30.0",
65
- "ts-node": "^10.4.0",
66
- "ts-node-dev": "^1.1.8",
67
- "tsconfig-paths": "^3.11.0",
68
- "tslib": "^2.3.1",
69
- "typescript": "^4.4.4"
50
+ "@eslint/js": "^10.0.1",
51
+ "@types/node": "^22.15.0",
52
+ "@vitest/coverage-v8": "^3.2.6",
53
+ "eslint": "^10.5.0",
54
+ "globals": "^17.6.0",
55
+ "husky": "^9.1.7",
56
+ "lint-staged": "^15.5.2",
57
+ "rolldown": "^1.1.1",
58
+ "typescript": "^5.8.0",
59
+ "typescript-eslint": "^8.61.1",
60
+ "vitest": "^3.2.1"
70
61
  },
71
62
  "dependencies": {
72
- "commander": "^7.0.0"
63
+ "commander": "^13.1.0",
64
+ "execa": "^9.6.1",
65
+ "picocolors": "^1.1.1",
66
+ "zod": "^3.25.76"
73
67
  },
74
68
  "scripts": {
75
- "lint": "eslint --ext .js,.ts src",
76
- "fix": "eslint --fix --ext .js,.ts src",
77
- "format": "prettier --write src",
78
- "commit": "cz",
79
- "dev": "tsnd --respawn main.ts",
80
- "test": "jest",
81
- "build": "rollup --config ./script/rollup.config.js",
82
- "build-watch": "rollup --config ./script/rollup.config.js --watch"
69
+ "dev": "node --experimental-strip-types --watch src/cli/index.ts",
70
+ "test": "vitest run",
71
+ "test:coverage": "vitest run --coverage",
72
+ "lint": "eslint src test",
73
+ "lint:fix": "eslint --fix src test",
74
+ "format": "eslint --fix src test",
75
+ "type-check": "tsc --noEmit",
76
+ "prebuild": "node --eval \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
77
+ "build": "rolldown -c rolldown.config.ts && tsc -p tsconfig.build.json",
78
+ "prepublishOnly": "pnpm run build",
79
+ "prepare": "husky"
83
80
  },
84
- "config": {
85
- "commitizen": {
86
- "path": "./node_modules/cz-conventional-changelog"
87
- }
81
+ "lint-staged": {
82
+ "*.{ts,mjs}": "eslint --fix"
88
83
  }
89
84
  }
@@ -1,11 +0,0 @@
1
- export declare const DEFAULTPATH = "github.com.cnpmjs.org";
2
- /**
3
- * 读取配置
4
- *
5
- */
6
- export declare const getAddress: () => string;
7
- /**
8
- * 设置配置
9
- *
10
- */
11
- export declare const setAddress: (address: string) => void;
@@ -1,9 +0,0 @@
1
- interface Options {
2
- dirName: string;
3
- branch: string;
4
- mirrorAddress: string;
5
- cwd: string;
6
- silence: boolean;
7
- }
8
- declare const clone: (url: string, options?: Partial<Options> | undefined) => void;
9
- export default clone;
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,17 +0,0 @@
1
- /**
2
- * 替换git的远程推送源地址,这里暂定origin名称为固定的
3
- */
4
- export declare const setGitSource: (dir: string, url: string) => void;
5
- /**
6
- * 根据github的url返回对应的文件夹名称
7
- * https://github.com.cnpmjs.org/bosens-China/github-clone会返回github-clone
8
- *
9
- */
10
- export declare const getDir: (url: string) => string;
11
- export declare const isGithubLink: (url: string) => boolean;
12
- /**
13
- * 将当前的网站替换成镜像网站,例如
14
- * https://github.com/bosens-China/github-clone会被替换成
15
- * https://github.com.cnpmjs.org/bosens-China/github-clone
16
- */
17
- export declare const replaceMirror: (currentWebsite: string, replaceWebsite: string) => string;
File without changes