creek 0.3.0 → 0.3.1
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/bin.js +2 -0
- package/hono.d.ts +1 -0
- package/hono.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +30 -35
- package/react.d.ts +1 -0
- package/react.js +1 -0
- package/README.md +0 -184
- package/dist/commands/claim.d.ts +0 -18
- package/dist/commands/claim.js +0 -93
- package/dist/commands/deploy.d.ts +0 -38
- package/dist/commands/deploy.js +0 -807
- package/dist/commands/deployments.d.ts +0 -18
- package/dist/commands/deployments.js +0 -84
- package/dist/commands/env.d.ts +0 -2
- package/dist/commands/env.js +0 -104
- package/dist/commands/init.d.ts +0 -18
- package/dist/commands/init.js +0 -69
- package/dist/commands/login.d.ts +0 -23
- package/dist/commands/login.js +0 -120
- package/dist/commands/projects.d.ts +0 -13
- package/dist/commands/projects.js +0 -38
- package/dist/commands/status.d.ts +0 -18
- package/dist/commands/status.js +0 -115
- package/dist/commands/whoami.d.ts +0 -13
- package/dist/commands/whoami.js +0 -43
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -36
- package/dist/utils/auth-server.d.ts +0 -22
- package/dist/utils/auth-server.js +0 -91
- package/dist/utils/bundle.d.ts +0 -6
- package/dist/utils/bundle.js +0 -39
- package/dist/utils/config.d.ts +0 -12
- package/dist/utils/config.js +0 -37
- package/dist/utils/git-clone.d.ts +0 -44
- package/dist/utils/git-clone.js +0 -193
- package/dist/utils/nextjs.d.ts +0 -48
- package/dist/utils/nextjs.js +0 -368
- package/dist/utils/output.d.ts +0 -38
- package/dist/utils/output.js +0 -45
- package/dist/utils/repo-url.d.ts +0 -48
- package/dist/utils/repo-url.js +0 -201
- package/dist/utils/sandbox.d.ts +0 -50
- package/dist/utils/sandbox.js +0 -69
- package/dist/utils/ssr-bundle.d.ts +0 -6
- package/dist/utils/ssr-bundle.js +0 -48
- package/dist/utils/tos.d.ts +0 -28
- package/dist/utils/tos.js +0 -95
package/bin.js
ADDED
package/hono.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@solcreek/runtime/hono";
|
package/hono.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@solcreek/runtime/hono";
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@solcreek/runtime";
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@solcreek/runtime";
|
package/package.json
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creek",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "The Creek deployment platform — CLI and runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"creek": "./
|
|
8
|
-
"ck": "./
|
|
9
|
-
"crk": "./
|
|
7
|
+
"creek": "./bin.js",
|
|
8
|
+
"ck": "./bin.js",
|
|
9
|
+
"crk": "./bin.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./index.d.ts",
|
|
14
|
+
"default": "./index.js"
|
|
15
|
+
},
|
|
16
|
+
"./react": {
|
|
17
|
+
"types": "./react.d.ts",
|
|
18
|
+
"default": "./react.js"
|
|
19
|
+
},
|
|
20
|
+
"./hono": {
|
|
21
|
+
"types": "./hono.d.ts",
|
|
22
|
+
"default": "./hono.js"
|
|
23
|
+
}
|
|
10
24
|
},
|
|
11
25
|
"files": [
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
26
|
+
"bin.js",
|
|
27
|
+
"index.js",
|
|
28
|
+
"index.d.ts",
|
|
29
|
+
"react.js",
|
|
30
|
+
"react.d.ts",
|
|
31
|
+
"hono.js",
|
|
32
|
+
"hono.d.ts",
|
|
15
33
|
"LICENSE"
|
|
16
34
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc",
|
|
19
|
-
"dev": "tsc --watch",
|
|
20
|
-
"typecheck": "tsc --noEmit",
|
|
21
|
-
"clean": "rm -rf dist"
|
|
22
|
-
},
|
|
23
35
|
"keywords": [
|
|
24
36
|
"creek",
|
|
25
37
|
"cli",
|
|
@@ -33,27 +45,10 @@
|
|
|
33
45
|
"repository": {
|
|
34
46
|
"type": "git",
|
|
35
47
|
"url": "https://github.com/solcreek/creek.git",
|
|
36
|
-
"directory": "packages/
|
|
48
|
+
"directory": "packages/creek"
|
|
37
49
|
},
|
|
38
50
|
"dependencies": {
|
|
39
|
-
"@solcreek/
|
|
40
|
-
"
|
|
41
|
-
"consola": "^3.4.2",
|
|
42
|
-
"esbuild": "^0.25.0",
|
|
43
|
-
"smol-toml": "^1.3.1"
|
|
44
|
-
},
|
|
45
|
-
"optionalDependencies": {
|
|
46
|
-
"@solcreek/adapter-nextjs": "workspace:*"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@testing-library/dom": "^10.4.1",
|
|
50
|
-
"@testing-library/react": "^16.3.2",
|
|
51
|
-
"@types/node": "^22.13.10",
|
|
52
|
-
"@types/react-dom": "^19",
|
|
53
|
-
"hono": "^4.7.4",
|
|
54
|
-
"jsdom": "^29.0.1",
|
|
55
|
-
"react": "^19.2.4",
|
|
56
|
-
"react-dom": "^19.2.4",
|
|
57
|
-
"typescript": "^5.8.2"
|
|
51
|
+
"@solcreek/cli": "0.3.0",
|
|
52
|
+
"@solcreek/runtime": "0.1.0"
|
|
58
53
|
}
|
|
59
|
-
}
|
|
54
|
+
}
|
package/react.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@solcreek/runtime/react";
|
package/react.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@solcreek/runtime/react";
|
package/README.md
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# creek
|
|
2
|
-
|
|
3
|
-
Deploy to the edge in seconds. No account required.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/creek)
|
|
6
|
-
[](https://github.com/solcreek/creek/blob/main/LICENSE)
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
npx creek deploy --demo
|
|
10
|
-
# Live in 8.3s -> https://a1b2c3d4.creeksandbox.com
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Creek is the CLI for the [Creek deployment platform](https://creek.dev) -- an open-source, Cloudflare-native alternative to Vercel. Built on [Workers for Platforms](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/).
|
|
14
|
-
|
|
15
|
-
Also available as `ck` and `crk`.
|
|
16
|
-
|
|
17
|
-
## Install
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install -g creek
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Or use directly with `npx`:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx creek deploy
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Quick Start
|
|
30
|
-
|
|
31
|
-
### Deploy a demo (no account needed)
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
creek deploy --demo
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Deploy your project
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
cd my-vite-app
|
|
41
|
-
creek deploy
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Creek auto-detects your framework, runs the build, and deploys to a sandbox preview (60 min).
|
|
45
|
-
|
|
46
|
-
### Deploy a directory
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
creek deploy ./dist
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Deploy from a repo URL
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
creek deploy https://github.com/user/repo
|
|
56
|
-
creek deploy https://github.com/user/repo/tree/main/packages/app
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Commands
|
|
60
|
-
|
|
61
|
-
| Command | Description |
|
|
62
|
-
|---------|-------------|
|
|
63
|
-
| `creek deploy [dir]` | Deploy project, directory, or repo URL |
|
|
64
|
-
| `creek deploy --demo` | Deploy a sample site instantly |
|
|
65
|
-
| `creek projects` | List your projects |
|
|
66
|
-
| `creek deployments` | List deployments for a project |
|
|
67
|
-
| `creek status` | Show current project status |
|
|
68
|
-
| `creek login` | Authenticate with Creek |
|
|
69
|
-
| `creek login --token <key>` | Authenticate in CI/CD (non-interactive) |
|
|
70
|
-
| `creek init` | Create `creek.toml` configuration |
|
|
71
|
-
| `creek claim <id>` | Convert sandbox preview to permanent project |
|
|
72
|
-
| `creek env set <key> <val>` | Set an environment variable |
|
|
73
|
-
| `creek env ls` | List environment variables |
|
|
74
|
-
| `creek env rm <key>` | Remove an environment variable |
|
|
75
|
-
| `creek whoami` | Show current authenticated user |
|
|
76
|
-
|
|
77
|
-
## Global Flags
|
|
78
|
-
|
|
79
|
-
Every command supports these flags:
|
|
80
|
-
|
|
81
|
-
| Flag | Description |
|
|
82
|
-
|------|-------------|
|
|
83
|
-
| `--json` | Output structured JSON (auto-enabled in non-TTY environments) |
|
|
84
|
-
| `--yes` | Skip confirmation prompts (auto-enabled in non-TTY environments) |
|
|
85
|
-
|
|
86
|
-
## For AI Agents
|
|
87
|
-
|
|
88
|
-
Creek is designed for programmatic use. No CAPTCHAs, no interactive prompts in CI.
|
|
89
|
-
|
|
90
|
-
### Structured output
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
creek deploy ./dist --json
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
```json
|
|
97
|
-
{
|
|
98
|
-
"ok": true,
|
|
99
|
-
"sandboxId": "a1b2c3d4",
|
|
100
|
-
"url": "https://a1b2c3d4.creeksandbox.com",
|
|
101
|
-
"deployDurationMs": 9234,
|
|
102
|
-
"expiresAt": "2026-03-27T16:00:00.000Z",
|
|
103
|
-
"assetCount": 12,
|
|
104
|
-
"mode": "sandbox"
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Non-TTY auto-detection
|
|
109
|
-
|
|
110
|
-
When running in pipes, CI/CD, or agent environments (no TTY), the CLI automatically:
|
|
111
|
-
- Outputs JSON instead of human-readable text
|
|
112
|
-
- Skips all confirmation prompts
|
|
113
|
-
- Uses exit codes for success (0) and failure (1)
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# These are equivalent in CI:
|
|
117
|
-
creek deploy ./dist --json --yes
|
|
118
|
-
creek deploy ./dist # auto-detects non-TTY
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### MCP Server
|
|
122
|
-
|
|
123
|
-
Creek provides a remote MCP server at `mcp.creek.dev` for AI agent integration. See the [MCP documentation](https://creek.dev/docs/mcp) for details.
|
|
124
|
-
|
|
125
|
-
### HTTP API
|
|
126
|
-
|
|
127
|
-
Deploy without installing the CLI:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
curl -X POST https://sandbox-api.creek.dev/api/sandbox/deploy \
|
|
131
|
-
-H "Content-Type: application/json" \
|
|
132
|
-
-d '{
|
|
133
|
-
"assets": { "index.html": "<base64>" },
|
|
134
|
-
"source": "my-agent"
|
|
135
|
-
}'
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
No API key required for sandbox deploys. See the [API documentation](https://creek.dev/docs/api) for details.
|
|
139
|
-
|
|
140
|
-
## Supported Frameworks
|
|
141
|
-
|
|
142
|
-
Creek auto-detects and configures the build for:
|
|
143
|
-
|
|
144
|
-
- Next.js
|
|
145
|
-
- Vite (React, Vue, Svelte, Solid)
|
|
146
|
-
- Astro
|
|
147
|
-
- SvelteKit
|
|
148
|
-
- Nuxt
|
|
149
|
-
- TanStack Start
|
|
150
|
-
- React Router
|
|
151
|
-
- Any static site
|
|
152
|
-
|
|
153
|
-
## Deploy Modes
|
|
154
|
-
|
|
155
|
-
| Mode | Trigger | Auth Required | TTL |
|
|
156
|
-
|------|---------|:-------------:|-----|
|
|
157
|
-
| **Demo** | `--demo` flag | No | 60 min |
|
|
158
|
-
| **Sandbox** | No `creek.toml` | No | 60 min |
|
|
159
|
-
| **Production** | Has `creek.toml` + token | Yes | Permanent |
|
|
160
|
-
|
|
161
|
-
## Configuration
|
|
162
|
-
|
|
163
|
-
Create `creek.toml` with `creek init`, or skip it entirely -- Creek works with zero config.
|
|
164
|
-
|
|
165
|
-
```toml
|
|
166
|
-
[project]
|
|
167
|
-
name = "my-app"
|
|
168
|
-
framework = "vite-react"
|
|
169
|
-
|
|
170
|
-
[build]
|
|
171
|
-
command = "npm run build"
|
|
172
|
-
output = "dist"
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Links
|
|
176
|
-
|
|
177
|
-
- [Creek](https://creek.dev) -- Platform homepage
|
|
178
|
-
- [Documentation](https://creek.dev/docs) -- Guides and reference
|
|
179
|
-
- [GitHub](https://github.com/solcreek/creek) -- Source code
|
|
180
|
-
- [MCP Server](https://creek.dev/docs/mcp) -- AI agent integration
|
|
181
|
-
|
|
182
|
-
## License
|
|
183
|
-
|
|
184
|
-
Apache 2.0 -- see [LICENSE](https://github.com/solcreek/creek/blob/main/LICENSE).
|
package/dist/commands/claim.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const claimCommand: import("citty").CommandDef<{
|
|
2
|
-
json: {
|
|
3
|
-
type: "boolean";
|
|
4
|
-
description: string;
|
|
5
|
-
default: boolean;
|
|
6
|
-
};
|
|
7
|
-
yes: {
|
|
8
|
-
type: "boolean";
|
|
9
|
-
description: string;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
sandboxId: {
|
|
13
|
-
type: "positional";
|
|
14
|
-
description: string;
|
|
15
|
-
required: true;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
//# sourceMappingURL=claim.d.ts.map
|
package/dist/commands/claim.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
import consola from "consola";
|
|
3
|
-
import { CreekClient } from "@solcreek/sdk";
|
|
4
|
-
import { getToken, getApiUrl, getSandboxApiUrl } from "../utils/config.js";
|
|
5
|
-
import { globalArgs, resolveJsonMode, jsonOutput } from "../utils/output.js";
|
|
6
|
-
export const claimCommand = defineCommand({
|
|
7
|
-
meta: {
|
|
8
|
-
name: "claim",
|
|
9
|
-
description: "Claim a sandbox deployment as a permanent project",
|
|
10
|
-
},
|
|
11
|
-
args: {
|
|
12
|
-
sandboxId: {
|
|
13
|
-
type: "positional",
|
|
14
|
-
description: "Sandbox ID to claim (shown after sandbox deploy)",
|
|
15
|
-
required: true,
|
|
16
|
-
},
|
|
17
|
-
...globalArgs,
|
|
18
|
-
},
|
|
19
|
-
async run({ args }) {
|
|
20
|
-
const jsonMode = resolveJsonMode(args);
|
|
21
|
-
const token = getToken();
|
|
22
|
-
if (!token) {
|
|
23
|
-
if (jsonMode)
|
|
24
|
-
jsonOutput({ ok: false, error: "not_authenticated", message: "Run `creek login` first" }, 1);
|
|
25
|
-
consola.error("You need to be logged in to claim a sandbox.");
|
|
26
|
-
consola.info("Run `creek login` first, then `creek claim` again.");
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
const sandboxId = args.sandboxId;
|
|
30
|
-
// 1. Fetch sandbox info
|
|
31
|
-
consola.start("Looking up sandbox...");
|
|
32
|
-
const sandboxApiUrl = getSandboxApiUrl();
|
|
33
|
-
const statusRes = await fetch(`${sandboxApiUrl}/api/sandbox/${sandboxId}/status`);
|
|
34
|
-
if (!statusRes.ok) {
|
|
35
|
-
consola.error("Sandbox not found. It may have expired.");
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
const sandbox = (await statusRes.json());
|
|
39
|
-
if (!sandbox.claimable) {
|
|
40
|
-
const msg = sandbox.status === "expired"
|
|
41
|
-
? "This sandbox has expired and can no longer be claimed."
|
|
42
|
-
: `Sandbox is in '${sandbox.status}' state and cannot be claimed.`;
|
|
43
|
-
if (jsonMode)
|
|
44
|
-
jsonOutput({ ok: false, error: "not_claimable", status: sandbox.status, message: msg }, 1);
|
|
45
|
-
consola.error(msg);
|
|
46
|
-
if (sandbox.status === "expired")
|
|
47
|
-
consola.info("Run `creek deploy` to deploy your project permanently.");
|
|
48
|
-
process.exit(1);
|
|
49
|
-
}
|
|
50
|
-
// 2. Create permanent project
|
|
51
|
-
consola.start("Creating permanent project...");
|
|
52
|
-
const client = new CreekClient(getApiUrl(), token);
|
|
53
|
-
const slug = sandbox.templateId ?? sandboxId;
|
|
54
|
-
let project;
|
|
55
|
-
try {
|
|
56
|
-
const res = await client.createProject({
|
|
57
|
-
slug,
|
|
58
|
-
framework: sandbox.framework,
|
|
59
|
-
});
|
|
60
|
-
project = res.project;
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
// Slug might conflict, try with sandbox ID suffix
|
|
64
|
-
const res = await client.createProject({
|
|
65
|
-
slug: `${slug}-${sandboxId}`,
|
|
66
|
-
framework: sandbox.framework,
|
|
67
|
-
});
|
|
68
|
-
project = res.project;
|
|
69
|
-
}
|
|
70
|
-
consola.success(`Created project: ${project.slug}`);
|
|
71
|
-
// 3. Mark sandbox as claimed
|
|
72
|
-
try {
|
|
73
|
-
await fetch(`${sandboxApiUrl}/api/sandbox/${sandboxId}/claim`, {
|
|
74
|
-
method: "POST",
|
|
75
|
-
headers: { "Content-Type": "application/json" },
|
|
76
|
-
body: JSON.stringify({ projectId: project.id }),
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
// Best effort — claim status update is non-critical
|
|
81
|
-
}
|
|
82
|
-
if (jsonMode) {
|
|
83
|
-
jsonOutput({ ok: true, sandboxId, project: project.slug, projectId: project.id });
|
|
84
|
-
}
|
|
85
|
-
consola.success("Sandbox claimed!");
|
|
86
|
-
consola.info("");
|
|
87
|
-
consola.info("Next steps:");
|
|
88
|
-
consola.info(` cd your-project`);
|
|
89
|
-
consola.info(` creek init`);
|
|
90
|
-
consola.info(` creek deploy # deploy permanently`);
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
//# sourceMappingURL=claim.js.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export declare const deployCommand: import("citty").CommandDef<{
|
|
2
|
-
template: {
|
|
3
|
-
type: "string";
|
|
4
|
-
description: string;
|
|
5
|
-
required: false;
|
|
6
|
-
};
|
|
7
|
-
path: {
|
|
8
|
-
type: "string";
|
|
9
|
-
description: string;
|
|
10
|
-
required: false;
|
|
11
|
-
};
|
|
12
|
-
json: {
|
|
13
|
-
type: "boolean";
|
|
14
|
-
description: string;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
yes: {
|
|
18
|
-
type: "boolean";
|
|
19
|
-
description: string;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
dir: {
|
|
23
|
-
type: "positional";
|
|
24
|
-
description: string;
|
|
25
|
-
required: false;
|
|
26
|
-
};
|
|
27
|
-
"skip-build": {
|
|
28
|
-
type: "boolean";
|
|
29
|
-
description: string;
|
|
30
|
-
default: false;
|
|
31
|
-
};
|
|
32
|
-
demo: {
|
|
33
|
-
type: "boolean";
|
|
34
|
-
description: string;
|
|
35
|
-
default: false;
|
|
36
|
-
};
|
|
37
|
-
}>;
|
|
38
|
-
//# sourceMappingURL=deploy.d.ts.map
|