dependfix 0.0.0 → 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/package.json CHANGED
@@ -1,95 +1,83 @@
1
1
  {
2
2
  "name": "dependfix",
3
- "version": "0.0.0",
4
- "description": "这是一个面向多项目维护者的自动化工具,旨在自动处理 Dependabot 和 Code Scanning 产生的大量简单、重复的告警修复工作,如依赖版本升级、安全漏洞修复等,从而显著提升维护效率。",
3
+ "version": "0.2.0",
4
+ "description": "一个自动化修复 github security 告警的方案",
5
5
  "author": "CaoMeiYouRen",
6
- "private": false,
7
6
  "license": "MIT",
8
- "main": "./dist/index.cjs",
7
+ "type": "module",
8
+ "keywords": [
9
+ "security",
10
+ "dependabot",
11
+ "code-scanning",
12
+ "dependabot-alerts",
13
+ "cli"
14
+ ],
15
+ "homepage": "https://github.com/dependfix/dependfix#readme",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/dependfix/dependfix.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/dependfix/dependfix/issues"
22
+ },
23
+ "main": "./dist/index.mjs",
9
24
  "module": "./dist/index.mjs",
10
25
  "types": "./dist/index.d.mts",
11
26
  "exports": {
12
27
  ".": {
28
+ "types": "./dist/index.d.mts",
13
29
  "import": "./dist/index.mjs",
14
- "require": "./dist/index.cjs",
15
- "types": "./dist/index.d.mts"
30
+ "default": "./dist/index.mjs"
16
31
  },
17
32
  "./package.json": "./package.json"
18
33
  },
19
34
  "files": [
20
35
  "dist"
21
36
  ],
37
+ "bin": {
38
+ "dependfix": "./dist/bin.mjs"
39
+ },
22
40
  "engines": {
23
41
  "node": ">=20"
24
42
  },
