@reviewflow/sdk 0.0.0-stage → 6.22.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.
Files changed (50) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +86 -2
  3. package/build/files-node.mjs +70 -0
  4. package/build/git-node.mjs +1792 -0
  5. package/build/index-browser.es.js +3328 -0
  6. package/build/index-node.mjs +3328 -0
  7. package/package.json +135 -3
  8. package/src/api/pullRequest.ts +617 -0
  9. package/src/config/insertCheckoutEntry.ts +54 -0
  10. package/src/diff/diffPaths.ts +78 -0
  11. package/src/diff/impacts.ts +47 -0
  12. package/src/diff/readingOrder.ts +428 -0
  13. package/src/diff/themes.ts +105 -0
  14. package/src/diff/types.ts +141 -0
  15. package/src/files/editableFile.ts +163 -0
  16. package/src/files.ts +13 -0
  17. package/src/git/groupDiffPaths.ts +134 -0
  18. package/src/git/manifests.ts +96 -0
  19. package/src/git/moduleBindings.ts +571 -0
  20. package/src/git/pullRequestDiff.ts +159 -0
  21. package/src/git/readBranchDiff.ts +359 -0
  22. package/src/git/readImpacts.ts +797 -0
  23. package/src/git/readingOrder.ts +190 -0
  24. package/src/git/run.ts +213 -0
  25. package/src/git.ts +38 -0
  26. package/src/github/applySuggestions.ts +399 -0
  27. package/src/github/editPullRequest.ts +790 -0
  28. package/src/github/fetchCompareDiff.ts +21 -0
  29. package/src/github/imageProxies.ts +43 -0
  30. package/src/github/lineDiff.ts +145 -0
  31. package/src/github/prQuery.ts +298 -0
  32. package/src/github/pullRequestDetail.ts +1347 -0
  33. package/src/github/pullRequestHead.ts +65 -0
  34. package/src/github/pullRequestRevisions.ts +124 -0
  35. package/src/github/transport.ts +171 -0
  36. package/src/index.ts +35 -0
  37. package/src/reviewflow/board.ts +333 -0
  38. package/src/reviewflow/changedParts.ts +80 -0
  39. package/src/reviewflow/checksFromReviewflow.ts +75 -0
  40. package/src/reviewflow/client.ts +589 -0
  41. package/src/reviewflow/follow.ts +345 -0
  42. package/src/reviewflow/status.ts +17 -0
  43. package/src/reviewflow/stream.ts +199 -0
  44. package/src/types/entities.ts +8 -0
  45. package/src/types/ids.ts +1 -0
  46. package/src/types/reviewflow.ts +32 -0
  47. package/src/utils/pullRequestEdit.ts +108 -0
  48. package/src/utils/pullRequestPart.ts +12 -0
  49. package/src/utils/pullRequestReaction.ts +19 -0
  50. package/src/utils/pullRequestSuggestion.ts +148 -0
package/package.json CHANGED
@@ -1,6 +1,138 @@
1
1
  {
2
2
  "name": "@reviewflow/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "6.22.0",
4
+ "description": "pull request model shared by the reviewflow app server and its ui: diff and api types, pure utils, the GitHub layer behind an injected transport, and (node only) reading a diff from a local checkout (@reviewflow/sdk/git) and editing a text file in place (@reviewflow/sdk/files)",
5
+ "keywords": [
6
+ "code-review",
7
+ "diff",
8
+ "git",
9
+ "github",
10
+ "pull-request",
11
+ "reviewflow"
12
+ ],
13
+ "homepage": "https://github.com/christophehurpeau/reviewflow",
14
+ "bugs": {
15
+ "url": "https://github.com/christophehurpeau/reviewflow/issues"
16
+ },
17
+ "license": "ISC",
18
+ "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/christophehurpeau/reviewflow.git",
22
+ "directory": "packages/sdk"
23
+ },
24
+ "files": [
25
+ "build",
26
+ "src",
27
+ "!build/*.map",
28
+ "!src/**/*.test.ts",
29
+ "!src/**/test"
30
+ ],
31
+ "type": "module",
32
+ "sideEffects": false,
33
+ "main": "./build/index-node.mjs",
34
+ "module": "./build/index-browser.es.js",
35
+ "browser": "./build/index-browser.es.js",
36
+ "types": "./src/index.ts",
37
+ "exports": {
38
+ "./package.json": "./package.json",
39
+ ".": {
40
+ "types": "./src/index.ts",
41
+ "node": {
42
+ "import": "./build/index-node.mjs"
43
+ },
44
+ "browser": {
45
+ "import": "./build/index-browser.es.js"
46
+ }
47
+ },
48
+ "./git": {
49
+ "types": "./src/git.ts",
50
+ "node": {
51
+ "import": "./build/git-node.mjs"
52
+ }
53
+ },
54
+ "./files": {
55
+ "types": "./src/files.ts",
56
+ "node": {
57
+ "import": "./build/files-node.mjs"
58
+ }
59
+ }
60
+ },
61
+ "publishConfig": {
62
+ "access": "public"
63
+ },
64
+ "dependencies": {
65
+ "oxc-parser": "0.127.0"
66
+ },
67
+ "devDependencies": {
68
+ "@pob/rollup-esbuild": "11.4.0",
69
+ "@types/node": "24.12.4",
70
+ "@typescript/native": "npm:typescript@7.0.2",
71
+ "tsrs": "0.22.0-ts7.1.0-beta",
72
+ "typescript": "npm:@typescript/typescript6@6.0.2"
73
+ },
74
+ "browserslist": {
75
+ "production": [
76
+ "defaults",
77
+ "> 0.2%",
78
+ "not ie < 12",
79
+ "not safari < 10",
80
+ "not ios_saf < 10"
81
+ ]
82
+ },
83
+ "engines": {
84
+ "node": "^24.22.1 || >=26.13.0"
85
+ },
86
+ "pob": {
87
+ "bundler": "rollup-esbuild",
88
+ "entries": [
89
+ {
90
+ "name": "index",
91
+ "envs": [
92
+ {
93
+ "target": "node",
94
+ "version": "24",
95
+ "omitVersionInFileName": true
96
+ },
97
+ {
98
+ "target": "browser"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "name": "git",
104
+ "envs": [
105
+ {
106
+ "target": "node",
107
+ "version": "24",
108
+ "omitVersionInFileName": true
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "name": "files",
114
+ "envs": [
115
+ {
116
+ "target": "node",
117
+ "version": "24",
118
+ "omitVersionInFileName": true
119
+ }
120
+ ]
121
+ }
122
+ ],
123
+ "typescript": true
124
+ },
125
+ "scripts": {
126
+ "build": "pnpm run clean:build && rollup --config rollup.config.mjs",
127
+ "clean": "pnpm run clean:build",
128
+ "clean:build": "pob-esbuild-clean-out build",
129
+ "lint": "pnpm run lint:oxlint && pnpm run lint:eslint",
130
+ "lint:eslint": "pnpm --dir '../..' exec eslint --quiet 'packages/sdk'",
131
+ "lint:oxlint": "pnpm --dir '../..' exec oxlint --quiet 'packages/sdk'",
132
+ "start": "pnpm run clean:build && rollup --config rollup.config.mjs --watch",
133
+ "test": "pnpm run --dir '../..' test -- 'packages/sdk'",
134
+ "tsc": "tsrs",
135
+ "tsc:go": "tsc",
136
+ "watch": "pnpm run clean:build && rollup --config rollup.config.mjs --watch"
137
+ }
6
138
  }