@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/README.md CHANGED
@@ -51,6 +51,15 @@ const forkedRepo = await store.createRepo({
51
51
  },
52
52
  });
53
53
  // If defaultBranch is omitted, the SDK returns "main".
54
+
55
+ // Create a repo synced to a public GitHub repository without app auth
56
+ const publicSyncRepo = await store.createRepo({
57
+ baseRepo: {
58
+ owner: 'octocat',
59
+ name: 'Hello-World',
60
+ auth: { authType: 'public' },
61
+ },
62
+ });
54
63
  ```
55
64
 
56
65
  ### Finding a Repository
@@ -380,6 +389,9 @@ interface CreateRepoOptions {
380
389
  name: string; // GitHub repository name
381
390
  defaultBranch?: string;
382
391
  provider?: 'github';
392
+ auth?: {
393
+ authType: 'public'; // Force public GitHub mode (no app install)
394
+ };
383
395
  };
384
396
  defaultBranch?: string; // Optional default branch name (defaults to "main")
385
397
  }
@@ -622,6 +634,8 @@ interface FileDiff {
622
634
  bytes: number;
623
635
  isEof: boolean;
624
636
  raw: string;
637
+ additions: number;
638
+ deletions: number;
625
639
  }
626
640
 
627
641
  interface FilteredFile {
package/dist/index.cjs CHANGED
@@ -122,7 +122,9 @@ var diffFileRawSchema = zod.z.object({
122
122
  old_path: zod.z.string().nullable().optional(),
123
123
  raw: zod.z.string(),
124
124
  bytes: zod.z.number(),
125
- is_eof: zod.z.boolean()
125
+ is_eof: zod.z.boolean(),
126
+ additions: zod.z.number().optional(),
127
+ deletions: zod.z.number().optional()
126
128
  });
127
129
  var filteredFileRawSchema = zod.z.object({
128
130
  path: zod.z.string(),
@@ -512,7 +514,7 @@ function concatChunks(a, b) {
512
514
 
513
515
  // package.json
514
516
  var package_default = {
515
- version: "1.0.1"};
517
+ version: "1.0.3"};
516
518
 
517
519
  // src/version.ts
518
520
  var PACKAGE_NAME = "code-storage-sdk";
@@ -1598,7 +1600,9 @@ function transformFileDiff(raw) {
1598
1600
  oldPath: raw.old_path ?? void 0,
1599
1601
  raw: raw.raw,
1600
1602
  bytes: raw.bytes,
1601
- isEof: raw.is_eof
1603
+ isEof: raw.is_eof,
1604
+ additions: raw.additions ?? 0,
1605
+ deletions: raw.deletions ?? 0
1602
1606
  };
1603
1607
  }
1604
1608
  function transformFilteredFile(raw) {