change to non-complete shallow watching

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2021-04-29 08:48:16 -04:00
1 parent d410596997
commit 2085383987
2 files changed
+2 -4

No files matched your search

+1 -3
View File
@@ -216,10 +216,8 @@ function diffChangedConfig(filePath: string, source: RootSource, port: number):
function watchFileChanges(filePath: string, port: number): [IComputedValue<CatalogEntity[]>, Disposer] {
const watcher = watch(filePath, {
followSymlinks: true,
depth: 0, // shallow
depth: 1, // shallow
disableGlobbing: true,
alwaysStat: false,
ignoreInitial: false,
});
const rootSource = new ExtendedObservableMap<string, ObservableMap<string, RootSourceValue>>(observable.map);
const derivedSource = computed(() => Array.from(iter.flatMap(rootSource.values(), from => iter.map(from.values(), child => child[1]))));
@@ -168,7 +168,7 @@ export class KubeconfigSyncs extends React.Component {
onClick={() => void this.openFileDialog()}
/>
<div className="hint">
Sync an individual file or folder shallowly.
Sync an individual file or folders (and subfolders to a depth of 1).
</div>
{this.renderEntries()}
</section>