@lizard-build/sdk 0.1.76 → 0.1.78

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
@@ -121,7 +121,7 @@ try {
121
121
 
122
122
  The SDK reads `LIZARD_API_KEY` and, optionally, `LIZARD_API_URL` (default: `https://lizard.build`). You can also pass `apiKey` and `apiUrl` to the constructor or static sandbox methods.
123
123
 
124
- Lizard Git (`lizard.git`: repositories, pull requests, CI and the rest) reads `LIZARD_GIT_URL` (default `https://git.lizard.build`) and needs a key with no scopes. See the [Lizard Git guide](https://github.com/lizard-build/lizard-sdk/blob/main/docs/platform.md#lizard-git).
124
+ Lizard Git (`lizard.git`: repositories, pull requests, CI and the rest) reads `LIZARD_GIT_URL` (default `https://lizard.build/git`) and needs a key with no scopes. See the [Lizard Git guide](https://github.com/lizard-build/lizard-sdk/blob/main/docs/platform.md#lizard-git).
125
125
 
126
126
  Pass `timeoutMs` to `create()` to set the sandbox lifetime. The default is five minutes. `timeoutMs` on `process.exec()` or `runCode()` controls that call, not the sandbox lifetime.
127
127
 
package/dist/index.d.mts CHANGED
@@ -461,7 +461,7 @@ declare class GitHubAPI {
461
461
  }
462
462
 
463
463
  /**
464
- * Lizard Git (git.lizard.build): repositories, issues, pull requests, reviews, Actions-style
464
+ * Lizard Git (lizard.build/git): repositories, issues, pull requests, reviews, Actions-style
465
465
  * CI, releases, webhooks, branch protection and the rest, with the same API key as the rest
466
466
  * of the SDK. The key must be a whole account's (no scopes): Lizard Git refuses scoped keys.
467
467
  *
@@ -475,7 +475,7 @@ declare class GitHubAPI {
475
475
  * const pr = await lizard.git.pulls.create('me/app', { title: 'Feature', head: 'feature', base: 'main' })
476
476
  * ```
477
477
  */
478
- declare const DEFAULT_GIT_URL = "https://git.lizard.build";
478
+ declare const DEFAULT_GIT_URL = "https://lizard.build/git";
479
479
  type RepoRef = string;
480
480
  type Role = 'read' | 'write' | 'admin';
481
481
  interface Repo {
@@ -895,13 +895,11 @@ 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. */
899
898
  update(repo: RepoRef, opts: {
900
899
  name?: string;
901
900
  description?: string;
902
901
  private?: boolean;
903
902
  defaultBranch?: string;
904
- apiCommits?: boolean;
905
903
  }): Promise<{
906
904
  ok: boolean;
907
905
  }>;
@@ -952,9 +950,10 @@ declare class GitReposAPI {
952
950
  }>;
953
951
  compare(repo: RepoRef, base: string, head: string): Promise<unknown>;
954
952
  /**
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.
953
+ * Commit files on the server: no clone, no push (every commit to Lizard Git is made this
954
+ * way). With `expect` (the commit your change was made against), a branch that moved since
955
+ * is the server's to resolve: other files go on the new tip, the same files are merged line
956
+ * by line, and only a real conflict answers 409 with the paths.
958
957
  */
959
958
  commitFiles(repo: RepoRef, opts: CommitFilesOpts): Promise<{
960
959
  sha: string;
@@ -974,9 +973,9 @@ declare class GitReposAPI {
974
973
  reflog(repo: RepoRef, ref?: string): Promise<unknown[]>;
975
974
  archive(repo: RepoRef, ref: string, format?: 'zip' | 'tar.gz'): Promise<Uint8Array>;
976
975
  /**
977
- * The HTTPS clone URL. With `withKey`, it carries the API key, so plain `git clone` works
978
- * without a helper; git then keeps it in .git/config. For anything shared or logged, use a
979
- * limited Lizard Git token (`tokens.create`) as `apiKey` instead of the account's key.
976
+ * @deprecated Lizard Git no longer serves the git protocol (contents are kept as changesets,
977
+ * files by hash): this address answers 410. Read with `tree`/`file`/`raw`/`archive`, write
978
+ * with `commitFiles`, and check out with the Lizard CLI (`lizard git clone`).
980
979
  */
981
980
  cloneUrl(repo: RepoRef, opts?: {
982
981
  withKey?: boolean;
@@ -2952,7 +2951,7 @@ interface LizardOpts extends ConnectionOpts {
2952
2951
  * management (projects, services, addons, etc.).
2953
2952
  */
2954
2953
  project?: string;
2955
- /** Lizard Git's address. Defaults to `LIZARD_GIT_URL`, then https://git.lizard.build. */
2954
+ /** Lizard Git's address. Defaults to `LIZARD_GIT_URL`, then https://lizard.build/git. */
2956
2955
  gitUrl?: string;
2957
2956
  }
2958
2957
  /**
@@ -3011,7 +3010,7 @@ declare class Lizard {
3011
3010
  readonly storage: StorageAPI;
3012
3011
  readonly github: GitHubAPI;
3013
3012
  /**
3014
- * Lizard Git (git.lizard.build): repositories, issues, pull requests, reviews, CI runs,
3013
+ * Lizard Git (lizard.build/git): repositories, issues, pull requests, reviews, CI runs,
3015
3014
  * releases, webhooks, branch rules. Needs a key with no scopes.
3016
3015
  */
3017
3016
  readonly git: GitAPI;
package/dist/index.d.ts CHANGED
@@ -461,7 +461,7 @@ declare class GitHubAPI {
461
461
  }
462
462
 
463
463
  /**
464
- * Lizard Git (git.lizard.build): repositories, issues, pull requests, reviews, Actions-style
464
+ * Lizard Git (lizard.build/git): repositories, issues, pull requests, reviews, Actions-style
465
465
  * CI, releases, webhooks, branch protection and the rest, with the same API key as the rest
466
466
  * of the SDK. The key must be a whole account's (no scopes): Lizard Git refuses scoped keys.
467
467
  *
@@ -475,7 +475,7 @@ declare class GitHubAPI {
475
475
  * const pr = await lizard.git.pulls.create('me/app', { title: 'Feature', head: 'feature', base: 'main' })
476
476
  * ```
477
477
  */
478
- declare const DEFAULT_GIT_URL = "https://git.lizard.build";
478
+ declare const DEFAULT_GIT_URL = "https://lizard.build/git";
479
479
  type RepoRef = string;
480
480
  type Role = 'read' | 'write' | 'admin';
481
481
  interface Repo {
@@ -895,13 +895,11 @@ 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. */
899
898
  update(repo: RepoRef, opts: {
900
899
  name?: string;
901
900
  description?: string;
902
901
  private?: boolean;
903
902
  defaultBranch?: string;
904
- apiCommits?: boolean;
905
903
  }): Promise<{
906
904
  ok: boolean;
907
905
  }>;
@@ -952,9 +950,10 @@ declare class GitReposAPI {
952
950
  }>;
953
951
  compare(repo: RepoRef, base: string, head: string): Promise<unknown>;
954
952
  /**
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.
953
+ * Commit files on the server: no clone, no push (every commit to Lizard Git is made this
954
+ * way). With `expect` (the commit your change was made against), a branch that moved since
955
+ * is the server's to resolve: other files go on the new tip, the same files are merged line
956
+ * by line, and only a real conflict answers 409 with the paths.
958
957
  */
959
958
  commitFiles(repo: RepoRef, opts: CommitFilesOpts): Promise<{
960
959
  sha: string;
@@ -974,9 +973,9 @@ declare class GitReposAPI {
974
973
  reflog(repo: RepoRef, ref?: string): Promise<unknown[]>;
975
974
  archive(repo: RepoRef, ref: string, format?: 'zip' | 'tar.gz'): Promise<Uint8Array>;
976
975
  /**
977
- * The HTTPS clone URL. With `withKey`, it carries the API key, so plain `git clone` works
978
- * without a helper; git then keeps it in .git/config. For anything shared or logged, use a
979
- * limited Lizard Git token (`tokens.create`) as `apiKey` instead of the account's key.
976
+ * @deprecated Lizard Git no longer serves the git protocol (contents are kept as changesets,
977
+ * files by hash): this address answers 410. Read with `tree`/`file`/`raw`/`archive`, write
978
+ * with `commitFiles`, and check out with the Lizard CLI (`lizard git clone`).
980
979
  */
981
980
  cloneUrl(repo: RepoRef, opts?: {
982
981
  withKey?: boolean;
@@ -2952,7 +2951,7 @@ interface LizardOpts extends ConnectionOpts {
2952
2951
  * management (projects, services, addons, etc.).
2953
2952
  */
2954
2953
  project?: string;
2955
- /** Lizard Git's address. Defaults to `LIZARD_GIT_URL`, then https://git.lizard.build. */
2954
+ /** Lizard Git's address. Defaults to `LIZARD_GIT_URL`, then https://lizard.build/git. */
2956
2955
  gitUrl?: string;
2957
2956
  }
2958
2957
  /**
@@ -3011,7 +3010,7 @@ declare class Lizard {
3011
3010
  readonly storage: StorageAPI;
3012
3011
  readonly github: GitHubAPI;
3013
3012
  /**
3014
- * Lizard Git (git.lizard.build): repositories, issues, pull requests, reviews, CI runs,
3013
+ * Lizard Git (lizard.build/git): repositories, issues, pull requests, reviews, CI runs,
3015
3014
  * releases, webhooks, branch rules. Needs a key with no scopes.
3016
3015
  */
3017
3016
  readonly git: GitAPI;
package/dist/index.js CHANGED
@@ -554,7 +554,7 @@ var GitHubAPI = class {
554
554
  };
555
555
 
556
556
  // src/platform/git.ts
557
- var DEFAULT_GIT_URL = "https://git.lizard.build";
557
+ var DEFAULT_GIT_URL = "https://lizard.build/git";
558
558
  var seg = encodeURIComponent;
559
559
  function qs(path, values) {
560
560
  const q = new URLSearchParams();
@@ -632,7 +632,6 @@ 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. */
636
635
  update(repo, opts) {
637
636
  return this.c.patch(repoPath(repo), opts);
638
637
  }
@@ -692,9 +691,10 @@ var GitReposAPI = class {
692
691
  return this.c.get(qs(`${repoPath(repo)}/compare`, { base, head }));
693
692
  }
694
693
  /**
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.
694
+ * Commit files on the server: no clone, no push (every commit to Lizard Git is made this
695
+ * way). With `expect` (the commit your change was made against), a branch that moved since
696
+ * is the server's to resolve: other files go on the new tip, the same files are merged line
697
+ * by line, and only a real conflict answers 409 with the paths.
698
698
  */
699
699
  commitFiles(repo, opts) {
700
700
  const { idempotencyKey, ...body } = opts;
@@ -712,9 +712,9 @@ var GitReposAPI = class {
712
712
  return this.c.bytes(`${repoPath(repo)}/archive/${seg(ref)}.${format}`);
713
713
  }
714
714
  /**
715
- * The HTTPS clone URL. With `withKey`, it carries the API key, so plain `git clone` works
716
- * without a helper; git then keeps it in .git/config. For anything shared or logged, use a
717
- * limited Lizard Git token (`tokens.create`) as `apiKey` instead of the account's key.
715
+ * @deprecated Lizard Git no longer serves the git protocol (contents are kept as changesets,
716
+ * files by hash): this address answers 410. Read with `tree`/`file`/`raw`/`archive`, write
717
+ * with `commitFiles`, and check out with the Lizard CLI (`lizard git clone`).
718
718
  */
719
719
  cloneUrl(repo, opts = {}) {
720
720
  repoPath(repo);
package/dist/index.mjs CHANGED
@@ -482,7 +482,7 @@ var GitHubAPI = class {
482
482
  };
483
483
 
484
484
  // src/platform/git.ts
485
- var DEFAULT_GIT_URL = "https://git.lizard.build";
485
+ var DEFAULT_GIT_URL = "https://lizard.build/git";
486
486
  var seg = encodeURIComponent;
487
487
  function qs(path, values) {
488
488
  const q = new URLSearchParams();
@@ -560,7 +560,6 @@ 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. */
564
563
  update(repo, opts) {
565
564
  return this.c.patch(repoPath(repo), opts);
566
565
  }
@@ -620,9 +619,10 @@ var GitReposAPI = class {
620
619
  return this.c.get(qs(`${repoPath(repo)}/compare`, { base, head }));
621
620
  }
622
621
  /**
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.
622
+ * Commit files on the server: no clone, no push (every commit to Lizard Git is made this
623
+ * way). With `expect` (the commit your change was made against), a branch that moved since
624
+ * is the server's to resolve: other files go on the new tip, the same files are merged line
625
+ * by line, and only a real conflict answers 409 with the paths.
626
626
  */
627
627
  commitFiles(repo, opts) {
628
628
  const { idempotencyKey, ...body } = opts;
@@ -640,9 +640,9 @@ var GitReposAPI = class {
640
640
  return this.c.bytes(`${repoPath(repo)}/archive/${seg(ref)}.${format}`);
641
641
  }
642
642
  /**
643
- * The HTTPS clone URL. With `withKey`, it carries the API key, so plain `git clone` works
644
- * without a helper; git then keeps it in .git/config. For anything shared or logged, use a
645
- * limited Lizard Git token (`tokens.create`) as `apiKey` instead of the account's key.
643
+ * @deprecated Lizard Git no longer serves the git protocol (contents are kept as changesets,
644
+ * files by hash): this address answers 410. Read with `tree`/`file`/`raw`/`archive`, write
645
+ * with `commitFiles`, and check out with the Lizard CLI (`lizard git clone`).
646
646
  */
647
647
  cloneUrl(repo, opts = {}) {
648
648
  repoPath(repo);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lizard-build/sdk",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
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",