@vercel/sandbox 0.0.2 → 0.0.4
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 +12 -0
- package/README.md +22 -17
- package/dist/{src/client → client}/client.d.ts +2 -1
- package/dist/{src/client → client}/client.js +1 -0
- package/dist/{src/create-sandbox.d.ts → create-sandbox.d.ts} +36 -15
- package/dist/{src/create-sandbox.js → create-sandbox.js} +34 -16
- package/dist/index.d.ts +2 -0
- package/dist/{src/index.js → index.js} +2 -2
- package/dist/version.d.ts +1 -0
- package/dist/{src/version.js → version.js} +1 -1
- package/package.json +2 -1
- package/src/client/client.ts +3 -1
- package/src/create-sandbox.ts +37 -15
- package/src/index.ts +1 -1
- package/src/version.ts +1 -1
- package/tsconfig.json +1 -1
- package/dist/package.json +0 -31
- package/dist/scripts/inject-version.d.ts +0 -1
- package/dist/scripts/inject-version.js +0 -14
- package/dist/src/index.d.ts +0 -2
- package/dist/src/version.d.ts +0 -1
- /package/dist/{src/client → client}/api-error.d.ts +0 -0
- /package/dist/{src/client → client}/api-error.js +0 -0
- /package/dist/{src/client → client}/base-client.d.ts +0 -0
- /package/dist/{src/client → client}/base-client.js +0 -0
- /package/dist/{src/client → client}/validators.d.ts +0 -0
- /package/dist/{src/client → client}/validators.js +0 -0
- /package/dist/{src/client → client}/with-retry.d.ts +0 -0
- /package/dist/{src/client → client}/with-retry.js +0 -0
- /package/dist/{src/utils → utils}/array.d.ts +0 -0
- /package/dist/{src/utils → utils}/array.js +0 -0
- /package/dist/{src/utils → utils}/deferred-generator.d.ts +0 -0
- /package/dist/{src/utils → utils}/deferred-generator.js +0 -0
- /package/dist/{src/utils → utils}/deferred.d.ts +0 -0
- /package/dist/{src/utils → utils}/deferred.js +0 -0
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/sandbox
|
|
2
2
|
|
|
3
|
+
## 0.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Rename `SandboxSDK` to `SDK` and incorporate `projectId` as a required parameter ([#21](https://github.com/vercel/sandbox-sdk/pull/21))
|
|
8
|
+
|
|
9
|
+
## 0.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Do not include dev scripts in package output ([#16](https://github.com/vercel/sandbox-sdk/pull/16))
|
|
14
|
+
|
|
3
15
|
## 0.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -12,31 +12,36 @@ infrastructure][hive] that powers 1M+ builds a day at Vercel.
|
|
|
12
12
|
Vercel Sandbox is in private beta. These examples will not work unless these
|
|
13
13
|
APIs are enabled for your team.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
- Go to your team settings, and copy the team ID.
|
|
16
|
+
- Go to your Vercel account settings and [create a token][create-token]. Make
|
|
17
|
+
sure it is scoped to the team ID from the previous step.
|
|
18
|
+
- Create a new project:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
mkdir sandbox-test
|
|
22
|
+
cd sandbox-test
|
|
23
|
+
pnpm init
|
|
24
|
+
pnpm add @vercel/sandbox ms
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Now create `
|
|
27
|
+
Now create `next-dev.ts`:
|
|
28
28
|
|
|
29
|
-
{@includeCode ../cli/src/example-
|
|
29
|
+
{@includeCode ../cli/src/example-next.ts}
|
|
30
30
|
|
|
31
31
|
Run it like this:
|
|
32
32
|
|
|
33
|
+
```sh
|
|
34
|
+
VERCEL_TEAM_ID=<team_id> VERCEL_TOKEN=<token> node --experimental-strip-types ./next-dev.ts
|
|
33
35
|
```
|
|
34
|
-
$ VERCEL_TEAM_ID=<team_id> VERCEL_TOKEN=<token> pnpm tsx ./whoami.ts
|
|
35
|
-
Running as: vercel-sandbox
|
|
36
|
-
Working dir: /vercel/sandbox
|
|
37
|
-
```
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
This will:
|
|
38
|
+
|
|
39
|
+
- Start a sandbox, seeding it with a git repository.
|
|
40
|
+
- Install dependencies.
|
|
41
|
+
- Run a `next dev` server
|
|
42
|
+
- Open it in your browser
|
|
43
|
+
|
|
44
|
+
All while streaming logs to your local terminal.
|
|
40
45
|
|
|
41
46
|
## Limitations
|
|
42
47
|
|
|
@@ -9,11 +9,12 @@ export declare class SandboxClient extends APIClient {
|
|
|
9
9
|
});
|
|
10
10
|
protected request(path: string, params?: RequestParams): Promise<import("node-fetch").Response>;
|
|
11
11
|
createSandbox(params: {
|
|
12
|
+
ports: number[];
|
|
13
|
+
projectId: string;
|
|
12
14
|
source: {
|
|
13
15
|
type: "git";
|
|
14
16
|
url: string;
|
|
15
17
|
};
|
|
16
|
-
ports: number[];
|
|
17
18
|
timeout?: number;
|
|
18
19
|
}): Promise<import("./base-client").Parsed<{
|
|
19
20
|
sandboxId: string;
|
|
@@ -36,6 +36,7 @@ class SandboxClient extends base_client_1.APIClient {
|
|
|
36
36
|
return (0, base_client_1.parseOrThrow)(validators_1.CreatedSandbox, await this.request("/v1/sandboxes", {
|
|
37
37
|
method: "POST",
|
|
38
38
|
body: JSON.stringify({
|
|
39
|
+
projectId: params.projectId,
|
|
39
40
|
ports: params.ports,
|
|
40
41
|
source: params.source,
|
|
41
42
|
timeout: params.timeout,
|
|
@@ -1,36 +1,57 @@
|
|
|
1
1
|
import { SandboxClient } from "./client/client";
|
|
2
2
|
import { Readable } from "stream";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* SDK for interacting with the Sandbox API. Provides methods to create and
|
|
5
|
+
* manage sandboxes configured with specific source code and network ports.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* const
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Example:
|
|
8
|
+
* ```ts
|
|
9
|
+
* const sdk = new SDK({
|
|
10
|
+
* teamId: process.env.VERCEL_TEAM_ID!,
|
|
11
|
+
* token: process.env.VERCEL_TOKEN!,
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
11
14
|
*
|
|
12
|
-
* @see {@link createSandbox} to start a sandbox.
|
|
15
|
+
* @see {@link SDK.createSandbox} to start a new sandbox.
|
|
13
16
|
*/
|
|
14
|
-
export declare class
|
|
15
|
-
|
|
17
|
+
export declare class SDK {
|
|
18
|
+
/**
|
|
19
|
+
* Internal API client for communicating with the sandbox backend.
|
|
20
|
+
*/
|
|
21
|
+
private client;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new instance of `SDK`.
|
|
24
|
+
*
|
|
25
|
+
* @param config - Configuration options for the SDK.
|
|
26
|
+
* @param config.teamId - The Vercel team ID used to scope the Sandbox.
|
|
27
|
+
* @param config.token - The API token used for authentication.
|
|
28
|
+
*/
|
|
16
29
|
constructor({ teamId, token }: {
|
|
17
30
|
teamId: string;
|
|
18
31
|
token: string;
|
|
19
32
|
});
|
|
20
33
|
/**
|
|
21
|
-
*
|
|
34
|
+
* Creates a new sandbox instance using the provided Git repository and exposed ports.
|
|
35
|
+
*
|
|
36
|
+
* The repository must be public. On start, the sandbox will clone the repository
|
|
37
|
+
* and expose the specified ports for access.
|
|
22
38
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
39
|
+
* @param params - Configuration parameters for the sandbox.
|
|
40
|
+
* @param params.source - The source of the sandbox, currently supports Git repositories only.
|
|
41
|
+
* @param params.source.type - Type of source, must be `"git"`.
|
|
42
|
+
* @param params.source.url - The URL of the public Git repository to clone.
|
|
43
|
+
* @param config.projectId - The Vercel project ID used to link the Sandbox to.
|
|
44
|
+
* @param params.ports - Array of port numbers to expose from the sandbox.
|
|
45
|
+
* @param params.timeout - (Optional) Timeout in seconds before the sandbox auto-terminates.
|
|
25
46
|
*
|
|
26
|
-
* @
|
|
27
|
-
* @returns a
|
|
47
|
+
* @returns A promise that resolves to a `Sandbox` instance.
|
|
28
48
|
*/
|
|
29
49
|
createSandbox(params: {
|
|
30
50
|
source: {
|
|
31
51
|
type: "git";
|
|
32
52
|
url: string;
|
|
33
53
|
};
|
|
54
|
+
projectId: string;
|
|
34
55
|
ports: number[];
|
|
35
56
|
timeout?: number;
|
|
36
57
|
}): Promise<Sandbox>;
|
|
@@ -46,7 +67,7 @@ export declare class SandboxSDK {
|
|
|
46
67
|
/**
|
|
47
68
|
* A Sandbox is an isolated Linux MicroVM that you can your experiments on.
|
|
48
69
|
*
|
|
49
|
-
* @see {@link
|
|
70
|
+
* @see {@link SDK.createSandbox} to construct a Sandbox.
|
|
50
71
|
* @hideconstructor
|
|
51
72
|
*/
|
|
52
73
|
export declare class Sandbox {
|
|
@@ -1,35 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Command = exports.Sandbox = exports.
|
|
3
|
+
exports.Command = exports.Sandbox = exports.SDK = void 0;
|
|
4
4
|
const client_1 = require("./client/client");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* SDK for interacting with the Sandbox API. Provides methods to create and
|
|
7
|
+
* manage sandboxes configured with specific source code and network ports.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* const
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Example:
|
|
10
|
+
* ```ts
|
|
11
|
+
* const sdk = new SDK({
|
|
12
|
+
* teamId: process.env.VERCEL_TEAM_ID!,
|
|
13
|
+
* token: process.env.VERCEL_TOKEN!,
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
13
16
|
*
|
|
14
|
-
* @see {@link createSandbox} to start a sandbox.
|
|
17
|
+
* @see {@link SDK.createSandbox} to start a new sandbox.
|
|
15
18
|
*/
|
|
16
|
-
class
|
|
19
|
+
class SDK {
|
|
20
|
+
/**
|
|
21
|
+
* Create a new instance of `SDK`.
|
|
22
|
+
*
|
|
23
|
+
* @param config - Configuration options for the SDK.
|
|
24
|
+
* @param config.teamId - The Vercel team ID used to scope the Sandbox.
|
|
25
|
+
* @param config.token - The API token used for authentication.
|
|
26
|
+
*/
|
|
17
27
|
constructor({ teamId, token }) {
|
|
18
28
|
this.client = new client_1.SandboxClient({ teamId, token });
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
|
-
*
|
|
31
|
+
* Creates a new sandbox instance using the provided Git repository and exposed ports.
|
|
32
|
+
*
|
|
33
|
+
* The repository must be public. On start, the sandbox will clone the repository
|
|
34
|
+
* and expose the specified ports for access.
|
|
22
35
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
36
|
+
* @param params - Configuration parameters for the sandbox.
|
|
37
|
+
* @param params.source - The source of the sandbox, currently supports Git repositories only.
|
|
38
|
+
* @param params.source.type - Type of source, must be `"git"`.
|
|
39
|
+
* @param params.source.url - The URL of the public Git repository to clone.
|
|
40
|
+
* @param config.projectId - The Vercel project ID used to link the Sandbox to.
|
|
41
|
+
* @param params.ports - Array of port numbers to expose from the sandbox.
|
|
42
|
+
* @param params.timeout - (Optional) Timeout in seconds before the sandbox auto-terminates.
|
|
25
43
|
*
|
|
26
|
-
* @
|
|
27
|
-
* @returns a
|
|
44
|
+
* @returns A promise that resolves to a `Sandbox` instance.
|
|
28
45
|
*/
|
|
29
46
|
async createSandbox(params) {
|
|
30
47
|
const { client } = this;
|
|
31
48
|
const sandbox = await client.createSandbox({
|
|
32
49
|
source: params.source,
|
|
50
|
+
projectId: params.projectId,
|
|
33
51
|
ports: params.ports,
|
|
34
52
|
timeout: params.timeout,
|
|
35
53
|
});
|
|
@@ -48,11 +66,11 @@ class SandboxSDK {
|
|
|
48
66
|
});
|
|
49
67
|
}
|
|
50
68
|
}
|
|
51
|
-
exports.
|
|
69
|
+
exports.SDK = SDK;
|
|
52
70
|
/**
|
|
53
71
|
* A Sandbox is an isolated Linux MicroVM that you can your experiments on.
|
|
54
72
|
*
|
|
55
|
-
* @see {@link
|
|
73
|
+
* @see {@link SDK.createSandbox} to construct a Sandbox.
|
|
56
74
|
* @hideconstructor
|
|
57
75
|
*/
|
|
58
76
|
class Sandbox {
|
package/dist/index.d.ts
ADDED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SandboxClient = exports.Command = exports.Sandbox = exports.
|
|
3
|
+
exports.SandboxClient = exports.Command = exports.Sandbox = exports.SDK = void 0;
|
|
4
4
|
var create_sandbox_1 = require("./create-sandbox");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "SDK", { enumerable: true, get: function () { return create_sandbox_1.SDK; } });
|
|
6
6
|
Object.defineProperty(exports, "Sandbox", { enumerable: true, get: function () { return create_sandbox_1.Sandbox; } });
|
|
7
7
|
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return create_sandbox_1.Command; } });
|
|
8
8
|
var client_1 = require("./client/client");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "0.0.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/sandbox",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"typescript": "5.8.3"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
+
"clean": "rm -rf node_modules dist",
|
|
26
27
|
"build": "tsc",
|
|
27
28
|
"typedoc": "typedoc",
|
|
28
29
|
"typecheck": "tsc --noEmit",
|
package/src/client/client.ts
CHANGED
|
@@ -41,8 +41,9 @@ export class SandboxClient extends APIClient {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
async createSandbox(params: {
|
|
44
|
-
source: { type: "git"; url: string };
|
|
45
44
|
ports: number[];
|
|
45
|
+
projectId: string;
|
|
46
|
+
source: { type: "git"; url: string };
|
|
46
47
|
timeout?: number;
|
|
47
48
|
}) {
|
|
48
49
|
return parseOrThrow(
|
|
@@ -50,6 +51,7 @@ export class SandboxClient extends APIClient {
|
|
|
50
51
|
await this.request("/v1/sandboxes", {
|
|
51
52
|
method: "POST",
|
|
52
53
|
body: JSON.stringify({
|
|
54
|
+
projectId: params.projectId,
|
|
53
55
|
ports: params.ports,
|
|
54
56
|
source: params.source,
|
|
55
57
|
timeout: params.timeout,
|
package/src/create-sandbox.ts
CHANGED
|
@@ -2,40 +2,62 @@ import { SandboxClient } from "./client/client";
|
|
|
2
2
|
import { Readable } from "stream";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* SDK for interacting with the Sandbox API. Provides methods to create and
|
|
6
|
+
* manage sandboxes configured with specific source code and network ports.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* const
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Example:
|
|
9
|
+
* ```ts
|
|
10
|
+
* const sdk = new SDK({
|
|
11
|
+
* teamId: process.env.VERCEL_TEAM_ID!,
|
|
12
|
+
* token: process.env.VERCEL_TOKEN!,
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
12
15
|
*
|
|
13
|
-
* @see {@link createSandbox} to start a sandbox.
|
|
16
|
+
* @see {@link SDK.createSandbox} to start a new sandbox.
|
|
14
17
|
*/
|
|
15
|
-
export class
|
|
16
|
-
|
|
18
|
+
export class SDK {
|
|
19
|
+
/**
|
|
20
|
+
* Internal API client for communicating with the sandbox backend.
|
|
21
|
+
*/
|
|
22
|
+
private client: SandboxClient;
|
|
17
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Create a new instance of `SDK`.
|
|
26
|
+
*
|
|
27
|
+
* @param config - Configuration options for the SDK.
|
|
28
|
+
* @param config.teamId - The Vercel team ID used to scope the Sandbox.
|
|
29
|
+
* @param config.token - The API token used for authentication.
|
|
30
|
+
*/
|
|
18
31
|
constructor({ teamId, token }: { teamId: string; token: string }) {
|
|
19
32
|
this.client = new SandboxClient({ teamId, token });
|
|
20
33
|
}
|
|
21
34
|
|
|
22
35
|
/**
|
|
23
|
-
*
|
|
36
|
+
* Creates a new sandbox instance using the provided Git repository and exposed ports.
|
|
37
|
+
*
|
|
38
|
+
* The repository must be public. On start, the sandbox will clone the repository
|
|
39
|
+
* and expose the specified ports for access.
|
|
24
40
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
41
|
+
* @param params - Configuration parameters for the sandbox.
|
|
42
|
+
* @param params.source - The source of the sandbox, currently supports Git repositories only.
|
|
43
|
+
* @param params.source.type - Type of source, must be `"git"`.
|
|
44
|
+
* @param params.source.url - The URL of the public Git repository to clone.
|
|
45
|
+
* @param config.projectId - The Vercel project ID used to link the Sandbox to.
|
|
46
|
+
* @param params.ports - Array of port numbers to expose from the sandbox.
|
|
47
|
+
* @param params.timeout - (Optional) Timeout in seconds before the sandbox auto-terminates.
|
|
27
48
|
*
|
|
28
|
-
* @
|
|
29
|
-
* @returns a
|
|
49
|
+
* @returns A promise that resolves to a `Sandbox` instance.
|
|
30
50
|
*/
|
|
31
51
|
async createSandbox(params: {
|
|
32
52
|
source: { type: "git"; url: string };
|
|
53
|
+
projectId: string;
|
|
33
54
|
ports: number[];
|
|
34
55
|
timeout?: number;
|
|
35
56
|
}) {
|
|
36
57
|
const { client } = this;
|
|
37
58
|
const sandbox = await client.createSandbox({
|
|
38
59
|
source: params.source,
|
|
60
|
+
projectId: params.projectId,
|
|
39
61
|
ports: params.ports,
|
|
40
62
|
timeout: params.timeout,
|
|
41
63
|
});
|
|
@@ -66,7 +88,7 @@ export class SandboxSDK {
|
|
|
66
88
|
/**
|
|
67
89
|
* A Sandbox is an isolated Linux MicroVM that you can your experiments on.
|
|
68
90
|
*
|
|
69
|
-
* @see {@link
|
|
91
|
+
* @see {@link SDK.createSandbox} to construct a Sandbox.
|
|
70
92
|
* @hideconstructor
|
|
71
93
|
*/
|
|
72
94
|
export class Sandbox {
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SDK, Sandbox, Command } from "./create-sandbox";
|
|
2
2
|
export { SandboxClient } from "./client/client";
|
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.4";
|
package/tsconfig.json
CHANGED
package/dist/package.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vercel/sandbox",
|
|
3
|
-
"version": "0.0.2",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"typedoc": "typedoc",
|
|
10
|
-
"typecheck": "tsc --noEmit",
|
|
11
|
-
"inject-version": "ts-node scripts/inject-version.ts"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [],
|
|
14
|
-
"author": "",
|
|
15
|
-
"license": "ISC",
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"async-retry": "1.3.3",
|
|
18
|
-
"form-data": "3.0.0",
|
|
19
|
-
"jsonlines": "0.1.1",
|
|
20
|
-
"node-fetch": "2.6.11",
|
|
21
|
-
"zod": "3.24.4"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/async-retry": "1.4.9",
|
|
25
|
-
"@types/jsonlines": "0.1.5",
|
|
26
|
-
"@types/node": "22.15.12",
|
|
27
|
-
"@types/node-fetch": "2.6.12",
|
|
28
|
-
"typedoc": "^0.28.4",
|
|
29
|
-
"typescript": "5.8.3"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const package_json_1 = require("../package.json");
|
|
7
|
-
const promises_1 = require("fs/promises");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
async function main() {
|
|
10
|
-
const outPath = path_1.default.resolve(__dirname, "../src/version.ts");
|
|
11
|
-
const content = `// Autogenerated by inject-version.ts\nexport const VERSION = "${package_json_1.version}";\n`;
|
|
12
|
-
await (0, promises_1.writeFile)(outPath, content);
|
|
13
|
-
}
|
|
14
|
-
main().catch(console.error);
|
package/dist/src/index.d.ts
DELETED
package/dist/src/version.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.2";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|