flypod 0.1.0 → 0.1.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.
@@ -3,7 +3,7 @@ import {
3
3
  collectDist,
4
4
  deploySite,
5
5
  resolveDeployDir
6
- } from "../cli-ezsrcc6t.js";
6
+ } from "../cli-w8brx6zh.js";
7
7
 
8
8
  // bin/deploy.ts
9
9
  import { readFile } from "node:fs/promises";
@@ -670,7 +670,12 @@ async function resolveDeployDir(opts = {}) {
670
670
  }
671
671
  throw new Error(`No build output folder found. Looked for ${BUILD_DIR_CANDIDATES.join(", ")} ` + `(each must contain an index.html). Pass the folder explicitly, e.g. \`npx flypod ./dist\`.`);
672
672
  }
673
- async function collectDist(dir) {
673
+ async function collectDist(path) {
674
+ const info = await stat(path);
675
+ if (info.isFile()) {
676
+ const name = path.split("/").pop() ?? "index.html";
677
+ return { [name]: await readFile(path) };
678
+ }
674
679
  const files = {};
675
680
  async function walk(current) {
676
681
  for (const entry of await readdir(current, { withFileTypes: true })) {
@@ -678,10 +683,10 @@ async function collectDist(dir) {
678
683
  if (entry.isDirectory())
679
684
  await walk(full);
680
685
  else
681
- files[relative(dir, full).split("\\").join("/")] = await readFile(full);
686
+ files[relative(path, full).split("\\").join("/")] = await readFile(full);
682
687
  }
683
688
  }
684
- await walk(dir);
689
+ await walk(path);
685
690
  return files;
686
691
  }
687
692
  async function deploySite(opts) {
package/dist/src/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  collectDist,
4
4
  deploySite,
5
5
  resolveDeployDir
6
- } from "../cli-ezsrcc6t.js";
6
+ } from "../cli-w8brx6zh.js";
7
7
  export {
8
8
  resolveDeployDir,
9
9
  deploySite,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flypod",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Zero-auth, agent-native deploy primitive — drop files, get a URL back",
5
5
  "module": "src/cli.ts",
6
6
  "type": "module",
@@ -39,14 +39,14 @@
39
39
  "dev": "bun --hot index.ts"
40
40
  },
41
41
  "dependencies": {
42
- "fflate": "^0.8.3",
43
- "hono": "^4.12.25",
44
- "marked": "^18.0.5"
42
+ "fflate": "^0.8.3"
45
43
  },
46
44
  "devDependencies": {
47
45
  "@libsql/client": "^0.17.3",
48
46
  "@types/bun": "latest",
49
47
  "better-auth": "^1.6.14",
48
+ "hono": "^4.12.25",
49
+ "marked": "^18.0.5",
50
50
  "playwright": "^1.60.0",
51
51
  "typescript": "^6.0.3",
52
52
  "wrangler": "^4.0.0"