Skip to content

Commit 8d459fd

Browse files
authored
fix(cli): bind sim-setup's containers to loopback, fix reset and env quoting, retire the legacy simstudio CLI (#9830)
* fix(cli): bind sim-setup's containers to loopback, fix reset and env quoting, retire the legacy simstudio CLI * fix(setup): rebind containers an earlier sim-setup published on every interface, and stop a dev reset that failed to tear down * fix(setup): warn about containers an earlier sim-setup exposed instead of replacing them
1 parent 20a924c commit 8d459fd

19 files changed

Lines changed: 156 additions & 710 deletions

‎.github/workflows/publish-cli.yml‎

Lines changed: 0 additions & 107 deletions
This file was deleted.

‎.github/workflows/publish-sim-cli.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ jobs:
106106
echo "tag=$TAG"
107107
} >> "$GITHUB_OUTPUT"
108108
109+
# `./embed` and the `#sim-cli/*` imports point at TypeScript source, which
110+
# only the monorepo's own Next.js app consumes (it transpiles the package).
111+
# The tarball ships `dist` alone, so published they would be dead entry
112+
# points; the smoke test below fails on any export that does not exist.
113+
- name: Drop source-only entry points
114+
working-directory: packages/sim-cli
115+
run: |
116+
jq 'del(.imports, .exports["./embed"])' package.json > "$RUNNER_TEMP/package.json"
117+
mv "$RUNNER_TEMP/package.json" package.json
118+
109119
# Bun packs because it rewrites `workspace:` ranges to real versions,
110120
# which `npm pack` would publish verbatim. The smoke test below and the
111121
# publish job both use this one tarball, so what was tested is what ships.
@@ -126,6 +136,20 @@ jobs:
126136
SMOKE_DIR="$(mktemp -d "$RUNNER_TEMP/sim-cli-smoke.XXXXXX")"
127137
tar -xzf "$RUNNER_TEMP/package.tgz" -C "$SMOKE_DIR"
128138
test "$("$SMOKE_DIR/package/dist/index.js" --version)" = "$VERSION"
139+
node -e '
140+
const fs = require("node:fs")
141+
const path = require("node:path")
142+
const root = path.join(process.argv[1], "package")
143+
const pkg = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"))
144+
const targets = Object.values(pkg.exports ?? {}).flatMap((entry) =>
145+
typeof entry === "string" ? [entry] : Object.values(entry)
146+
)
147+
const missing = targets.filter((target) => !fs.existsSync(path.join(root, target)))
148+
if (missing.length > 0) {
149+
console.error("Exports point at files the tarball does not contain: " + missing.join(", "))
150+
process.exit(1)
151+
}
152+
' "$SMOKE_DIR"
129153
130154
- name: Verify version is unpublished
131155
env:

‎biome.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@
167167
"**/*.spec.ts",
168168
"apps/desktop/e2e/**",
169169
"apps/sim/vitest.setup.ts",
170-
"packages/cli/**",
171170
"packages/sim-cli/**",
172171
"packages/sim-setup/**",
173172
"packages/db/script-migrations/**",

‎bun.lock‎

Lines changed: 0 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎knip.jsonc‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
"ignoreIssues": { "components/icons.tsx": ["exports", "types", "duplicates"] }
145145
},
146146
"apps/pii": { "includeEntryExports": false },
147-
"packages/cli": { "includeEntryExports": false },
148147
"packages/db": {
149148
"includeEntryExports": false,
150149
"entry": [

‎packages/cli/README.md‎

Lines changed: 0 additions & 57 deletions
This file was deleted.

‎packages/cli/package.json‎

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)