@tscircuit/cli 0.1.213 → 0.1.214

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.
Files changed (2) hide show
  1. package/dist/main.js +11 -5
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -63215,7 +63215,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
63215
63215
  import { execSync as execSync2 } from "node:child_process";
63216
63216
  var import_semver2 = __toESM2(require_semver2(), 1);
63217
63217
  // package.json
63218
- var version = "0.1.212";
63218
+ var version = "0.1.213";
63219
63219
  var package_default = {
63220
63220
  name: "@tscircuit/cli",
63221
63221
  version,
@@ -63225,7 +63225,7 @@ var package_default = {
63225
63225
  "@biomejs/biome": "^1.9.4",
63226
63226
  "@tscircuit/circuit-json-util": "0.0.67",
63227
63227
  "@tscircuit/fake-snippets": "^0.0.87",
63228
- "@tscircuit/file-server": "^0.0.26",
63228
+ "@tscircuit/file-server": "^0.0.28",
63229
63229
  "@tscircuit/math-utils": "0.0.21",
63230
63230
  "@tscircuit/props": "^0.0.315",
63231
63231
  "@tscircuit/runframe": "^0.0.931",
@@ -64542,6 +64542,11 @@ var get_default = withRouteSpec({
64542
64542
  <p><span class="label">File Path:</span> ${file.file_path}</p>
64543
64543
  <p><span class="label">Created At:</span> ${file.created_at}</p>
64544
64544
  </div>
64545
+ <h2>Links:</h2>
64546
+ <ul>
64547
+ <li><a href="../../files/download?file_path=/${file.file_path}">Download File</a></li>
64548
+ <li><a href="../../files/static/${file.file_path}">Static Route</a></li>
64549
+ </ul>
64545
64550
  <h2>Content:</h2>
64546
64551
  <pre>${(file.text_content ?? "[binary content]").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")}</pre>
64547
64552
  </div>
@@ -64835,11 +64840,12 @@ var getMimeType = (filePath) => {
64835
64840
  var file_path_default2 = withRouteSpec({
64836
64841
  methods: ["GET"],
64837
64842
  pathParams: z16.object({
64838
- file_path: z16.string()
64843
+ file_path: z16.union([z16.string(), z16.array(z16.string())])
64839
64844
  })
64840
64845
  })((req, ctx) => {
64841
64846
  const { file_path } = req.routeParams;
64842
- const file = ctx.db.getFile({ file_path: `/${file_path}` });
64847
+ const joinedFilePath = Array.isArray(file_path) ? file_path.join("/") : file_path;
64848
+ const file = ctx.db.getFile({ file_path: `/${joinedFilePath}` });
64843
64849
  if (!file) {
64844
64850
  return new Response("File not found", { status: 404 });
64845
64851
  }
@@ -64996,7 +65002,7 @@ var routeMapWithHandlers = {
64996
65002
  "/files/get": get_default2,
64997
65003
  "/files/list": list_default4,
64998
65004
  "/files/rename": rename_default,
64999
- "/files/static/[[file_path]]": file_path_default2,
65005
+ "/files/static/[[...file_path]]": file_path_default2,
65000
65006
  "/files/upsert": upsert_default,
65001
65007
  "/health": health_default,
65002
65008
  "/proxy": proxy_default,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.213",
3
+ "version": "0.1.214",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",
7
7
  "@biomejs/biome": "^1.9.4",
8
8
  "@tscircuit/circuit-json-util": "0.0.67",
9
9
  "@tscircuit/fake-snippets": "^0.0.87",
10
- "@tscircuit/file-server": "^0.0.26",
10
+ "@tscircuit/file-server": "^0.0.28",
11
11
  "@tscircuit/math-utils": "0.0.21",
12
12
  "@tscircuit/props": "^0.0.315",
13
13
  "@tscircuit/runframe": "^0.0.931",