lakebed 0.0.10 → 0.0.11
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 +2 -2
- package/package.json +5 -5
- package/src/cli.js +23 -8
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -120,8 +120,8 @@ queries: {
|
|
|
120
120
|
```sh
|
|
121
121
|
lakebed new [name] [--template todo] [--no-git]
|
|
122
122
|
lakebed create [name] [--template todo] [--no-git]
|
|
123
|
-
lakebed dev
|
|
124
|
-
lakebed build
|
|
123
|
+
lakebed dev [capsule-dir] [--port 3000]
|
|
124
|
+
lakebed build [capsule-dir] --target anonymous [--out .lakebed/artifacts/app.json] [--json]
|
|
125
125
|
lakebed deploy [capsule-dir] [--ttl 7d] [--api <url>] [--json]
|
|
126
126
|
lakebed claim [capsule-dir] [--api <url>] [--json]
|
|
127
127
|
lakebed anonymous-server [--port 8787] [--public-root-url <url>] [--app-base-domain <domain>]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lakebed",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Agent-native CLI and runtime for building and deploying Lakebed capsules.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -52,9 +52,6 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"scripts": {
|
|
56
|
-
"check": "node --check src/cli.js && node --check src/runtime.js && node --check src/server.js && node --check src/client.js && node --check src/source-store.js && node --check src/source-runtime.js && node --check src/source-runtime-worker.js && node --check src/source-runtime-loader.mjs && node --check src/anonymous.js && node --check src/anonymous-server.js && node --check src/auth.js && node --check src/version.js"
|
|
57
|
-
},
|
|
58
55
|
"dependencies": {
|
|
59
56
|
"esbuild": "^0.27.1",
|
|
60
57
|
"pg": "^8.16.3",
|
|
@@ -63,5 +60,8 @@
|
|
|
63
60
|
},
|
|
64
61
|
"devDependencies": {
|
|
65
62
|
"@types/ws": "^8.18.1"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"check": "node --check src/cli.js && node --check src/runtime.js && node --check src/server.js && node --check src/client.js && node --check src/source-store.js && node --check src/source-runtime.js && node --check src/source-runtime-worker.js && node --check src/source-runtime-loader.mjs && node --check src/anonymous.js && node --check src/anonymous-server.js && node --check src/auth.js && node --check src/version.js"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|
package/src/cli.js
CHANGED
|
@@ -38,13 +38,13 @@ function usage() {
|
|
|
38
38
|
Usage:
|
|
39
39
|
lakebed new [name] [--template todo] [--no-git]
|
|
40
40
|
lakebed create [name] [--template todo] [--no-git]
|
|
41
|
-
lakebed dev
|
|
42
|
-
lakebed build
|
|
41
|
+
lakebed dev [capsule-dir] [--port 3000]
|
|
42
|
+
lakebed build [capsule-dir] --target anonymous [--out .lakebed/artifacts/app.json] [--json]
|
|
43
43
|
lakebed deploy [capsule-dir] [--ttl 7d] [--api <url>] [--json]
|
|
44
44
|
lakebed claim [capsule-dir] [--api <url>] [--json]
|
|
45
45
|
lakebed anonymous-server [--port 8787] [--public-root-url <url>] [--app-base-domain <domain>]
|
|
46
46
|
lakebed inspect <deploy-id-or-url> [--api <url>] [--json]
|
|
47
|
-
lakebed run-many
|
|
47
|
+
lakebed run-many [capsule-dir] [--count 20] [--base-port 4000]
|
|
48
48
|
lakebed auth as <name>
|
|
49
49
|
lakebed auth reset
|
|
50
50
|
lakebed db list [deploy-id-or-url] [--port 3000]
|
|
@@ -62,12 +62,27 @@ function readArg(args, name, fallback) {
|
|
|
62
62
|
return args[index + 1] ?? fallback;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
const optionsWithValues = new Set([
|
|
66
|
+
"--api",
|
|
67
|
+
"--app-base-domain",
|
|
68
|
+
"--base-port",
|
|
69
|
+
"--count",
|
|
70
|
+
"--out",
|
|
71
|
+
"--port",
|
|
72
|
+
"--public-root-url",
|
|
73
|
+
"--target",
|
|
74
|
+
"--template",
|
|
75
|
+
"--ttl"
|
|
76
|
+
]);
|
|
77
|
+
|
|
65
78
|
function positionals(args) {
|
|
66
79
|
const values = [];
|
|
67
80
|
for (let index = 0; index < args.length; index += 1) {
|
|
68
81
|
const value = args[index];
|
|
69
82
|
if (value.startsWith("--")) {
|
|
70
|
-
|
|
83
|
+
if (optionsWithValues.has(value)) {
|
|
84
|
+
index += 1;
|
|
85
|
+
}
|
|
71
86
|
continue;
|
|
72
87
|
}
|
|
73
88
|
|
|
@@ -92,7 +107,7 @@ function hasFlag(args, name) {
|
|
|
92
107
|
|
|
93
108
|
function resolveCapsuleDir(value) {
|
|
94
109
|
if (!value) {
|
|
95
|
-
return
|
|
110
|
+
return root;
|
|
96
111
|
}
|
|
97
112
|
|
|
98
113
|
return isAbsolute(value) ? value : resolve(root, value);
|
|
@@ -831,7 +846,7 @@ async function readResponseJson(response) {
|
|
|
831
846
|
|
|
832
847
|
async function deployCommand(args) {
|
|
833
848
|
const [capsuleArg] = positionals(args);
|
|
834
|
-
const capsuleDir =
|
|
849
|
+
const capsuleDir = resolveCapsuleDir(capsuleArg);
|
|
835
850
|
const sourceStore = await createMemorySourceStoreFromDirectory(capsuleDir);
|
|
836
851
|
const serverEnvFileExists = sourceStore.hasFile(SERVER_ENV_FILE);
|
|
837
852
|
const serverEnv = await readCapsuleServerEnv(sourceStore);
|
|
@@ -973,7 +988,7 @@ async function deployCommand(args) {
|
|
|
973
988
|
|
|
974
989
|
async function claimCommand(args) {
|
|
975
990
|
const [capsuleArg] = positionals(args);
|
|
976
|
-
const capsuleDir =
|
|
991
|
+
const capsuleDir = resolveCapsuleDir(capsuleArg);
|
|
977
992
|
const api = deployApiUrl(args);
|
|
978
993
|
const metadata = await readDeployMetadata(capsuleDir);
|
|
979
994
|
|
|
@@ -1153,7 +1168,7 @@ This is a Lakebed capsule. Build the app inside this directory using the Lakebed
|
|
|
1153
1168
|
Run locally:
|
|
1154
1169
|
|
|
1155
1170
|
\`\`\`sh
|
|
1156
|
-
lakebed dev
|
|
1171
|
+
lakebed dev
|
|
1157
1172
|
\`\`\`
|
|
1158
1173
|
|
|
1159
1174
|
Deploy:
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LAKEBED_VERSION = "0.0.
|
|
1
|
+
export const LAKEBED_VERSION = "0.0.11";
|