@solcreek/cli 0.4.17 → 0.4.18

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.
@@ -686,18 +686,34 @@ async function deploySandbox(cwd, skipBuild, jsonMode = false, resolved, tos) {
686
686
  // so we fail with a helpful message instead of an ENOENT stack trace.
687
687
  const pkgJsonPath = join(cwd, "package.json");
688
688
  if (!existsSync(pkgJsonPath)) {
689
+ // Static fallback: if there's no package.json but the cwd looks like a
690
+ // static site (index.html at root or under public/), treat as static
691
+ // and skip the build step. Covers the common "ran `creek init` in an
692
+ // empty dir, then added only index.html" journey — creek.toml's
693
+ // [build].command = "npm run build" default would otherwise trigger
694
+ // no_package_json here.
695
+ const cwdIndex = existsSync(join(cwd, "index.html"));
696
+ const publicIndex = existsSync(join(cwd, "public/index.html"));
697
+ if (cwdIndex || publicIndex) {
698
+ const staticDir = cwdIndex ? cwd : join(cwd, "public");
699
+ if (!jsonMode) {
700
+ consola.info(" No package.json found — deploying as static site (no build step).");
701
+ }
702
+ return deployDirectory(staticDir, jsonMode, tos);
703
+ }
689
704
  const message = `Expected package.json in ${cwd} but none found.`;
690
705
  if (jsonMode) {
691
706
  jsonOutput({
692
707
  ok: false,
693
708
  error: "no_package_json",
694
709
  message,
695
- hint: "Run `npx creek deploy ./dist` to deploy a prebuilt directory, or `npx creek deploy --template landing` to start from a template.",
710
+ hint: "Add an index.html to deploy as a static site, run `npx creek deploy ./dist` for a prebuilt directory, or `npx creek deploy --template landing` to start from a template.",
696
711
  }, 1, NO_PROJECT_BREADCRUMBS);
697
712
  return;
698
713
  }
699
714
  consola.error(message);
700
- consola.info(" Run `npx creek deploy ./dist` to deploy a prebuilt directory instead,");
715
+ consola.info(" Add an index.html to deploy as a static site,");
716
+ consola.info(" run `npx creek deploy ./dist` to deploy a prebuilt directory,");
701
717
  consola.info(" or `npx creek deploy --template landing` to start from a template.");
702
718
  process.exit(1);
703
719
  }
@@ -6,6 +6,7 @@ const IGNORED_DIRS = new Set([
6
6
  const IGNORED_FILES = new Set([
7
7
  ".DS_Store", "Thumbs.db", ".env", ".env.local", ".env.production",
8
8
  ".gitignore", ".npmrc", ".eslintcache",
9
+ "creek.toml", "wrangler.toml", "wrangler.json", "wrangler.jsonc",
9
10
  ]);
10
11
  function isIgnored(name) {
11
12
  return name.startsWith(".") && IGNORED_FILES.has(name)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solcreek/cli",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "description": "CLI for the Creek deployment platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",