@lizard-build/sdk 0.1.75 → 0.1.76

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/dist/index.d.mts CHANGED
@@ -895,11 +895,13 @@ declare class GitReposAPI {
895
895
  name: string;
896
896
  }>;
897
897
  get(repo: RepoRef): Promise<RepoMeta>;
898
+ /** `apiCommits`: also accept commits written through the API (`commitFiles`, `land`); new repositories take pushes only. */
898
899
  update(repo: RepoRef, opts: {
899
900
  name?: string;
900
901
  description?: string;
901
902
  private?: boolean;
902
903
  defaultBranch?: string;
904
+ apiCommits?: boolean;
903
905
  }): Promise<{
904
906
  ok: boolean;
905
907
  }>;
@@ -949,7 +951,11 @@ declare class GitReposAPI {
949
951
  diff: unknown;
950
952
  }>;
951
953
  compare(repo: RepoRef, base: string, head: string): Promise<unknown>;
952
- /** Commit files on the server: no clone, no push. Answers 409 when `expect` no longer matches. */
954
+ /**
955
+ * Commit files on the server: no clone, no push. Only on a repository whose admin allowed
956
+ * it (`update(repo, { apiCommits: true })`); new repositories take changes by git push only
957
+ * (403 otherwise). Answers 409 when `expect` no longer matches.
958
+ */
953
959
  commitFiles(repo: RepoRef, opts: CommitFilesOpts): Promise<{
954
960
  sha: string;
955
961
  branch: string;
package/dist/index.d.ts CHANGED
@@ -895,11 +895,13 @@ declare class GitReposAPI {
895
895
  name: string;
896
896
  }>;
897
897
  get(repo: RepoRef): Promise<RepoMeta>;
898
+ /** `apiCommits`: also accept commits written through the API (`commitFiles`, `land`); new repositories take pushes only. */
898
899
  update(repo: RepoRef, opts: {
899
900
  name?: string;
900
901
  description?: string;
901
902
  private?: boolean;
902
903
  defaultBranch?: string;
904
+ apiCommits?: boolean;
903
905
  }): Promise<{
904
906
  ok: boolean;
905
907
  }>;
@@ -949,7 +951,11 @@ declare class GitReposAPI {
949
951
  diff: unknown;
950
952
  }>;
951
953
  compare(repo: RepoRef, base: string, head: string): Promise<unknown>;
952
- /** Commit files on the server: no clone, no push. Answers 409 when `expect` no longer matches. */
954
+ /**
955
+ * Commit files on the server: no clone, no push. Only on a repository whose admin allowed
956
+ * it (`update(repo, { apiCommits: true })`); new repositories take changes by git push only
957
+ * (403 otherwise). Answers 409 when `expect` no longer matches.
958
+ */
953
959
  commitFiles(repo: RepoRef, opts: CommitFilesOpts): Promise<{
954
960
  sha: string;
955
961
  branch: string;
package/dist/index.js CHANGED
@@ -632,6 +632,7 @@ var GitReposAPI = class {
632
632
  get(repo) {
633
633
  return this.c.get(repoPath(repo));
634
634
  }
635
+ /** `apiCommits`: also accept commits written through the API (`commitFiles`, `land`); new repositories take pushes only. */
635
636
  update(repo, opts) {
636
637
  return this.c.patch(repoPath(repo), opts);
637
638
  }
@@ -690,7 +691,11 @@ var GitReposAPI = class {
690
691
  compare(repo, base, head) {
691
692
  return this.c.get(qs(`${repoPath(repo)}/compare`, { base, head }));
692
693
  }
693
- /** Commit files on the server: no clone, no push. Answers 409 when `expect` no longer matches. */
694
+ /**
695
+ * Commit files on the server: no clone, no push. Only on a repository whose admin allowed
696
+ * it (`update(repo, { apiCommits: true })`); new repositories take changes by git push only
697
+ * (403 otherwise). Answers 409 when `expect` no longer matches.
698
+ */
694
699
  commitFiles(repo, opts) {
695
700
  const { idempotencyKey, ...body } = opts;
696
701
  return this.c.request("POST", `${repoPath(repo)}/commits`, body, idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {});
package/dist/index.mjs CHANGED
@@ -560,6 +560,7 @@ var GitReposAPI = class {
560
560
  get(repo) {
561
561
  return this.c.get(repoPath(repo));
562
562
  }
563
+ /** `apiCommits`: also accept commits written through the API (`commitFiles`, `land`); new repositories take pushes only. */
563
564
  update(repo, opts) {
564
565
  return this.c.patch(repoPath(repo), opts);
565
566
  }
@@ -618,7 +619,11 @@ var GitReposAPI = class {
618
619
  compare(repo, base, head) {
619
620
  return this.c.get(qs(`${repoPath(repo)}/compare`, { base, head }));
620
621
  }
621
- /** Commit files on the server: no clone, no push. Answers 409 when `expect` no longer matches. */
622
+ /**
623
+ * Commit files on the server: no clone, no push. Only on a repository whose admin allowed
624
+ * it (`update(repo, { apiCommits: true })`); new repositories take changes by git push only
625
+ * (403 otherwise). Answers 409 when `expect` no longer matches.
626
+ */
622
627
  commitFiles(repo, opts) {
623
628
  const { idempotencyKey, ...body } = opts;
624
629
  return this.c.request("POST", `${repoPath(repo)}/commits`, body, idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lizard-build/sdk",
3
- "version": "0.1.75",
3
+ "version": "0.1.76",
4
4
  "description": "TypeScript SDK for Lizard: Firecracker microVM sandboxes, code execution and cloud apps.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",