new depreciation

This commit is contained in:
zefie
2026-05-03 15:26:38 -04:00
parent 0c5dc17ae6
commit cf9cc22a1c
3 changed files with 12 additions and 3 deletions

View File

@@ -382,7 +382,7 @@ const runScriptInVM = function (script_data, user_contextObj = {}, privileged =
"service_vaults": service_vaults, "service_vaults": service_vaults,
"service_deps": service_deps, "service_deps": service_deps,
"ssid_sessions": ssid_sessions, "ssid_sessions": ssid_sessions,
"moveArrayKey": wtvshared.moveArrayKey, "moveArrayKey": wtvshared.moveArrayKey, // deprecated - use wtvshared.moveArrayKey() instead
"cwd": (filename) ? path.dirname(filename) : __dirname, // current working directory "cwd": (filename) ? path.dirname(filename) : __dirname, // current working directory
// Our prototype overrides // Our prototype overrides

View File

@@ -14,5 +14,13 @@
"message": "getServiceString() is deprecated and will be removed", "message": "getServiceString() is deprecated and will be removed",
"removeVersion": "0.9.80", "removeVersion": "0.9.80",
"replacement": "Use wtvshared.getServiceString() instead" "replacement": "Use wtvshared.getServiceString() instead"
},
{
"id": "moveArrayKey",
"pattern": "(?<!wtvshared\\.)moveArrayKey\\s*\\(",
"flags": "g",
"message": "moveArrayKey() is deprecated and will be removed",
"removeVersion": "0.9.80",
"replacement": "Use wtvshared.moveArrayKey() instead"
} }
] ]

View File

@@ -262,7 +262,7 @@ function main() {
process.exit(0); process.exit(0);
} }
const configuredVaults = getConfiguredVaults(options.configPath, options.baseConfigPath); const configuredVaults = getConfiguredVaults(options.configPath, options.baseConfigPath);
const explicitVaults = options.vaults.map((vault) => ( const explicitVaults = options.vaults.map((vault) => (
path.isAbsolute(vault) ? path.resolve(vault) : path.resolve(process.cwd(), vault) path.isAbsolute(vault) ? path.resolve(vault) : path.resolve(process.cwd(), vault)
)); ));
@@ -307,6 +307,7 @@ function main() {
console.log(JSON.stringify(payload, null, 2)); console.log(JSON.stringify(payload, null, 2));
} else { } else {
console.log('ServiceVault deprecation scan'); console.log('ServiceVault deprecation scan');
console.log('- Deprecation count: ' + deprecationPatterns.length);
console.log(`- Vault roots: ${vaultsToScan.length}`); console.log(`- Vault roots: ${vaultsToScan.length}`);
console.log(`- Missing vault roots: ${missingVaults.length}`); console.log(`- Missing vault roots: ${missingVaults.length}`);
console.log(`- Files scanned: ${filesToScan.length}`); console.log(`- Files scanned: ${filesToScan.length}`);