@codeam/shared 2.76.22 → 2.76.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/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1473,6 +1473,17 @@ interface PreviewDetection {
|
|
|
1473
1473
|
args: string[];
|
|
1474
1474
|
}>;
|
|
1475
1475
|
notes?: string;
|
|
1476
|
+
/**
|
|
1477
|
+
* Project-relative directory the dev server (and `setup_commands`, and the
|
|
1478
|
+
* Node deps pre-flight) runs in — for an app that lives in a subfolder of
|
|
1479
|
+
* the workspace (`teleshop/` with its own `.venv`). Absent or `'.'` = the
|
|
1480
|
+
* workspace root, the behaviour before this field existed. `command` paths
|
|
1481
|
+
* like `.venv/bin/python` resolve against it. The CLI refuses a value that
|
|
1482
|
+
* escapes the workspace or doesn't exist. Additive: older CLIs ignore it,
|
|
1483
|
+
* and the apps carry it through untouched (the confirm sheet spreads the
|
|
1484
|
+
* detection it was given).
|
|
1485
|
+
*/
|
|
1486
|
+
cwd?: string;
|
|
1476
1487
|
/**
|
|
1477
1488
|
* Every runnable dev-style script the CLI found in the repo (root + each
|
|
1478
1489
|
* workspace app), so the confirm sheet can offer them in an autocomplete
|
package/dist/index.d.ts
CHANGED
|
@@ -1473,6 +1473,17 @@ interface PreviewDetection {
|
|
|
1473
1473
|
args: string[];
|
|
1474
1474
|
}>;
|
|
1475
1475
|
notes?: string;
|
|
1476
|
+
/**
|
|
1477
|
+
* Project-relative directory the dev server (and `setup_commands`, and the
|
|
1478
|
+
* Node deps pre-flight) runs in — for an app that lives in a subfolder of
|
|
1479
|
+
* the workspace (`teleshop/` with its own `.venv`). Absent or `'.'` = the
|
|
1480
|
+
* workspace root, the behaviour before this field existed. `command` paths
|
|
1481
|
+
* like `.venv/bin/python` resolve against it. The CLI refuses a value that
|
|
1482
|
+
* escapes the workspace or doesn't exist. Additive: older CLIs ignore it,
|
|
1483
|
+
* and the apps carry it through untouched (the confirm sheet spreads the
|
|
1484
|
+
* detection it was given).
|
|
1485
|
+
*/
|
|
1486
|
+
cwd?: string;
|
|
1476
1487
|
/**
|
|
1477
1488
|
* Every runnable dev-style script the CLI found in the repo (root + each
|
|
1478
1489
|
* workspace app), so the confirm sheet can offer them in an autocomplete
|
package/dist/index.js
CHANGED
|
@@ -3266,13 +3266,16 @@ Analyze the project in the current working directory and return how to start
|
|
|
3266
3266
|
its development server for in-app preview.
|
|
3267
3267
|
|
|
3268
3268
|
Read package.json, Procfile, Dockerfile, docker-compose.yml, manage.py, app.json,
|
|
3269
|
-
mix.exs, Cargo.toml, go.mod, requirements.txt, Gemfile, and any
|
|
3270
|
-
markers you find at depth <= 2.
|
|
3269
|
+
mix.exs, Cargo.toml, go.mod, requirements.txt, pyproject.toml, Gemfile, and any
|
|
3270
|
+
other framework markers you find at depth <= 2. The app may live in a subfolder
|
|
3271
|
+
(e.g. teleshop/requirements.txt with nothing runnable at the root) \u2014 look there
|
|
3272
|
+
too.
|
|
3271
3273
|
|
|
3272
3274
|
Return ONLY a JSON object on stdout (no prose, no markdown fences):
|
|
3273
3275
|
|
|
3274
3276
|
{
|
|
3275
3277
|
"framework": "<name, or 'unsupported'>",
|
|
3278
|
+
"cwd": "<folder the dev server runs in, relative to the current directory; '.' for the root>",
|
|
3276
3279
|
"command": "<executable>",
|
|
3277
3280
|
"args": ["..."],
|
|
3278
3281
|
"port": <number>,
|
|
@@ -3284,6 +3287,13 @@ Return ONLY a JSON object on stdout (no prose, no markdown fences):
|
|
|
3284
3287
|
|
|
3285
3288
|
Rules:
|
|
3286
3289
|
- Pick the script the developer would run locally to see the app (typically "dev", "start", "serve").
|
|
3290
|
+
- If the app lives in a subfolder, set "cwd" to that folder (e.g. "teleshop"). command,
|
|
3291
|
+
args and setup_commands then run INSIDE it: write paths relative to it
|
|
3292
|
+
(".venv/bin/python", not "teleshop/.venv/bin/python"), and never wrap the command
|
|
3293
|
+
in "cd \u2026 &&" or "sh -c" \u2014 it is executed directly, without a shell.
|
|
3294
|
+
- Python: use the project's virtualenv interpreter when one exists
|
|
3295
|
+
(".venv/bin/python" with args ["-m","uvicorn","main:app","--host","0.0.0.0","--port","8000"]),
|
|
3296
|
+
otherwise "python3".
|
|
3287
3297
|
- Prefer binding to 0.0.0.0 \u2014 most frameworks default to localhost which the tunnel cannot reach.
|
|
3288
3298
|
- For Expo: framework="Expo", command="npx", args=["expo","start","--tunnel"], port=8081, notes="Scan QR with Expo Go".
|
|
3289
3299
|
- If no dev server applies (CLI library, lambda, batch script): {"framework":"unsupported","notes":"<reason>"}.
|