rvlib-shipkit 0.24.0 → 0.26.0
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/cli/cmd_Start.ts +1 -1
- package/src/start-repo.ts +16 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.26.0
|
|
4
|
+
|
|
5
|
+
- **start means START: the full bootstrap runs on any dir with no commit history.** 0.25.0 widened the scaffold to empty dirs and commitless husks, and the very next field run hit the remaining wall: a folder holding one stray readme was still refused. The gate is now commit history alone: no commits means the dir is startable, and loose files simply ride in the first commit as the repo's first backup. What start still refuses is structural: a repo with real history is never scaffolded or pushed over, a subdirectory of another work tree gets nothing, a temp dir never mints a github repo, and the risky-file refusal still blocks a first commit carrying a `.env` or `node_modules` anywhere in the tree.
|
|
6
|
+
|
|
7
|
+
## 0.25.0
|
|
8
|
+
|
|
9
|
+
- **A pre-existing EMPTY dir (or a commitless git-only husk) starts like a brand-new one.** The full-bootstrap scaffold keyed on "this run created the dir", so `mkdir foo` followed by `shipkit start foo`, or a re-run over the husk an older shipkit left, still ended in git-only plus manual next steps. The everyday-cd guard exists to protect a folder holding files, and an empty folder holds none: emptiness (junk like `.DS_Store` aside) now counts as starting intent, a `.git` with no commits counts too, and a git dir with real history stays untouched. A folder with files keeps the old behavior exactly.
|
|
10
|
+
|
|
3
11
|
## 0.24.0
|
|
4
12
|
|
|
5
13
|
- **Custom panels lead the studio drawer, and the prompt folds.** A repo's `customPanel` tabs (the tint-mask painter, a legs editor) are the working surfaces, yet they rendered LAST in the drawer tab row, behind two json diagnostics. They come first now, `asset` then `roll meta` after, and a kind with exactly one custom panel gets it as the drawer's default tab until the user picks another. The prompt textarea folds to one ellipsized line by default (click to expand, a chevron folds it back, state holds for the session), so the stage and the rolls get the height back. The drawer toggle now reads `drawer ▾`, because with a custom panel as default content a button labelled JSON opened a paint surface.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rvlib-shipkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "All-in-one repo companion: ci gate (task DAG), auto-discovered health checks, release-contract fulfillness, asks queue, md-wiki tools, asset atelier, live tui",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/cli/cmd_Start.ts
CHANGED
|
@@ -9,7 +9,7 @@ export class StartCommand extends Command {
|
|
|
9
9
|
|
|
10
10
|
static override usage = Command.Usage({
|
|
11
11
|
category: 'Setup',
|
|
12
|
-
description: 'create (or enter) ~/dev/<name> from ANY cwd, READY to work in: ensures the dir, seeds CLAUDE.md include lines,
|
|
12
|
+
description: 'create (or enter) ~/dev/<name> from ANY cwd, READY to work in: ensures the dir, seeds CLAUDE.md include lines, scaffolds a minimal package.json + src/index.ts + the rvlib-shipkit dev dep on any dir with no commit history (loose files ride in the first commit), wires shipkit (repo.config.ts via init), then runs the whole bootstrap chain: git init, first commit, PRIVATE github repo, push. Only a repo with real history is left as it is. Prints the dir on stdout so a shell alias can cd there. cwd-only sibling: `shipkit init`',
|
|
13
13
|
examples: [
|
|
14
14
|
['create or enter ~/dev/pong: dir, package.json, shipkit wiring, git, first commit, private github repo, push', 'shipkit start pong'],
|
|
15
15
|
['seed CLAUDE.md includes', "shipkit start pong --include '@~/wiki/index.md' --include '@./agent/index.md'"],
|
package/src/start-repo.ts
CHANGED
|
@@ -35,9 +35,6 @@ export async function startRepo(name: string, opts: StartOpts = {}): Promise<num
|
|
|
35
35
|
return 2
|
|
36
36
|
}
|
|
37
37
|
const dir = join(opts.root ?? join(homedir(), 'dev'), name)
|
|
38
|
-
// this run creating the dir IS the signal that a repo is being started,
|
|
39
|
-
// which is what the github half keys on: `ship <name>` is also the
|
|
40
|
-
// everyday cd into a folder that already exists
|
|
41
38
|
const justCreated = !existsSync(dir)
|
|
42
39
|
if (justCreated) {
|
|
43
40
|
mkdirSync(dir, { recursive: true })
|
|
@@ -70,14 +67,12 @@ export async function startRepo(name: string, opts: StartOpts = {}): Promise<num
|
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
// start is the from-anywhere verb, and a STARTED repo comes out READY:
|
|
73
|
-
//
|
|
74
|
-
// rvlib-shipkit dev dep, repo.config.ts via init, git,
|
|
75
|
-
// private github repo, push. A dir that already holds a
|
|
76
|
-
// (package.json) gets the same minus the scaffold.
|
|
77
|
-
// with
|
|
78
|
-
//
|
|
79
|
-
// never write a package.json into a folder that holds someone's files).
|
|
80
|
-
// init itself stays cwd-only, like git init.
|
|
70
|
+
// any dir with no commit history gets a minimal package.json, a first
|
|
71
|
+
// src/index.ts, the rvlib-shipkit dev dep, repo.config.ts via init, git,
|
|
72
|
+
// first commit, private github repo, push. A dir that already holds a
|
|
73
|
+
// project (package.json) gets the same minus the scaffold. Only a repo
|
|
74
|
+
// with real history is left as it is (git wiring aside): that history
|
|
75
|
+
// owns the dir. init itself stays cwd-only, like git init.
|
|
81
76
|
// --skip means shipkit NEVER TOUCHES a listed repo (a day-job checkout
|
|
82
77
|
// belongs on that list), not just no CLAUDE.md. And the cd contract survives a
|
|
83
78
|
// failed adoption: the dir always prints, wiring trouble is a WARN.
|
|
@@ -90,13 +85,16 @@ export async function startRepo(name: string, opts: StartOpts = {}): Promise<num
|
|
|
90
85
|
let wired = false
|
|
91
86
|
try { wired = await ensureGitRepo(dir, { print }) }
|
|
92
87
|
catch (e) { console.error(`WARN could not wire git in ${dir}: ${e instanceof Error ? e.message : String(e)} — the dir is still yours`) }
|
|
93
|
-
// the scaffold fires
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
|
|
88
|
+
// start means START: the scaffold fires for ANY dir with no commit
|
|
89
|
+
// history (created this run, found empty, found holding loose files,
|
|
90
|
+
// or the husk an interrupted start left). Pre-existing files simply
|
|
91
|
+
// ride in the first commit, which backs them up. What it never
|
|
92
|
+
// touches: a repo with real history (that history owns the dir), a
|
|
93
|
+
// subdirectory of another work tree (git refused, wired is false),
|
|
94
|
+
// and the risky-file commit refusal downstream still guards .env and
|
|
95
|
+
// node_modules
|
|
96
|
+
const startable = wired && (await runner('git', dir, 120_000)(['rev-parse', '--verify', 'HEAD'])).code !== 0
|
|
97
|
+
if (startable && !existsSync(join(dir, 'package.json')) && !existsSync(join(dir, 'repo.config.ts'))) {
|
|
100
98
|
const pkg = { name, version: '0.0.0', private: true, type: 'module', scripts: {} }
|
|
101
99
|
writeFileSync(join(dir, 'package.json'), JSON.stringify(pkg, null, 4) + '\n')
|
|
102
100
|
// the first source file, so the ci gate is green from commit one:
|