agentic-mobile-kit 0.16.0 → 0.16.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.
- package/lib/init.js +16 -3
- package/package.json +1 -1
package/lib/init.js
CHANGED
|
@@ -97,6 +97,17 @@ function detectPm(cwd, forced) {
|
|
|
97
97
|
return pms.npm;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// what isn't committed, apart from the repository's own worktrees inside the project (Claude Code keeps its sessions'
|
|
101
|
+
// in .claude/worktrees/, which kits before 0.15.0 didn't ignore): another session's work, which the kit never touches
|
|
102
|
+
function uncommitted(cwd) {
|
|
103
|
+
// compared as the system resolves them: git writes C:/Users/…, a Windows temp folder can be C:\Users\RUNNER~1\…
|
|
104
|
+
const real = p => { const r = (() => { try { return fs.realpathSync.native(p); } catch { return path.resolve(p); } })(); return WIN ? r.toLowerCase() : r; };
|
|
105
|
+
const trees = new Set(git(cwd, 'worktree', 'list', '--porcelain').split('\n').filter(l => l.startsWith('worktree ')).map(l => real(l.slice(9))));
|
|
106
|
+
return git(cwd, 'status', '--porcelain', '-z', '--untracked-files=all').split('\0').filter(Boolean)
|
|
107
|
+
.filter(e => !(e.startsWith('?? ') && trees.has(real(path.join(cwd, e.slice(3).replace(/\/$/, ''))))))
|
|
108
|
+
.map(e => e.replace(/^.?.? /, ''));
|
|
109
|
+
}
|
|
110
|
+
|
|
100
111
|
// the app's folder first: in the wrong folder, "run git init" would be the wrong advice
|
|
101
112
|
function checkProject(cwd) {
|
|
102
113
|
const pkgFile = path.join(cwd, 'package.json');
|
|
@@ -107,8 +118,10 @@ function checkProject(cwd) {
|
|
|
107
118
|
try { git(cwd, 'rev-parse', '--is-inside-work-tree'); } catch {
|
|
108
119
|
throw new InitError('This folder is not a git repository. Run "git init" and commit first; git is how init can be undone.');
|
|
109
120
|
}
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
const dirty = uncommitted(cwd);
|
|
122
|
+
if (dirty.length) {
|
|
123
|
+
const named = `${dirty.slice(0, 3).join(', ')}${dirty.length > 3 ? ` and ${dirty.length - 3} more` : ''}`;
|
|
124
|
+
throw new InitError(`You have uncommitted changes (${named}). Commit or stash them first, so this can be undone with git.`);
|
|
112
125
|
}
|
|
113
126
|
const stack = detectStack(cwd, deps);
|
|
114
127
|
if (stack === 'bare' && (!fs.existsSync(path.join(cwd, 'ios')) || !fs.existsSync(path.join(cwd, 'android')))) {
|
|
@@ -962,7 +975,7 @@ function sync(cwd, opts = {}) {
|
|
|
962
975
|
try { if (moved.length) stale = git(cwd, 'grep', '-l', '--untracked', '-F', ...moved.flatMap(rel => ['-e', rel])); } catch {}
|
|
963
976
|
if (stale) done.warnings.push(`still pointing to the kit's old folders: ${stale.split('\n').join(', ')}. Change docs/ai/ to docs/amk/ and scripts/ai/ to scripts/amk/ there.`);
|
|
964
977
|
// it started from a clean working tree, so git shows everything it changed (tool configs too)
|
|
965
|
-
const changed =
|
|
978
|
+
const changed = uncommitted(cwd).length > 0;
|
|
966
979
|
return { report, warnings: done.warnings, from, to: KIT_VERSION, tools, changed, generated, generateError };
|
|
967
980
|
}
|
|
968
981
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-mobile-kit",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "One setup for AI-assisted development of React Native apps, bare or Expo: shared rules and workflows for Claude Code, Codex and Antigravity, git hooks, device checks with screenshots, and release tooling for the App Store and Google Play.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "prakashpro1",
|