@drewpayment/mink 0.10.0 → 0.11.0-beta.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/README.md +62 -1
- package/dashboard/out/404.html +1 -1
- package/dashboard/out/action-log.html +1 -1
- package/dashboard/out/action-log.txt +1 -1
- package/dashboard/out/activity.html +1 -1
- package/dashboard/out/activity.txt +1 -1
- package/dashboard/out/bugs.html +1 -1
- package/dashboard/out/bugs.txt +1 -1
- package/dashboard/out/capture.html +1 -1
- package/dashboard/out/capture.txt +1 -1
- package/dashboard/out/config.html +1 -1
- package/dashboard/out/config.txt +1 -1
- package/dashboard/out/daemon.html +1 -1
- package/dashboard/out/daemon.txt +1 -1
- package/dashboard/out/design.html +1 -1
- package/dashboard/out/design.txt +1 -1
- package/dashboard/out/discord.html +1 -1
- package/dashboard/out/discord.txt +1 -1
- package/dashboard/out/file-index.html +1 -1
- package/dashboard/out/file-index.txt +1 -1
- package/dashboard/out/index.html +1 -1
- package/dashboard/out/index.txt +1 -1
- package/dashboard/out/insights.html +1 -1
- package/dashboard/out/insights.txt +1 -1
- package/dashboard/out/learning.html +1 -1
- package/dashboard/out/learning.txt +1 -1
- package/dashboard/out/overview.html +1 -1
- package/dashboard/out/overview.txt +1 -1
- package/dashboard/out/scheduler.html +1 -1
- package/dashboard/out/scheduler.txt +1 -1
- package/dashboard/out/sync.html +1 -1
- package/dashboard/out/sync.txt +1 -1
- package/dashboard/out/tokens.html +1 -1
- package/dashboard/out/tokens.txt +1 -1
- package/dashboard/out/waste.html +1 -1
- package/dashboard/out/waste.txt +1 -1
- package/dashboard/out/wiki.html +1 -1
- package/dashboard/out/wiki.txt +1 -1
- package/dist/cli.js +1505 -896
- package/package.json +1 -1
- package/src/cli.ts +1 -1
- package/src/commands/init.ts +29 -4
- package/src/commands/note.ts +2 -2
- package/src/commands/scan.ts +29 -6
- package/src/commands/session-start.ts +8 -2
- package/src/commands/sync-migrate.ts +404 -7
- package/src/commands/sync.ts +5 -2
- package/src/commands/wiki.ts +19 -3
- package/src/core/dashboard-server.ts +13 -5
- package/src/core/git-identity.ts +120 -0
- package/src/core/note-index.ts +50 -1
- package/src/core/paths.ts +19 -3
- package/src/core/project-id.ts +142 -5
- package/src/core/project-registry.ts +122 -13
- package/src/core/scanner.ts +19 -3
- package/src/core/sync.ts +7 -1
- package/src/types/config.ts +9 -0
- package/src/types/note.ts +1 -0
- /package/dashboard/out/_next/static/{frTrvF6NV-Xl2bLk21NkY → WDjkNLHEd_wI-oOzLyblH}/_buildManifest.js +0 -0
- /package/dashboard/out/_next/static/{frTrvF6NV-Xl2bLk21NkY → WDjkNLHEd_wI-oOzLyblH}/_ssgManifest.js +0 -0
package/src/core/scanner.ts
CHANGED
|
@@ -87,13 +87,29 @@ export function getExcludes(config: ProjectConfig): string[] {
|
|
|
87
87
|
return [...DEFAULT_EXCLUDES, ...(config.excludePatterns ?? [])];
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export
|
|
90
|
+
export interface ScanStats {
|
|
91
|
+
files: ScannedFile[];
|
|
92
|
+
totalScanned: number;
|
|
93
|
+
truncated: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function scanProjectWithStats(
|
|
91
97
|
projectRoot: string,
|
|
92
98
|
excludes: string[],
|
|
93
99
|
maxFiles: number = DEFAULT_MAX_FILES
|
|
94
|
-
):
|
|
100
|
+
): ScanStats {
|
|
95
101
|
const results: ScannedFile[] = [];
|
|
96
102
|
walkDirectory(projectRoot, projectRoot, excludes, results);
|
|
97
103
|
results.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
98
|
-
|
|
104
|
+
const totalScanned = results.length;
|
|
105
|
+
const files = results.slice(0, maxFiles);
|
|
106
|
+
return { files, totalScanned, truncated: totalScanned - files.length };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function scanProject(
|
|
110
|
+
projectRoot: string,
|
|
111
|
+
excludes: string[],
|
|
112
|
+
maxFiles: number = DEFAULT_MAX_FILES
|
|
113
|
+
): ScannedFile[] {
|
|
114
|
+
return scanProjectWithStats(projectRoot, excludes, maxFiles).files;
|
|
99
115
|
}
|
package/src/core/sync.ts
CHANGED
|
@@ -15,7 +15,13 @@ const FETCH_TIMEOUT = 15_000;
|
|
|
15
15
|
// Sync layout version. Bumped when the on-disk shape of `~/.mink/` changes in
|
|
16
16
|
// a way that older devices cannot read. Migration runs on first session-start
|
|
17
17
|
// after upgrade when readSyncVersion() < MINK_SYNC_VERSION.
|
|
18
|
-
|
|
18
|
+
//
|
|
19
|
+
// v1 → v2: per-device shards under projects/<id>/state/<deviceId>/
|
|
20
|
+
// v2 → v3: stable identity — adds aliases[] and pathsByDevice{} on project-meta;
|
|
21
|
+
// when projects.identity=git-remote, renames per-project directories
|
|
22
|
+
// from path-derived IDs to git-derived IDs and records prior ID as
|
|
23
|
+
// alias. Migration is a no-op when the flag is off.
|
|
24
|
+
export const MINK_SYNC_VERSION = 3;
|
|
19
25
|
|
|
20
26
|
export function readSyncVersion(): number {
|
|
21
27
|
try {
|
package/src/types/config.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface GlobalConfig {
|
|
|
17
17
|
"cli.auto-update"?: string;
|
|
18
18
|
"cli.auto-update-schedule"?: string;
|
|
19
19
|
"cli.auto-update-package-manager"?: string;
|
|
20
|
+
"projects.identity"?: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export type ConfigKey = keyof GlobalConfig & string;
|
|
@@ -170,6 +171,14 @@ export const CONFIG_KEYS: ConfigKeyMeta[] = [
|
|
|
170
171
|
description: "Force a package manager (auto|npm|bun) for self-upgrade installs",
|
|
171
172
|
scope: "local",
|
|
172
173
|
},
|
|
174
|
+
{
|
|
175
|
+
key: "projects.identity",
|
|
176
|
+
default: "path-derived",
|
|
177
|
+
envVar: "MINK_PROJECTS_IDENTITY",
|
|
178
|
+
description:
|
|
179
|
+
"Project identity strategy: path-derived (legacy) or git-remote (stable across machines)",
|
|
180
|
+
scope: "shared",
|
|
181
|
+
},
|
|
173
182
|
];
|
|
174
183
|
|
|
175
184
|
const VALID_KEYS = new Set<string>(CONFIG_KEYS.map((k) => k.key));
|
package/src/types/note.ts
CHANGED
|
File without changes
|
/package/dashboard/out/_next/static/{frTrvF6NV-Xl2bLk21NkY → WDjkNLHEd_wI-oOzLyblH}/_ssgManifest.js
RENAMED
|
File without changes
|