|
1 | 1 | /**
|
2 | 2 | * ScriptSync Library
|
3 |
| - * @version 2.0.5 |
| 3 | + * @version 2.0.6 |
4 | 4 | * @description This script performs an update,
|
5 | 5 | * adding new files from the template project
|
6 | 6 | * to the current user script.
|
@@ -36,6 +36,7 @@ ScriptSync.prototype.drop = function(...args) { return drop.apply(this,[...args]
|
36 | 36 | * @memberof {ScriptSync}
|
37 | 37 | * @param {boolean} ignoreErrors **optional**: Whether to perform a forced
|
38 | 38 | * commit operation, even in case of errors.
|
| 39 | + * Default - true. |
39 | 40 | * @returns {boolean} Result of the function execution.
|
40 | 41 | */
|
41 | 42 | function commit(ignoreErrors=true) { return this._commit(...arguments) }
|
@@ -188,3 +189,42 @@ ScriptSync.prototype.deleteFile = function(...args) { return deleteFile.apply(th
|
188 | 189 | function addFileToUserJson(savedFileName, newJson) { return this._addFileToUserJson(...arguments) }
|
189 | 190 | ScriptSync.prototype.addFileToUserJson = function(...args) { return addFileToUserJson.apply(this,[...args]) };
|
190 | 191 |
|
| 192 | + |
| 193 | +/** |
| 194 | + * Retrieves information about a library based on its ID or user-defined name. |
| 195 | + * @memberof {ScriptSync} |
| 196 | + * @param {string} target - The target environment, either '**script**' or '**template**'. |
| 197 | + * This determines whether to fetch information from the |
| 198 | + * script or the template file. |
| 199 | + * @param {string} libraryId - __Optional__: The unique identifier of the library to retrieve. |
| 200 | + * If provided, the function will search for a library with |
| 201 | + * this ID. |
| 202 | + * @param {string} libraryName - __Optional__: The user-defined name (userSymbol) of the library to retrieve. |
| 203 | + * If provided, the function will search for a library with |
| 204 | + * this user-defined name. |
| 205 | + * @returns {LibraryInfo|null} - Returns an object containing information about the library |
| 206 | + * if found, or null if the library is not found. |
| 207 | + */ |
| 208 | +function getLibraryInfo(target, libraryId, libraryName) { return this._getLibraryInfo(...arguments) } |
| 209 | +ScriptSync.prototype.getLibraryInfo = function(...args) { return getLibraryInfo.apply(this,[...args]) }; |
| 210 | + |
| 211 | + |
| 212 | +/** |
| 213 | + * Update library information. |
| 214 | + * @memberof {ScriptSync} |
| 215 | + * @param {LibraryInfo} libraryInfo - A structured JSON object: `{ userSymbol: 'string', |
| 216 | + * libraryId: 'string', version: 'number', |
| 217 | + * developmentMode: boolean }`.\ |
| 218 | + * It will be used to update the library information. |
| 219 | + * @param {string} libraryId - The unique ID of the library.\ |
| 220 | + * __Optional parameter__. If this parameter is provided, |
| 221 | + * it will be used to identify the library in the update process. |
| 222 | + * @param {string} libraryName - User-defined library name (userSymbol).\ |
| 223 | + * __Optional parameter__. If '`libraryId`' is not provided, |
| 224 | + * and this parameter is present, it will be used |
| 225 | + * to identify the library in the update process. |
| 226 | + * @returns {ScriptSync} Returns an instance of ScriptSync for method chaining. |
| 227 | + */ |
| 228 | +function updateLibraryInfo(libraryInfo, libraryId, libraryName) { return this._updateLibraryInfo(...arguments) } |
| 229 | +ScriptSync.prototype.updateLibraryInfo = function(...args) { return updateLibraryInfo.apply(this,[...args]) }; |
| 230 | + |
0 commit comments