@youtyan/code-viewer 0.6.7 → 0.6.8
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 +4 -1
- package/dist/code-viewer.js +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -178,7 +178,10 @@ separate project-level config file). `.DS_Store` and a broad set of
|
|
|
178
178
|
build/cache directories (`node_modules`, `dist`, `build`, `.next`, `.turbo`,
|
|
179
179
|
`.parcel-cache`, `.vite`, `.angular`, `.dart_tool`, `.venv`, …) are hidden by
|
|
180
180
|
default. Pass `--scope-omit-dir <name>` (repeatable) to override the omit
|
|
181
|
-
list on the command line for one session.
|
|
181
|
+
list on the command line for one session. `.devbox` and `.direnv` are always
|
|
182
|
+
excluded regardless of saved settings or CLI overrides: they hold thousands
|
|
183
|
+
of generated directories (Nix store link trees) that would stall the
|
|
184
|
+
worktree watcher.
|
|
182
185
|
|
|
183
186
|
The viewer keeps its per-project state under `.code-viewer/` at the repository
|
|
184
187
|
root:
|
package/dist/code-viewer.js
CHANGED
|
@@ -1052,6 +1052,10 @@ function normalizeBlameRef(ref, base) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
return { base, ref: rawRef };
|
|
1054
1054
|
}
|
|
1055
|
+
function withAlwaysWorktreeOmitDirNames(names) {
|
|
1056
|
+
const missing = ALWAYS_WORKTREE_OMIT_DIR_NAMES.filter((name) => !names.includes(name));
|
|
1057
|
+
return missing.length ? [...names, ...missing] : names;
|
|
1058
|
+
}
|
|
1055
1059
|
function run(args, cwd) {
|
|
1056
1060
|
return runSync(resolveGitArgs(args), cwd, {
|
|
1057
1061
|
timeout: GIT_COMMAND_TIMEOUT_MS
|
|
@@ -2118,10 +2122,11 @@ function truncateToNHunks(diffText, n, maxLines = Number.POSITIVE_INFINITY) {
|
|
|
2118
2122
|
lineTruncated
|
|
2119
2123
|
};
|
|
2120
2124
|
}
|
|
2121
|
-
var BLAME_ZERO_SHA = "0000000000000000000000000000000000000000", WORKTREE_RECURSIVE_DEPTH_LIMIT = 32, WORKTREE_RECURSIVE_ENTRY_LIMIT = 50000, DEFAULT_REF_COMMIT_LIMIT = 100, MAX_REF_COMMIT_LIMIT = 500, COMMIT_FORMAT = "%H%x00%s%x00%an%x00%aI", DEFAULT_WORKTREE_OMIT_DIR_NAMES, GIT_COMMAND_TIMEOUT_MS = 20000, HISTORY_FORMAT = "%H%x00%s%x00%an%x00%aI%x00%P%x00%b", MAX_HISTORY_LIMIT = 200;
|
|
2125
|
+
var BLAME_ZERO_SHA = "0000000000000000000000000000000000000000", WORKTREE_RECURSIVE_DEPTH_LIMIT = 32, WORKTREE_RECURSIVE_ENTRY_LIMIT = 50000, DEFAULT_REF_COMMIT_LIMIT = 100, MAX_REF_COMMIT_LIMIT = 500, COMMIT_FORMAT = "%H%x00%s%x00%an%x00%aI", ALWAYS_WORKTREE_OMIT_DIR_NAMES, DEFAULT_WORKTREE_OMIT_DIR_NAMES, GIT_COMMAND_TIMEOUT_MS = 20000, HISTORY_FORMAT = "%H%x00%s%x00%an%x00%aI%x00%P%x00%b", MAX_HISTORY_LIMIT = 200;
|
|
2122
2126
|
var init_git = __esm(() => {
|
|
2123
2127
|
init_command_resolver();
|
|
2124
2128
|
init_runtime();
|
|
2129
|
+
ALWAYS_WORKTREE_OMIT_DIR_NAMES = [".devbox", ".direnv"];
|
|
2125
2130
|
DEFAULT_WORKTREE_OMIT_DIR_NAMES = [
|
|
2126
2131
|
"node_modules",
|
|
2127
2132
|
"bower_components",
|
|
@@ -2142,8 +2147,7 @@ var init_git = __esm(() => {
|
|
|
2142
2147
|
"out",
|
|
2143
2148
|
"target",
|
|
2144
2149
|
".gradle",
|
|
2145
|
-
|
|
2146
|
-
".direnv",
|
|
2150
|
+
...ALWAYS_WORKTREE_OMIT_DIR_NAMES,
|
|
2147
2151
|
".pnpm-store",
|
|
2148
2152
|
".turbo",
|
|
2149
2153
|
".parcel-cache",
|
|
@@ -22164,7 +22168,7 @@ Examples:
|
|
|
22164
22168
|
}
|
|
22165
22169
|
warnIfLegacyConfigPresent();
|
|
22166
22170
|
if (scopeOmitDirCliOverride) {
|
|
22167
|
-
scopeOmitDirNames = scopeOmitDirCliOverride;
|
|
22171
|
+
scopeOmitDirNames = withAlwaysWorktreeOmitDirNames(scopeOmitDirCliOverride);
|
|
22168
22172
|
}
|
|
22169
22173
|
scopeWatchLimit = worktreeWatchDirectoryLimitFromEnv();
|
|
22170
22174
|
}
|
|
@@ -22180,7 +22184,7 @@ function applyPersistedSettings(state) {
|
|
|
22180
22184
|
const prevExclude = scopeExcludeNames;
|
|
22181
22185
|
const prevWatchLimit = scopeWatchLimit;
|
|
22182
22186
|
if (!scopeOmitDirCliOverride && Array.isArray(state.scopeOmitDirs) && state.scopeOmitDirs.length > 0) {
|
|
22183
|
-
scopeOmitDirNames = state.scopeOmitDirs;
|
|
22187
|
+
scopeOmitDirNames = withAlwaysWorktreeOmitDirNames(state.scopeOmitDirs);
|
|
22184
22188
|
} else if (!scopeOmitDirCliOverride) {
|
|
22185
22189
|
scopeOmitDirNames = DEFAULT_WORKTREE_OMIT_DIR_NAMES;
|
|
22186
22190
|
}
|