create-shibumi 0.3.0 → 0.3.2
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/README.md +1 -1
- package/package.json +1 -1
- package/src/adopt.ts +2 -2
- package/src/cli.ts +3 -3
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Creation is atomic: the project is built in a temporary sibling directory and re
|
|
|
38
38
|
|
|
39
39
|
## Adopting an existing project
|
|
40
40
|
|
|
41
|
-
`bun create shibumi .` detects where your build lands (Astro and Vite write `dist/`, Eleventy `_site/`, an exported Next.js `out/`, plain files `public/`),
|
|
41
|
+
`bun create shibumi .` detects where your build lands (Astro and Vite write `dist/`, Eleventy `_site/`, an exported Next.js `out/`, plain files `public/`), copies in `scripts/ship.ts`, adds the `ship` scripts, installs the one dependency that client needs, and generates a `Dockerfile`, `compose.yaml`, and `.dockerignore` for the static image. Git is never touched, and `--no-install` skips the install.
|
|
42
42
|
|
|
43
43
|
Two cases stop the run instead of guessing. Deployment files that already exist are never reinterpreted: a `compose.yaml` carrying Shibumi's static labels beside somebody else's `Dockerfile` would deploy the wrong artifact. A `package.json` with a `start` script belongs to `bun ship:setup`, which generates server deployment files. Finish with `bun ship:setup`.
|
|
44
44
|
|
package/package.json
CHANGED
package/src/adopt.ts
CHANGED
|
@@ -108,7 +108,7 @@ export class AdoptError extends Error {
|
|
|
108
108
|
function verifiedShipPath(templatesDir: string): string {
|
|
109
109
|
const shipPath = join(templatesDir, "ship.ts");
|
|
110
110
|
if (!existsSync(shipPath)) {
|
|
111
|
-
throw new AdoptError(`
|
|
111
|
+
throw new AdoptError(`Packaged deploy script missing at ${shipPath}; aborting.`);
|
|
112
112
|
}
|
|
113
113
|
if (templatesDir === DEFAULT_TEMPLATES_DIR) {
|
|
114
114
|
const lock = JSON.parse(
|
|
@@ -117,7 +117,7 @@ function verifiedShipPath(templatesDir: string): string {
|
|
|
117
117
|
const digest = new Bun.CryptoHasher("sha256").update(readFileSync(shipPath)).digest("hex");
|
|
118
118
|
if (digest !== lock.sha256) {
|
|
119
119
|
throw new AdoptError(
|
|
120
|
-
`
|
|
120
|
+
`Packaged deploy script does not match its checksum lock; the package may be corrupt. Reinstall create-shibumi.`
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
}
|
package/src/cli.ts
CHANGED
|
@@ -44,7 +44,7 @@ async function printInstaller(): Promise<never> {
|
|
|
44
44
|
const bytes = await Bun.file(installer).arrayBuffer();
|
|
45
45
|
const digest = new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
|
|
46
46
|
if (digest !== lock.sha256) {
|
|
47
|
-
process.stderr.write("
|
|
47
|
+
process.stderr.write("Packaged installer does not match its checksum lock; reinstall create-shibumi.\n");
|
|
48
48
|
process.exit(1);
|
|
49
49
|
}
|
|
50
50
|
process.stdout.write(readFileSync(installer, "utf8"));
|
|
@@ -323,7 +323,7 @@ async function main(): Promise<void> {
|
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
value: "blog" as TemplateId,
|
|
326
|
-
label: `Blog${detail("
|
|
326
|
+
label: `Blog${detail("with RSS, sitemap, SEO")}`,
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
329
|
value: "static" as TemplateId,
|
|
@@ -374,7 +374,7 @@ async function main(): Promise<void> {
|
|
|
374
374
|
if (args.install) log.success("Dependencies installed");
|
|
375
375
|
else log.info("Install skipped; run bun install inside the project");
|
|
376
376
|
if (existsSync(join(result.dest, "scripts", "ship.ts"))) {
|
|
377
|
-
log.success("
|
|
377
|
+
log.success("Deploy script added (scripts/ship.ts)");
|
|
378
378
|
}
|
|
379
379
|
} catch (err) {
|
|
380
380
|
if (err instanceof CreateError) {
|