push neon reactor

This commit is contained in:
2026-07-12 15:11:38 +02:00
parent 172e72dbcd
commit aeab5f7820
9597 changed files with 2407488 additions and 0 deletions
@@ -0,0 +1,38 @@
/*!
* Copyright (C) Microsoft Corporation. All rights reserved.
*/
/**
* Global VFS manager to avoid passing VFS instances around throughout the package.
* Initialize once with setVfs() and then use getVfs() throughout the codebase.
*/
let vfsInstance = null;
/**
* Sets the global VFS instance to be used throughout the package.
* Should be called once during initialization (e.g., in addDataSourceAsync).
*/
export function setVfs(vfs) {
vfsInstance = vfs;
}
/**
* Gets the global VFS instance.
* Throws an error if VFS has not been initialized.
*/
export function getVfs() {
if (!vfsInstance) {
throw new Error('VFS has not been initialized. Call setVfs() first.');
}
return vfsInstance;
}
/**
* Checks if VFS has been initialized.
*/
export function isVfsInitialized() {
return vfsInstance !== null;
}
/**
* Clears the VFS instance (useful for testing or cleanup).
*/
export function clearVfs() {
vfsInstance = null;
}
//# sourceMappingURL=VfsManager.js.map