@pierre/storage 1.0.1 → 1.0.3

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,40 +1,41 @@
1
1
  {
2
- "name": "@pierre/storage",
3
- "version": "1.0.1",
4
- "description": "Pierre Git Storage SDK",
5
- "license": "MIT",
6
- "type": "module",
7
- "main": "./dist/index.cjs",
8
- "module": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js",
14
- "require": "./dist/index.cjs",
15
- "default": "./dist/index.js"
16
- }
17
- },
18
- "files": [
19
- "dist",
20
- "src"
21
- ],
22
- "dependencies": {
23
- "jose": "^5.10.0",
24
- "snakecase-keys": "^9.0.2",
25
- "zod": "^3.23.8"
26
- },
27
- "devDependencies": {
28
- "@types/node": "^22.0.0",
29
- "tsup": "8.5.0",
30
- "typescript": "5.8.3",
31
- "vitest": "3.2.4"
32
- },
33
- "publishConfig": {
34
- "access": "public"
35
- },
36
- "scripts": {
37
- "build": "tsup",
38
- "dev": "tsup --watch"
39
- }
40
- }
2
+ "name": "@pierre/storage",
3
+ "version": "1.0.3",
4
+ "description": "Pierre Git Storage SDK",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.cjs",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "src"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsup",
24
+ "dev": "tsup --watch",
25
+ "prepublishOnly": "pnpm build"
26
+ },
27
+ "dependencies": {
28
+ "jose": "^5.10.0",
29
+ "snakecase-keys": "^9.0.2",
30
+ "zod": "^3.23.8"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^22.0.0",
34
+ "tsup": "8.5.0",
35
+ "typescript": "5.8.3",
36
+ "vitest": "3.2.4"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }
package/src/index.ts CHANGED
@@ -345,6 +345,8 @@ function transformFileDiff(raw: RawFileDiff): FileDiff {
345
345
  raw: raw.raw,
346
346
  bytes: raw.bytes,
347
347
  isEof: raw.is_eof,
348
+ additions: raw.additions ?? 0,
349
+ deletions: raw.deletions ?? 0,
348
350
  };
349
351
  }
350
352
 
package/src/schemas.ts CHANGED
@@ -88,6 +88,8 @@ export const diffFileRawSchema = z.object({
88
88
  raw: z.string(),
89
89
  bytes: z.number(),
90
90
  is_eof: z.boolean(),
91
+ additions: z.number().optional(),
92
+ deletions: z.number().optional(),
91
93
  });
92
94
 
93
95
  export const filteredFileRawSchema = z.object({
package/src/types.ts CHANGED
@@ -86,6 +86,13 @@ export interface FindOneOptions {
86
86
 
87
87
  export type SupportedRepoProvider = 'github';
88
88
 
89
+ export interface PublicGitHubBaseRepoAuth {
90
+ /**
91
+ * Force public GitHub mode (no GitHub App installation required).
92
+ */
93
+ authType: 'public';
94
+ }
95
+
89
96
  export interface GitHubBaseRepo {
90
97
  /**
91
98
  * @default github
@@ -94,6 +101,7 @@ export interface GitHubBaseRepo {
94
101
  owner: string;
95
102
  name: string;
96
103
  defaultBranch?: string;
104
+ auth?: PublicGitHubBaseRepoAuth;
97
105
  }
98
106
 
99
107
  export interface ForkBaseRepo {
@@ -426,6 +434,8 @@ export interface DiffFileBase {
426
434
 
427
435
  export interface FileDiff extends DiffFileBase {
428
436
  raw: string;
437
+ additions: number;
438
+ deletions: number;
429
439
  }
430
440
 
431
441
  export interface FilteredFile extends DiffFileBase {}