* Saves scripts to either server or local storage based on configuration and user preference * @param {string} appId - The application ID * @param {Array} scripts - Array of scripts to save * @returns {Promise}
(appId, scripts)
| 179 | * @returns {Promise} |
| 180 | */ |
| 181 | async saveScripts(appId, scripts) { |
| 182 | // Check if server storage is enabled and user prefers it |
| 183 | if (this.serverStorage.isServerConfigEnabled() && prefersServerStorage(appId)) { |
| 184 | // Use server storage - no fallback to local |
| 185 | return await this._saveScriptsToServer(appId, scripts); |
| 186 | } |
| 187 | |
| 188 | // Use local storage when server storage is not preferred |
| 189 | return this._saveScriptsToLocal(appId, scripts); |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Migrates scripts from local storage to server storage |
no test coverage detected