@vercel/sandbox 0.0.23 → 0.0.24
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/api-client/api-client.d.ts +1 -1
- package/dist/api-client/api-client.js +1 -1
- package/dist/api-client/base-client.d.ts +2 -2
- package/dist/api-client/base-client.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/api-client/api-client.ts +2 -2
- package/src/api-client/base-client.ts +4 -4
- package/src/version.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -19,7 +19,7 @@ const types_1 = require("../utils/types");
|
|
|
19
19
|
class APIClient extends base_client_1.BaseClient {
|
|
20
20
|
constructor(params) {
|
|
21
21
|
super({
|
|
22
|
-
|
|
22
|
+
baseUrl: params.baseUrl ?? "https://vercel.com/api",
|
|
23
23
|
token: params.token,
|
|
24
24
|
debug: false,
|
|
25
25
|
});
|
|
@@ -18,11 +18,11 @@ export declare class BaseClient {
|
|
|
18
18
|
protected token?: string;
|
|
19
19
|
private fetch;
|
|
20
20
|
private debug;
|
|
21
|
-
private
|
|
21
|
+
private baseUrl;
|
|
22
22
|
private agent;
|
|
23
23
|
constructor(params: {
|
|
24
24
|
debug?: boolean;
|
|
25
|
-
|
|
25
|
+
baseUrl: string;
|
|
26
26
|
token?: string;
|
|
27
27
|
});
|
|
28
28
|
protected request(path: string, opts?: RequestParams): Promise<Response>;
|
|
@@ -15,7 +15,7 @@ const undici_1 = require("undici");
|
|
|
15
15
|
class BaseClient {
|
|
16
16
|
constructor(params) {
|
|
17
17
|
this.fetch = (0, with_retry_1.withRetry)(globalThis.fetch);
|
|
18
|
-
this.
|
|
18
|
+
this.baseUrl = params.baseUrl;
|
|
19
19
|
this.debug = params.debug ?? process.env.DEBUG_FETCH === "true";
|
|
20
20
|
this.token = params.token;
|
|
21
21
|
this.agent = new undici_1.Agent({
|
|
@@ -23,7 +23,7 @@ class BaseClient {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
async request(path, opts) {
|
|
26
|
-
const url = new URL(
|
|
26
|
+
const url = new URL(`${this.baseUrl}${path}`);
|
|
27
27
|
if (opts?.query) {
|
|
28
28
|
for (const [key, value] of Object.entries(opts.query)) {
|
|
29
29
|
(0, array_1.array)(value).forEach((value) => {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.24";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -30,9 +30,9 @@ export class APIClient extends BaseClient {
|
|
|
30
30
|
private teamId: string;
|
|
31
31
|
private tokenExpiry: JwtExpiry | null;
|
|
32
32
|
|
|
33
|
-
constructor(params: {
|
|
33
|
+
constructor(params: { baseUrl?: string; teamId: string; token: string }) {
|
|
34
34
|
super({
|
|
35
|
-
|
|
35
|
+
baseUrl: params.baseUrl ?? "https://vercel.com/api",
|
|
36
36
|
token: params.token,
|
|
37
37
|
debug: false,
|
|
38
38
|
});
|
|
@@ -22,12 +22,12 @@ export class BaseClient {
|
|
|
22
22
|
protected token?: string;
|
|
23
23
|
private fetch: ReturnType<typeof withRetry<RequestInit>>;
|
|
24
24
|
private debug: boolean;
|
|
25
|
-
private
|
|
25
|
+
private baseUrl: string;
|
|
26
26
|
private agent: Agent;
|
|
27
27
|
|
|
28
|
-
constructor(params: { debug?: boolean;
|
|
28
|
+
constructor(params: { debug?: boolean; baseUrl: string; token?: string }) {
|
|
29
29
|
this.fetch = withRetry(globalThis.fetch);
|
|
30
|
-
this.
|
|
30
|
+
this.baseUrl = params.baseUrl;
|
|
31
31
|
this.debug = params.debug ?? process.env.DEBUG_FETCH === "true";
|
|
32
32
|
this.token = params.token;
|
|
33
33
|
this.agent = new Agent({
|
|
@@ -36,7 +36,7 @@ export class BaseClient {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
protected async request(path: string, opts?: RequestParams) {
|
|
39
|
-
const url = new URL(
|
|
39
|
+
const url = new URL(`${this.baseUrl}${path}`);
|
|
40
40
|
if (opts?.query) {
|
|
41
41
|
for (const [key, value] of Object.entries(opts.query)) {
|
|
42
42
|
array(value).forEach((value) => {
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Autogenerated by inject-version.ts
|
|
2
|
-
export const VERSION = "0.0.
|
|
2
|
+
export const VERSION = "0.0.24";
|