@youtyan/code-viewer 0.6.6 → 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 -3
- 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,6 +2147,7 @@ var init_git = __esm(() => {
|
|
|
2142
2147
|
"out",
|
|
2143
2148
|
"target",
|
|
2144
2149
|
".gradle",
|
|
2150
|
+
...ALWAYS_WORKTREE_OMIT_DIR_NAMES,
|
|
2145
2151
|
".pnpm-store",
|
|
2146
2152
|
".turbo",
|
|
2147
2153
|
".parcel-cache",
|
|
@@ -22162,7 +22168,7 @@ Examples:
|
|
|
22162
22168
|
}
|
|
22163
22169
|
warnIfLegacyConfigPresent();
|
|
22164
22170
|
if (scopeOmitDirCliOverride) {
|
|
22165
|
-
scopeOmitDirNames = scopeOmitDirCliOverride;
|
|
22171
|
+
scopeOmitDirNames = withAlwaysWorktreeOmitDirNames(scopeOmitDirCliOverride);
|
|
22166
22172
|
}
|
|
22167
22173
|
scopeWatchLimit = worktreeWatchDirectoryLimitFromEnv();
|
|
22168
22174
|
}
|
|
@@ -22178,7 +22184,7 @@ function applyPersistedSettings(state) {
|
|
|
22178
22184
|
const prevExclude = scopeExcludeNames;
|
|
22179
22185
|
const prevWatchLimit = scopeWatchLimit;
|
|
22180
22186
|
if (!scopeOmitDirCliOverride && Array.isArray(state.scopeOmitDirs) && state.scopeOmitDirs.length > 0) {
|
|
22181
|
-
scopeOmitDirNames = state.scopeOmitDirs;
|
|
22187
|
+
scopeOmitDirNames = withAlwaysWorktreeOmitDirNames(state.scopeOmitDirs);
|
|
22182
22188
|
} else if (!scopeOmitDirCliOverride) {
|
|
22183
22189
|
scopeOmitDirNames = DEFAULT_WORKTREE_OMIT_DIR_NAMES;
|
|
22184
22190
|
}
|