25
- "scripts": {
26
- "release": "semantic-release",
27
- "lint": "cross-env NODE_ENV=production eslint . --fix",
28
- "prebuild": "rimraf dist",
29
- "build": "cross-env NODE_ENV=production tsdown",
30
- "dev": "cross-env NODE_ENV=development tsx watch src/index.ts",
31
- "dev:tsdown": "cross-env NODE_ENV=development tsdown --watch",
32
- "start": "node ./dist/index",
33
- "start:tsx": "cross-env NODE_ENV=production tsx src/index.ts",
34
- "commit": "cz",
35
- "prepare": "husky",
36
- "typecheck": "tsc --noEmit",
37
- "test": "vitest run",
38
- "test:coverage": "vitest run --coverage"
43
+ "dependencies": {
44
+ "@octokit/rest": "^22.0.1",
45
+ "citty": "^0.2.2",
46
+ "dayjs": "^1.11.21",
47
+ "dotenv": "^17.4.2",
48
+ "fs-extra": "^11.4.0",
49
+ "isomorphic-unfetch": "^4.0.2",
50
+ "lodash-es": "^4.18.1",
51
+ "p-queue": "^9.3.3",
52
+ "tslib": "^2.8.1",
53
+ "yaml": "^2.9.0",
54
+ "zod": "^4.4.3",
55
+ "zx": "^8.8.5",
56
+ "@dependfix/core": "0.2.0",
57
+ "@dependfix/skills": "0.1.0"
39
58
  },
40
59
  "devDependencies": {
60
+ "@octokit/request-error": "^7.1.0",
41
61
  "@types/debug": "^4.1.13",
42
- "@types/node": "^26.0.1",
43
- "commitizen": "^4.3.2",
44
- "commitlint": "^21.2.1",
45
- "commitlint-config-cmyr": "^1.0.1",
62
+ "@types/fs-extra": "^11.0.4",
63
+ "@types/lodash-es": "^4.17.12",
64
+ "@types/node": "^26.1.2",
46
65
  "cross-env": "^10.0.0",
47
- "cz-conventional-changelog-cmyr": "^2.0.0",
48
66
  "debug": "^4.4.3",
49
- "eslint": "^9.34.0",
50
- "eslint-config-cmyr": "^2.3.1",
51
- "husky": "^9.1.7",
52
- "lint-staged": "^17.2.0",
67
+ "nock": "^14.0.17",
53
68
  "rimraf": "^6.1.3",
54
- "semantic-release": "^25.0.8",
55
- "semantic-release-cmyr-config": "^1.0.2",
56
- "tsdown": "^0.22.0",
69
+ "tsdown": "^0.22.14",
57
70
  "tsx": "^4.23.1",
58
- "typescript": "^6.0.2",
59
- "vite": "^7.0.5",
60
- "vitest": "^3.2.4"
61
- },
62
- "config": {},
63
- "lint-staged": {
64
- "*.{js,ts}": [
65
- "npm run lint",
66
- "git add"
67
- ]
71
+ "typescript": "^5.9.3"
68
72
  },
69
- "keywords": [
70
- "dependabot",
71
- "automation",
72
- "security-fixes",
73
- "dependency-management",
74
- "github-actions",
75
- "typescript"
76
- ],
77
- "homepage": "https://github.com/CaoMeiYouRen/dependfix#readme",
78
- "repository": {
79
- "type": "git",
80
- "url": "git+https://github.com/CaoMeiYouRen/dependfix.git"
81
- },
82
- "bugs": {
83
- "url": "https://github.com/CaoMeiYouRen/dependfix/issues"
84
- },
85
- "dependencies": {
86
- "tslib": "^2.8.1"
87
- },
88
- "type": "module",
89
- "publishConfig": {
90
- "access": "public"
91
- },
92
- "changelog": {
93
- "language": "zh"
73
+ "scripts": {
74
+ "build": "tsdown",
75
+ "prebuild": "rimraf dist",
76
+ "dev": "cross-env NODE_ENV=development tsx watch src/index.ts",
77
+ "dev:tsdown": "cross-env NODE_ENV=development tsdown --watch",
78
+ "start": "node ./dist/index.mjs",
79
+ "start:tsx": "cross-env NODE_ENV=production tsx src/index.ts",
80
+ "typecheck": "tsc --noEmit",
81
+ "lint": "eslint . --fix"
94
82
  }
95
83
  }
package/dist/index.cjs DELETED
@@ -1,35 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- //#region src/env.ts
4
- const __PROD__ = process.env.NODE_ENV === "production";
5
- const __DEV__ = process.env.NODE_ENV === "development";
6
-
7
- //#endregion
8
- //#region src/index.ts
9
- /**
10
- * say hello
11
- *
12
- * @author CaoMeiYouRen
13
- * @date 2020-11-28
14
- * @export
15
- */
16
- function hello() {
17
- if (__PROD__) console.log("Hello production");
18
- if (__DEV__) console.log("Hello development");
19
- console.log("你好,世界!");
20
- }
21
- console.log("__dirname:", typeof __dirname !== "undefined" ? __dirname : "not defined");
22
- console.log("__filename:", typeof __filename !== "undefined" ? __filename : "not defined");
23
- try {
24
- const os = require && require("node:os");
25
- console.log("require(\"os\"):", !!os);
26
- } catch (e) {
27
- console.log("require is not available:", e);
28
- }
29
- console.log("import.meta.url:", require("url").pathToFileURL(__filename).href || "not defined");
30
- console.log("import.meta.dirname:", __dirname || "not defined");
31
- console.log("import.meta.filename:", __filename || "not defined");
32
-
33
- //#endregion
34
- exports.hello = hello;
35
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/env.ts","../src/index.ts"],"sourcesContent":["export const __PROD__ = process.env.NODE_ENV === 'production'\nexport const __DEV__ = process.env.NODE_ENV === 'development'\n","import { __PROD__, __DEV__ } from '@/env'\n/**\n * say hello\n *\n * @author CaoMeiYouRen\n * @date 2020-11-28\n * @export\n */\nexport function hello() {\n if (__PROD__) {\n console.log('Hello production')\n }\n if (__DEV__) {\n console.log('Hello development')\n }\n console.log('你好,世界!')\n}\n\n// 测试 ESM 中的 CommonJS 变量(需要 shims 支持)\nconsole.log('__dirname:', typeof __dirname !== 'undefined' ? __dirname : 'not defined')\nconsole.log('__filename:', typeof __filename !== 'undefined' ? __filename : 'not defined')\n\n// 测试 ESM 中的 require(Node.js 平台自动注入)\ntry {\n const os = require && require('os')\n console.log('require(\"os\"):', !!os)\n} catch (e) {\n console.log('require is not available:', e)\n}\n\n// 测试 CommonJS 中的 ESM 变量(始终可用)\nconsole.log('import.meta.url:', import.meta.url || 'not defined')\nconsole.log('import.meta.dirname:', import.meta.dirname || 'not defined')\nconsole.log('import.meta.filename:', import.meta.filename || 'not defined')\n"],"mappings":";;;AAAA,MAAa,WAAW,QAAQ,IAAI,aAAa;AACjD,MAAa,UAAU,QAAQ,IAAI,aAAa;;;;;;;;;;;ACOhD,SAAgB,QAAQ;CACpB,IAAI,UACA,QAAQ,IAAI,kBAAkB;CAElC,IAAI,SACA,QAAQ,IAAI,mBAAmB;CAEnC,QAAQ,IAAI,QAAQ;AACxB;AAGA,QAAQ,IAAI,cAAc,OAAO,cAAc,cAAc,YAAY,aAAa;AACtF,QAAQ,IAAI,eAAe,OAAO,eAAe,cAAc,aAAa,aAAa;AAGzF,IAAI;CACA,MAAM,KAAK,WAAW,QAAQ,SAAI;CAClC,QAAQ,IAAI,oBAAkB,CAAC,CAAC,EAAE;AACtC,SAAS,GAAG;CACR,QAAQ,IAAI,6BAA6B,CAAC;AAC9C;AAGA,QAAQ,IAAI,qEAAuC,aAAa;AAChE,QAAQ,IAAI,qCAA+C,aAAa;AACxE,QAAQ,IAAI,uCAAiD,aAAa"}
package/dist/index.d.cts DELETED
@@ -1,12 +0,0 @@
1
- //#region src/index.d.ts
2
- /**
3
- * say hello
4
- *
5
- * @author CaoMeiYouRen
6
- * @date 2020-11-28
7
- * @export
8
- */
9
- declare function hello(): void;
10
- //#endregion
11
- export { hello };
12
- //# sourceMappingURL=index.d.cts.map