From 8163a48eb76871ea178a992b233bd2de1eaf1009 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 16 Jun 2022 18:41:51 -0300 Subject: [PATCH 01/21] [App:pCloud] Importing changes from PR #1392 --- .../pcloud/actions/copy-file/copy-file.mjs | 63 ++++ .../actions/copy-folder/copy-folder.mjs | 49 +++ .../actions/create-folder/create-folder.mjs | 34 ++ .../actions/download-files/download-files.mjs | 33 ++ .../actions/list-contents/list-contents.mjs | 59 +++ .../actions/upload-file/upload-file.mjs | 63 ++++ components/pcloud/package.json | 21 ++ components/pcloud/pcloud.app.mjs | 343 +++++++++++++++++- .../sources/watch-folder/watch-folder.mjs | 140 +++++++ 9 files changed, 800 insertions(+), 5 deletions(-) create mode 100644 components/pcloud/actions/copy-file/copy-file.mjs create mode 100644 components/pcloud/actions/copy-folder/copy-folder.mjs create mode 100644 components/pcloud/actions/create-folder/create-folder.mjs create mode 100644 components/pcloud/actions/download-files/download-files.mjs create mode 100644 components/pcloud/actions/list-contents/list-contents.mjs create mode 100644 components/pcloud/actions/upload-file/upload-file.mjs create mode 100644 components/pcloud/package.json create mode 100644 components/pcloud/sources/watch-folder/watch-folder.mjs diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs new file mode 100644 index 0000000000000..33f13d4e848ea --- /dev/null +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -0,0 +1,63 @@ +import pcloud from "../../pcloud.app.mjs"; + +module.exports = { + key: "pcloud-copy-file", + name: "Copy File", + description: + "Takes one file and copies it as another file in the user's filesystem.", + version: "0.0.1", + type: "action", + props: { + pcloud, + fileId: { + type: "integer", + label: "File ID", + description: "ID of the file to copy.", + async options() { + return await this.pcloud.getFileOptions(); + }, + }, + toFolderId: { + propDefinition: [ + pcloud, + "toFolderId", + ], + }, + name: { + propDefinition: [ + pcloud, + "name", + ], + label: "To Name", + description: "Name of the destination file.", + }, + overwrite: { + propDefinition: [ + pcloud, + "overwrite", + ], + }, + modifiedTime: { + type: "integer", + label: "Modified Time", + description: "Must be a UNIX timestamp.", + optional: true, + }, + createdTime: { + type: "integer", + label: "Created Time", + description: "Must be a UNIX timestamp.", + optional: true, + }, + }, + async run() { + return await this.pcloud._withRetries( + () => this.pcloud.copyFile(this.fileId, + this.toFolderId, + this.name, + !this.overwrite, + this.modifiedTime, + this.createdTime), + ); + }, +}; diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs new file mode 100644 index 0000000000000..3decb403d5f25 --- /dev/null +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -0,0 +1,49 @@ +import pcloud from "../../pcloud.app.mjs"; + +module.exports = { + key: "pcloud-copy-folder", + name: "Copy Folder", + description: "Copies a folder to the specified folder.", + version: "0.0.1", + type: "action", + props: { + pcloud, + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: "ID of the source folder.", + }, + toFolderId: { + propDefinition: [ + pcloud, + "toFolderId", + ], + }, + overwrite: { + type: "boolean", + label: "Overwrite?", + description: + "Overwrite existing file if one exists. Otherwise, will return a `2004` error code.", + default: false, + }, + copyContentOnly: { + type: "boolean", + label: "Copy Content Only?", + description: + "If it is set only the content of source folder will be copied otherwise the folder itself is copied.", + default: false, + }, + }, + async run() { + return await this.pcloud._withRetries( + () => this.pcloud.copyFolder( + this.folderId, + this.toFolderId, + !this.overwrite, + this.copyContentOnly, + ), + ); + }, +}; diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs new file mode 100644 index 0000000000000..70e95be2472c9 --- /dev/null +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -0,0 +1,34 @@ +import pcloud from "../../pcloud.app.mjs"; + +module.exports = { + key: "pcloud-create-folder", + name: "Create Folder", + description: "Creates a folder in the specified folder.", + version: "0.0.1", + type: "action", + props: { + pcloud, + name: { + propDefinition: [ + pcloud, + "name", + ], + }, + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + label: "Parent Folder ID", + description: "ID of the parent folder where the new folder will be created.", + }, + }, + async run() { + return await this.pcloud._withRetries( + () => this.pcloud.createFolder( + this.name, + this.folderId, + ), + ); + }, +}; diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs new file mode 100644 index 0000000000000..f13dc8025874a --- /dev/null +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -0,0 +1,33 @@ +import pcloud from "../../pcloud.app.mjs"; + +module.exports = { + key: "pcloud-download-files", + name: "Download File(s)", + description: + "Download one or more files.", + version: "0.0.1", + type: "action", + props: { + pcloud, + urls: { + type: "string[]", + label: "URLs", + description: "URL(s) of the files to download.", + }, + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: "ID of the folder, in which to download the files.", + }, + }, + async run() { + return await this.pcloud._withRetries( + () => this.pcloud.downloadFiles( + this.urls, + this.folderId, + ), + ); + }, +}; diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs new file mode 100644 index 0000000000000..4fc7ec959ea36 --- /dev/null +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -0,0 +1,59 @@ +import pcloud from "../../pcloud.app.mjs"; + +module.exports = { + key: "pcloud-list-contents", + name: "List Contents.", + description: "Lists the metadata of the specified folder's contents.", + version: "0.0.1", + type: "action", + props: { + pcloud, + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: "ID of the folder to list contents.", + }, + recursive: { + type: "boolean", + label: "Recursive?", + description: + "Return contents of the folder and all subfolders, recursively.", + default: false, + }, + showdeleted: { + propDefinition: [ + pcloud, + "showdeleted", + ], + description: + "If is set, deleted files and folders that can be undeleted will be displayed.", + default: false, + }, + nofiles: { + type: "boolean", + label: "No Files?", + description: + "If is set, only the folder (sub)structure will be returned.", + default: false, + }, + noshares: { + type: "boolean", + label: "Exclude Shares?", + description: "Exclude shared files and folders.", + default: true, + }, + }, + async run() { + return await this.pcloud._withRetries( + () => this.pcloud.listContents( + this.folderId, + this.recursive, + this.showdeleted, + this.nofiles, + this.noshares, + ), + ); + }, +}; diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs new file mode 100644 index 0000000000000..49b1d416047cf --- /dev/null +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -0,0 +1,63 @@ +import pcloud from "../../pcloud.app.mjs"; + +module.exports = { + key: "pcloud-upload-file", + name: "Upload File", + description: + "Uploads a file to the specified folder.", + version: "0.0.1", + type: "action", + props: { + pcloud, + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: + "ID of the folder where the file will be uploaded. If not specified, the root folder will be used.", + }, + name: { + propDefinition: [ + pcloud, + "name", + ], + description: + "Name of the file to upload. Within the associated Pipedream workflow, the file to upload exist under the `/tmp` directory.", + }, + renameIfExists: { + type: "boolean", + label: "Rename if Exists", + description: + "If set, the uploaded file will be renamed, if file with the requested name exists in the folder.", + default: true, + }, + mtime: { + type: "integer", + label: "Modified Time", + description: + "Must be a UNIX timestamp", + optional: true, + }, + ctime: { + type: "integer", + label: "Modified Time", + description: + "Must be a UNIX timestamp.", + optional: true, + }, + }, + async run() { + return await this.pcloud._withRetries( + () => this.pcloud.uploadFile( + this.folderId, + this.name, + this.noPartial, + this.progressHash, + this.renameIfExists, + this.mtime, + this.ctime, + ), + ); + }, +}; diff --git a/components/pcloud/package.json b/components/pcloud/package.json new file mode 100644 index 0000000000000..b4cd649c2609d --- /dev/null +++ b/components/pcloud/package.json @@ -0,0 +1,21 @@ +{ + "name": "@pipedream/pcloud", + "version": "0.3.3", + "description": "Pipedream pCloud Components", + "main": "pcloud.app.mjs", + "keywords": [ + "pipedream", + "pcloud" + ], + "homepage": "https://pipedream.com/apps/pcloud", + "author": "Pipedream (https://pipedream.com/)", + "license": "MIT", + "dependencies": { + "async-retry": "^1.3.1", + "lodash": "^4.17.20", + "pcloud-sdk-js": "^2.0.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 23953b2d2146e..3598a8a698b04 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -1,11 +1,344 @@ -export default { +import get from "lodash/get"; +import retry from "async-retry"; +import pcloudSdk from "pcloud-sdk-js"; + +module.exports = { type: "app", app: "pcloud", - propDefinitions: {}, + propDefinitions: { + folderId: { + type: "integer", + label: "Folder ID", + description: "ID of the folder.", + async options() { + return await this.getFolderOptions(); + }, + default: 0, + }, + toFolderId: { + type: "integer", + label: "To Folder ID", + description: "ID of destination folder.", + async options() { + return await this.getFolderOptions(); + }, + default: 0, + }, + name: { + type: "string", + label: "Name", + description: "Name of the folder to be created.", + optional: true, + }, + overwrite: { + type: "boolean", + label: "Overwrite?", + description: + "If `true` and file(s) with the same name already exist, no overwriting will be performed and error `2004` will be returned.", + default: false, + optional: true, + }, + showdeleted: { + type: "boolean", + label: "Show Deleted?", + description: + "If is set, deleted files that can be undeleted will be displayed.", + default: false, + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + async api() { + global.locationid = 1; + // eslint-disable-next-line no-unused-vars + /* + const locations = { + 1: "api.pcloud.com", + 2: "eapi.pcloud.com", + }; + */ + return await pcloudSdk.createClient( + this.$auth.oauth_access_token, + "oauth", + ); + }, + _isRetriableStatusCode(statusCode) { + [ + 408, + 429, + 500, + ].includes(statusCode); + }, + async _withRetries(apiCall) { + const retryOpts = { + retries: 3, + factor: 2, + }; + return retry(async (bail) => { + try { + return await apiCall(); + } catch (err) { + const statusCode = [ + get(err, [ + "response", + "status", + ]), + ]; + if (!this._isRetriableStatusCode(statusCode)) { + if (err.result) { + bail(` + Error processing pCloud request (result: ${err.result}): + ${JSON.stringify(err.error)} + `); + } else { + bail(` + Unexpected error (status code: ${statusCode}): + ${JSON.stringify(err.message)} + `); + console.warn(`Temporary error: ${err.error}`); + } + } + throw err; + } + }, retryOpts); + }, + /** + * Takes one file and copies it as another file in the user's filesystem. + * pCloud API domain URL depends on the location of pCLoud data center associated to the + * account. + * @params {integer} fileId - ID of the file to copy. + * @params {integer} toFolderId - ID of the destination folder. + * @params {string} toName - Name of the destination file. + * @params {boolean} noOver - If `true` and a file with the specified name already exists, + * no overwriting will be performed. + * @params {string} modifiedTime - Must be a UNIX timestamp. + * seconds. + * @params {string} createdTime - If specified, file created time is set. It's required to + * provide `modifiedTime` to set `createdTime`. Must be in unix time seconds. + * @returns {metadata: array, result: integer } An array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly copied file. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. + */ + async copyFile( + fileId, + toFolderId, + toName, + noOver, + modifiedTime, + createdTime, + ) { + const params = { + fileid: fileId, + tofolderid: toFolderId, + }; + + if (toName) { + params.toname = toName; + } + if (noOver) { + params.noover = 1; + } + if (modifiedTime) { + params.mtime = modifiedTime; + } + if (createdTime) { + params.ctime = createdTime; + } + return await ( + await this.api() + ).api("copyfile", { + params, + }); + }, + /** + * Copies a folder to the specified folder. + * @params {integer} folderId - ID of the folder to copy. + * @params {integer} toFolderId - ID of the destination folder. + * @params {boolean} noOver - If `true` and files with the same name already exist it will + * return a `2004` error code. Othrwise files will be overwritten. + * @params {boolean} copyContentOnly - If set, only the content of source folder will be copied + * otherwise the folder itself is copied. + * @returns {metadata: array, result: integer } An array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly copied folder. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. + */ + async copyFolder(folderId, toFolderId, noOver, copyContentOnly) { + const params = {}; + params.folderid = folderId; + params.tofolderid = toFolderId; + if (noOver) { + params.noover = 1; + } + if (copyContentOnly) { + params.copycontentonly = 1; + } + return await ( + await this.api() + ).api("copyfolder", { + params, + }); + }, + /** + * Creates a folder in the specified folder. + * @params {string} name - Name of the folder to be created. + * @params {integer} folderId - ID of the parent folder where the new folder will be created. + * @returns {metadata: array, result: integer } An array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly created folder. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. + */ + async createFolder(name, folderId) { + return await (await this.api()).createfolder(name, folderId); + }, + /** + * Downloads one or more files from links supplied in the url parameter. + * @params {array} urls - URL(s) of the files to download. + * @params {integer} folderId - ID of the folder, in which to download the files. + * @returns {metadata: array, result: integer } An array with the [metadata] + * (https://docs.pcloud.com/structures/metadata.html) of each of the downloaded files. A + * `result` integer that indicates the results of the API operation, 0 means success, a + * non-zero result means an error occurred, when the result is non-zero an `error` message is + * included. + */ + async downloadFiles(urls, folderId) { + return await (await this.api()).remoteupload(urls.join(" "), folderId); + }, + /** + * Gets the dynamically populated options for file related props. + * @returns {array} An array to use as dynamically populated options in file ID related + * props. + */ + async getFileOptions() { + const folderItems = await this._withRetries(() => + this.listContents( + 0, //0 - ID for the root folder + true, + null, + false, + )); + let options = []; + let name = ""; + let populateOptions = function (name, folderItem) { + if (folderItem.name === "/" || name === "/") { + name = `${name}${folderItem.name}`; + } else { + name = `${name}/${folderItem.name}`; + } + if (!folderItem.isfolder) { + options.push({ + label: name, + value: folderItem.fileid, + }); + } + if (folderItem.isfolder && folderItem.contents.length) { + folderItem.contents.forEach((content) => { + populateOptions(name, content); + }); + } else { + return; + } + }; + populateOptions(name, folderItems); + return options; + }, + /** + * Gets the dynamically populated options for folder related props. + * @returns {array} An array to use as dynamically populated options in folder ID related + * props. + */ + async getFolderOptions() { + const folders = await this._withRetries(() => + this.listContents( + 0, //0 - ID for the root folder + true, + null, + true, + )); + const options = []; + let name = ""; + let populateOptions = function (name, folder) { + if (folder.name === "/" || name === "/") { + name = `${name}${folder.name}`; + } else { + name = `${name}/${folder.name}`; + } + options.push({ + label: name, + value: folder.folderid, + }); + if (folder.contents.length) { + folder.contents.forEach((content) => { + populateOptions(name, content); + }); + } else { + return; + } + }; + populateOptions(name, folders); + return options; + }, + /** + * Lists the metadata of the specified folder's contents. + * pCloud API domain URL depends on the location of pCLoud data center associated to the + * account. + * @params {integer} folderId - ID of the folder to list contents. If not specified, the root + * folder will be used. + * @params {boolean} recursive - If is set full directory tree will be returned, which means + * that all directories will have contents filed. + * @params {boolean} showdeleted - If is set, deleted files and folders that can be undeleted + * will be displayed. + * @params {boolean} nofiles - If is set, only the folder (sub)structure will be returned. + * @params {boolean} noshares - If is set, only user's own folders and files will be displayed. + * @returns {metadata: array, result: integer } An array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of each of the retrieved files and folders, if `recursive` is set, an additional `contents` element will be presented for the contents of inner folders. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. + */ + async listContents(folderId, recursive, showdeleted, nofiles, noshares) { + const optionalParams = {}; + if (recursive) { + optionalParams.recursive = 1; //Need to use an integer for `recursive`, `showdeleted`, `nofiles`, + //and `noshares` if `true` + } + if (showdeleted) { + optionalParams.showdeleted = 1; + } + if (nofiles) { + optionalParams.nofiles = 1; + } + if (noshares) { + optionalParams.noshares = 1; + } + return await (await this.api()).listfolder(folderId, optionalParams); + }, + /** + * Uploads a file to the user's filesystem. + * @params {integer} folderid - ID of the folder where the file will be uploaded. + * @params {string} name - Name of the file to upload. + * @params {boolean} renameIfExists - When `true`, the uploaded file will + * be renamed, if file with + * the requested name exists in the folder. + * @params {integer} mtime - If set, file modified time is set. Must be a unix timestamp. + * @params {integer} ctime - If set, file created time is set. Must be a unix timestamp. It's + * required to provide `mtime` to set `ctime`. + * @returns {checksums: array, fileids: array, metadata: array, result: integer} A `checksums` array, each element with the file checksums calculated with `md5` and `sha1` algorithms, the `id` of the created file under the one element `fileids` array, and an array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly uploaded file. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. + */ + async uploadFile(folderid, name, renameIfExists, mtime, ctime) { + const params = { + folderid, + }; + const files = [ + { + name, + file: `/tmp/${name}`, + }, + ]; + if (renameIfExists) { + params.renameifexists = 1; + } + if (mtime) { + params.mtime = 1; + } + if (ctime) { + params.ctime = 1; + } + return await ( + await this.api() + ).api("uploadfile", { + method: "post", + params, + files, + }); }, }, }; diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs new file mode 100644 index 0000000000000..4a16942a17772 --- /dev/null +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -0,0 +1,140 @@ +import pcloud from "../../pcloud.app.mjs"; +import get from "lodash/get"; + +module.exports = { + key: "pcloud-watch-folder", + name: "Watch Folder", + description: + "Emit new event when a file is created or modified in the specified folder.", + version: "0.0.1", + type: "source", + dedupe: "last", + props: { + pcloud, + db: "$.service.db", + timer: { + label: "Polling schedule", + description: "Pipedream polls pCloud for events on this schedule.", + type: "$.interface.timer", + default: { + intervalSeconds: 60 * 15, // by default, run every 15 minutes. + }, + }, + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: "ID of the folder you'd like to watch for created or modified files.", + }, + event: { + type: "string", + label: "Folder Event", + options: [ + "Created", + "Modified", + ], + description: + "Specify when to emit an event related to a given folder. Note that pCloud preserves files' `created` and `modified` timestamps on upload. If manually uploading via pCloud's `uploadfile` API, these timestamps can be set by specifying the `mtime` and `ctime` parameters, respectively.", + default: "Created", + }, + showdeleted: { + propDefinition: [ + pcloud, + "showdeleted", + ], + }, + }, + hooks: { + async deploy() { + const files = []; + const pCloudContentsData = await this.pcloud._withRetries( + () => this.pcloud.listContents( + this.folderId, + false, + this.showdeleted, + false, + false, + ), + ); + const hasContents = get(pCloudContentsData, [ + "contents", + ]); + if (hasContents) { + for (const folderItem of pCloudContentsData.contents) { + if (!folderItem.isfolder) { + files.push(folderItem); + if (files.length == 10) { + break; + } + } + } + } else { + console.log("No data available, skipping iteration"); + } + files.forEach(this.emitpCloudEvent); + this.db.set("lastPolledTime", +Date.now()); + }, + }, + methods: { + emitpCloudEvent(pCloudEvent) { + const metadata = this.getEventData(pCloudEvent); + this.$emit(pCloudEvent, metadata); + }, + getEventData(pcloudEvent) { + const newOrModified = [ + "Created", + ].includes(this.event) + ? "New created" + : "Modified"; + const eventDate = [ + "Created", + ].includes(this.event) + ? pcloudEvent.created + : pcloudEvent.modified; + const ts = +new Date(eventDate); + return { + id: ts, + summary: `${newOrModified} file "${pcloudEvent.name}"`, + ts, + }; + }, + }, + async run() { + const lastPolledTime = this.db.get("lastPolledTime"); + const files = []; + const pCloudContentsData = await this.pcloud._withRetries( + () => this.pcloud.listContents( + this.folderId, + false, + this.showdeleted, + false, + false, + ), + ); + const hasContents = get(pCloudContentsData, [ + "contents", + ]); + if (hasContents) { + for (const folderItem of pCloudContentsData.contents) { + if (!folderItem.isfolder) { + let fileTime; + if ([ + "Created", + ].includes(this.event)) { + fileTime = +new Date(folderItem.created); + } else { + fileTime = +new Date(folderItem.modified); + } + if (fileTime > lastPolledTime) { + files.push(folderItem); + } + } + } + } else { + console.log("No data available, skipping iteration"); + } + files.forEach(this.emitpCloudEvent); + this.db.set("lastPolledTime", +Date.now()); + }, +}; From 1dec8492d0b67d968933e735ee17b219b6bbf23d Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 16 Jun 2022 20:23:12 -0300 Subject: [PATCH 02/21] [App:pCloud] Description adjustments --- .../pcloud/actions/copy-file/copy-file.mjs | 8 +++++--- .../pcloud/actions/copy-folder/copy-folder.mjs | 2 +- .../actions/create-folder/create-folder.mjs | 2 +- .../actions/list-contents/list-contents.mjs | 12 +++++------- .../pcloud/actions/upload-file/upload-file.mjs | 16 ++++++++-------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 33f13d4e848ea..4b4c3e3d46ffd 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -4,7 +4,7 @@ module.exports = { key: "pcloud-copy-file", name: "Copy File", description: - "Takes one file and copies it as another file in the user's filesystem.", + "Copy a file to the specified destination.", version: "0.0.1", type: "action", props: { @@ -40,13 +40,15 @@ module.exports = { modifiedTime: { type: "integer", label: "Modified Time", - description: "Must be a UNIX timestamp.", + description: "Must be Unix time (seconds).", optional: true, }, createdTime: { type: "integer", label: "Created Time", - description: "Must be a UNIX timestamp.", + description: `Must be Unix time (seconds). + \\ + Requires \`Modified Time\` to be set.`, optional: true, }, }, diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 3decb403d5f25..94151dacc6767 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -3,7 +3,7 @@ import pcloud from "../../pcloud.app.mjs"; module.exports = { key: "pcloud-copy-folder", name: "Copy Folder", - description: "Copies a folder to the specified folder.", + description: "Copy a folder to the specified folder.", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 70e95be2472c9..728ea20d2918d 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -3,7 +3,7 @@ import pcloud from "../../pcloud.app.mjs"; module.exports = { key: "pcloud-create-folder", name: "Create Folder", - description: "Creates a folder in the specified folder.", + description: "Create a folder in the specified folder.", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 4fc7ec959ea36..7d02ce21deb23 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -2,8 +2,8 @@ import pcloud from "../../pcloud.app.mjs"; module.exports = { key: "pcloud-list-contents", - name: "List Contents.", - description: "Lists the metadata of the specified folder's contents.", + name: "List Contents", + description: "Get the contents of the specified folder.", version: "0.0.1", type: "action", props: { @@ -18,8 +18,7 @@ module.exports = { recursive: { type: "boolean", label: "Recursive?", - description: - "Return contents of the folder and all subfolders, recursively.", + description: "If true, returns contents of the folder **and all subfolders,** recursively.", default: false, }, showdeleted: { @@ -27,15 +26,14 @@ module.exports = { pcloud, "showdeleted", ], - description: - "If is set, deleted files and folders that can be undeleted will be displayed.", + description: "If true, deleted files and folders that can be undeleted will be displayed.", default: false, }, nofiles: { type: "boolean", label: "No Files?", description: - "If is set, only the folder (sub)structure will be returned.", + "If true, only the **folder** (sub)structure will be returned.", default: false, }, noshares: { diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 49b1d416047cf..0fe8c29346c3d 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -4,7 +4,7 @@ module.exports = { key: "pcloud-upload-file", name: "Upload File", description: - "Uploads a file to the specified folder.", + "Upload a file to the specified folder.", version: "0.0.1", type: "action", props: { @@ -23,27 +23,27 @@ module.exports = { "name", ], description: - "Name of the file to upload. Within the associated Pipedream workflow, the file to upload exist under the `/tmp` directory.", + "Name of the file to upload. Within the associated Pipedream workflow, the file to upload exists under the `/tmp` directory.", }, renameIfExists: { type: "boolean", label: "Rename if Exists", description: - "If set, the uploaded file will be renamed, if file with the requested name exists in the folder.", + "If true, the uploaded file will be renamed, if another file with the requested name already exists in the specified folder.", default: true, }, mtime: { type: "integer", label: "Modified Time", - description: - "Must be a UNIX timestamp", + description: "Must be Unix time (seconds).", optional: true, }, ctime: { type: "integer", - label: "Modified Time", - description: - "Must be a UNIX timestamp.", + label: "Created Time", + description: `Must be Unix time (seconds). + \\ + Requires \`Modified Time\` to be set.`, optional: true, }, }, From aad601ca37bd9db982a2618b0b05e9344ed314e8 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 16 Jun 2022 22:19:50 -0300 Subject: [PATCH 03/21] [App:pCloud] Syntax adjustments --- components/pcloud/actions/copy-file/copy-file.mjs | 2 +- components/pcloud/actions/copy-folder/copy-folder.mjs | 2 +- components/pcloud/actions/create-folder/create-folder.mjs | 3 ++- components/pcloud/actions/download-files/download-files.mjs | 2 +- components/pcloud/actions/list-contents/list-contents.mjs | 2 +- components/pcloud/actions/upload-file/upload-file.mjs | 2 +- components/pcloud/pcloud.app.mjs | 4 ++-- components/pcloud/sources/watch-folder/watch-folder.mjs | 4 ++-- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 4b4c3e3d46ffd..49a968754fb24 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,6 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; -module.exports = { +export default { key: "pcloud-copy-file", name: "Copy File", description: diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 94151dacc6767..8e5e6d76e9fd7 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,6 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; -module.exports = { +export default { key: "pcloud-copy-folder", name: "Copy Folder", description: "Copy a folder to the specified folder.", diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 728ea20d2918d..873c058d0d37a 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,6 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; -module.exports = { +export default { key: "pcloud-create-folder", name: "Create Folder", description: "Create a folder in the specified folder.", @@ -8,6 +8,7 @@ module.exports = { type: "action", props: { pcloud, + // this should not be optional name: { propDefinition: [ pcloud, diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index f13dc8025874a..a8b4277e38b7c 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,6 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; -module.exports = { +export default { key: "pcloud-download-files", name: "Download File(s)", description: diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 7d02ce21deb23..52b0f08fd67cc 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,6 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; -module.exports = { +export default { key: "pcloud-list-contents", name: "List Contents", description: "Get the contents of the specified folder.", diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 0fe8c29346c3d..b4656774ac2af 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,6 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; -module.exports = { +export default { key: "pcloud-upload-file", name: "Upload File", description: diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 3598a8a698b04..7999f2ac09fc8 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -1,8 +1,8 @@ -import get from "lodash/get"; +import get from "lodash/get.js"; import retry from "async-retry"; import pcloudSdk from "pcloud-sdk-js"; -module.exports = { +export default { type: "app", app: "pcloud", propDefinitions: { diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 4a16942a17772..0d3dfa038b8e1 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -1,7 +1,7 @@ import pcloud from "../../pcloud.app.mjs"; -import get from "lodash/get"; +import get from "lodash/get.js"; -module.exports = { +export default { key: "pcloud-watch-folder", name: "Watch Folder", description: From 31254e66e4826afd33f2e93fe5534d8cd23f9b2b Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 16 Jun 2022 22:57:16 -0300 Subject: [PATCH 04/21] [App:pCloud] Linking doc in description --- components/pcloud/actions/upload-file/upload-file.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index b4656774ac2af..04da3f179fda6 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -23,7 +23,9 @@ export default { "name", ], description: - "Name of the file to upload. Within the associated Pipedream workflow, the file to upload exists under the `/tmp` directory.", + `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. + \\ + [See the docs on how to work with files in your workflow.](https://pipedream.com/docs/code/nodejs/working-with-files/)`, }, renameIfExists: { type: "boolean", From 5ac196bf301334329c9400d0fe64c9fcfcf0aff4 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 21 Jun 2022 03:01:23 -0300 Subject: [PATCH 05/21] [App:pCloud] Creating common action and $summary --- components/pcloud/actions/common/base.mjs | 12 ++++++++++ .../pcloud/actions/copy-file/copy-file.mjs | 22 ++++++++++++------- .../actions/copy-folder/copy-folder.mjs | 12 +++++++--- .../actions/create-folder/create-folder.mjs | 21 ++++++++++-------- .../actions/download-files/download-files.mjs | 21 +++++++++--------- .../actions/list-contents/list-contents.mjs | 12 +++++++--- .../actions/upload-file/upload-file.mjs | 18 +++++++++------ 7 files changed, 78 insertions(+), 40 deletions(-) create mode 100644 components/pcloud/actions/common/base.mjs diff --git a/components/pcloud/actions/common/base.mjs b/components/pcloud/actions/common/base.mjs new file mode 100644 index 0000000000000..4b25a4e768fab --- /dev/null +++ b/components/pcloud/actions/common/base.mjs @@ -0,0 +1,12 @@ +import pcloud from "../../pcloud.app.mjs"; + +export default { + props: { + pcloud, + }, + async run({ $ }) { + const response = await this.pcloud._withRetries(() => this.runRequest()); + $.export("$summary", this.getSummary()); + return response; + }, +}; diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 49a968754fb24..9794e0e5635e8 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,14 +1,15 @@ import pcloud from "../../pcloud.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "pcloud-copy-file", name: "Copy File", - description: - "Copy a file to the specified destination.", + description: "Copy a file to the specified destination.", version: "0.0.1", type: "action", props: { - pcloud, + ...common.props, fileId: { type: "integer", label: "File ID", @@ -52,14 +53,19 @@ export default { optional: true, }, }, - async run() { - return await this.pcloud._withRetries( - () => this.pcloud.copyFile(this.fileId, + async run({ $ }) { + const response = await this.pcloud._withRetries(() => + this.pcloud.copyFile( + this.fileId, this.toFolderId, this.name, !this.overwrite, this.modifiedTime, - this.createdTime), - ); + this.createdTime, + )); + + $.export("$summary", `Copied file "${this.name}" successfully`); + + return response; }, }; diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 8e5e6d76e9fd7..00d5efec3fbd9 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,13 +1,15 @@ import pcloud from "../../pcloud.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "pcloud-copy-folder", name: "Copy Folder", description: "Copy a folder to the specified folder.", version: "0.0.1", type: "action", props: { - pcloud, + ...common.props, folderId: { propDefinition: [ pcloud, @@ -36,8 +38,8 @@ export default { default: false, }, }, - async run() { - return await this.pcloud._withRetries( + async run({ $ }) { + const response = await this.pcloud._withRetries( () => this.pcloud.copyFolder( this.folderId, this.toFolderId, @@ -45,5 +47,9 @@ export default { this.copyContentOnly, ), ); + + $.export("$summary", "Copied folder successfully"); + + return response; }, }; diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 873c058d0d37a..f407bd7c1e45c 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,13 +1,15 @@ import pcloud from "../../pcloud.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "pcloud-create-folder", name: "Create Folder", description: "Create a folder in the specified folder.", version: "0.0.1", type: "action", props: { - pcloud, + ...common.props, // this should not be optional name: { propDefinition: [ @@ -21,15 +23,16 @@ export default { "folderId", ], label: "Parent Folder ID", - description: "ID of the parent folder where the new folder will be created.", + description: + "ID of the parent folder where the new folder will be created.", }, }, - async run() { - return await this.pcloud._withRetries( - () => this.pcloud.createFolder( - this.name, - this.folderId, - ), - ); + async run({ $ }) { + const response = await this.pcloud._withRetries(() => + this.pcloud.createFolder(this.name, this.folderId)); + + $.export("$summary", `Created folder "${this.name}" successfully`); + + return response; }, }; diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index a8b4277e38b7c..8a1a55842ecad 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,14 +1,15 @@ import pcloud from "../../pcloud.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "pcloud-download-files", name: "Download File(s)", - description: - "Download one or more files.", + description: "Download one or more files.", version: "0.0.1", type: "action", props: { - pcloud, + ...common.props, urls: { type: "string[]", label: "URLs", @@ -22,12 +23,12 @@ export default { description: "ID of the folder, in which to download the files.", }, }, - async run() { - return await this.pcloud._withRetries( - () => this.pcloud.downloadFiles( - this.urls, - this.folderId, - ), - ); + async run({ $ }) { + const response = await this.pcloud._withRetries(() => + this.pcloud.downloadFiles(this.urls, this.folderId)); + + $.export("$summary", `Downloaded ${this.urls.length} files successfully`); + + return response; }, }; diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 52b0f08fd67cc..b05e992d1a805 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,13 +1,15 @@ import pcloud from "../../pcloud.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "pcloud-list-contents", name: "List Contents", description: "Get the contents of the specified folder.", version: "0.0.1", type: "action", props: { - pcloud, + ...common.props, folderId: { propDefinition: [ pcloud, @@ -43,8 +45,8 @@ export default { default: true, }, }, - async run() { - return await this.pcloud._withRetries( + async run({ $ }) { + const response = await this.pcloud._withRetries( () => this.pcloud.listContents( this.folderId, this.recursive, @@ -53,5 +55,9 @@ export default { this.noshares, ), ); + + $.export("$summary", "Listed folder contents successfully"); + + return response; }, }; diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 04da3f179fda6..75dc4846eb815 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,14 +1,15 @@ import pcloud from "../../pcloud.app.mjs"; +import common from "../common/base.mjs"; export default { + ...common, key: "pcloud-upload-file", name: "Upload File", - description: - "Upload a file to the specified folder.", + description: "Upload a file to the specified folder.", version: "0.0.1", type: "action", props: { - pcloud, + ...common.props, folderId: { propDefinition: [ pcloud, @@ -22,8 +23,7 @@ export default { pcloud, "name", ], - description: - `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. + description: `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. \\ [See the docs on how to work with files in your workflow.](https://pipedream.com/docs/code/nodejs/working-with-files/)`, }, @@ -49,8 +49,8 @@ export default { optional: true, }, }, - async run() { - return await this.pcloud._withRetries( + async run({ $ }) { + const response = await this.pcloud._withRetries( () => this.pcloud.uploadFile( this.folderId, this.name, @@ -61,5 +61,9 @@ export default { this.ctime, ), ); + + $.export("$summary", `Uploaded file "${this.name}" successfully`); + + return response; }, }; From dfc841bb57c2b678b75d03ba240ac4e75cb86ab6 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 21 Jun 2022 04:26:57 -0300 Subject: [PATCH 06/21] [App;pCloud] Improving prop sharing and naming --- components/pcloud/actions/common/base.mjs | 5 --- components/pcloud/actions/common/props.mjs | 40 +++++++++++++++++++ .../pcloud/actions/copy-file/copy-file.mjs | 32 ++++----------- .../actions/copy-folder/copy-folder.mjs | 25 ++++-------- .../actions/create-folder/create-folder.mjs | 17 +++----- .../actions/download-files/download-files.mjs | 7 +--- .../actions/list-contents/list-contents.mjs | 28 +++++-------- components/pcloud/pcloud.app.mjs | 36 ++++++++++------- .../sources/watch-folder/watch-folder.mjs | 8 ++-- 9 files changed, 97 insertions(+), 101 deletions(-) create mode 100644 components/pcloud/actions/common/props.mjs diff --git a/components/pcloud/actions/common/base.mjs b/components/pcloud/actions/common/base.mjs index 4b25a4e768fab..1a76439542b0f 100644 --- a/components/pcloud/actions/common/base.mjs +++ b/components/pcloud/actions/common/base.mjs @@ -4,9 +4,4 @@ export default { props: { pcloud, }, - async run({ $ }) { - const response = await this.pcloud._withRetries(() => this.runRequest()); - $.export("$summary", this.getSummary()); - return response; - }, }; diff --git a/components/pcloud/actions/common/props.mjs b/components/pcloud/actions/common/props.mjs new file mode 100644 index 0000000000000..db22a6111d4a8 --- /dev/null +++ b/components/pcloud/actions/common/props.mjs @@ -0,0 +1,40 @@ +import pcloud from "../../pcloud.app.mjs"; + +const fileId = { + propDefinition: [ + pcloud, + "fileId", + ], +}; +const folderId = { + propDefinition: [ + pcloud, + "folderId", + ], +}; +const toFolderId = { + propDefinition: [ + pcloud, + "toFolderId", + ], +}; +const name = { + propDefinition: [ + pcloud, + "name", + ], +}; +const overwrite = { + propDefinition: [ + pcloud, + "overwrite", + ], +}; + +export default { + fileId, + folderId, + toFolderId, + name, + overwrite, +}; diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 9794e0e5635e8..9ae68ff9d17fc 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,5 +1,7 @@ -import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; +import { + fileId, toFolderId, name, overwrite, +} from "../common/props.mjs"; export default { ...common, @@ -10,34 +12,14 @@ export default { type: "action", props: { ...common.props, - fileId: { - type: "integer", - label: "File ID", - description: "ID of the file to copy.", - async options() { - return await this.pcloud.getFileOptions(); - }, - }, - toFolderId: { - propDefinition: [ - pcloud, - "toFolderId", - ], - }, + fileId, + toFolderId, name: { - propDefinition: [ - pcloud, - "name", - ], + ...name, label: "To Name", description: "Name of the destination file.", }, - overwrite: { - propDefinition: [ - pcloud, - "overwrite", - ], - }, + overwrite, modifiedTime: { type: "integer", label: "Modified Time", diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 00d5efec3fbd9..e1a95699cdf8b 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,5 +1,7 @@ -import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; +import { + folderId, toFolderId, overwrite, +} from "../common/props.mjs"; export default { ...common, @@ -11,31 +13,18 @@ export default { props: { ...common.props, folderId: { - propDefinition: [ - pcloud, - "folderId", - ], + ...folderId, description: "ID of the source folder.", }, - toFolderId: { - propDefinition: [ - pcloud, - "toFolderId", - ], - }, - overwrite: { - type: "boolean", - label: "Overwrite?", - description: - "Overwrite existing file if one exists. Otherwise, will return a `2004` error code.", - default: false, - }, + toFolderId, + overwrite, copyContentOnly: { type: "boolean", label: "Copy Content Only?", description: "If it is set only the content of source folder will be copied otherwise the folder itself is copied.", default: false, + optional: true, }, }, async run({ $ }) { diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index f407bd7c1e45c..1898f97ae68e5 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,5 +1,7 @@ -import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; +import { + folderId, name, +} from "../common/props.mjs"; export default { ...common, @@ -10,22 +12,13 @@ export default { type: "action", props: { ...common.props, - // this should not be optional - name: { - propDefinition: [ - pcloud, - "name", - ], - }, folderId: { - propDefinition: [ - pcloud, - "folderId", - ], + ...folderId, label: "Parent Folder ID", description: "ID of the parent folder where the new folder will be created.", }, + name, }, async run({ $ }) { const response = await this.pcloud._withRetries(() => diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index 8a1a55842ecad..e9857ae094f57 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,5 +1,5 @@ -import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; +import { folderId } from "../common/props.mjs"; export default { ...common, @@ -16,10 +16,7 @@ export default { description: "URL(s) of the files to download.", }, folderId: { - propDefinition: [ - pcloud, - "folderId", - ], + ...folderId, description: "ID of the folder, in which to download the files.", }, }, diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index b05e992d1a805..5c4a42b423bd3 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,5 +1,7 @@ -import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; +import { + folderId, showDeleted, +} from "../common/props.mjs"; export default { ...common, @@ -11,10 +13,7 @@ export default { props: { ...common.props, folderId: { - propDefinition: [ - pcloud, - "folderId", - ], + ...folderId, description: "ID of the folder to list contents.", }, recursive: { @@ -23,22 +22,15 @@ export default { description: "If true, returns contents of the folder **and all subfolders,** recursively.", default: false, }, - showdeleted: { - propDefinition: [ - pcloud, - "showdeleted", - ], - description: "If true, deleted files and folders that can be undeleted will be displayed.", - default: false, - }, - nofiles: { + showDeleted, + noFiles: { type: "boolean", label: "No Files?", description: "If true, only the **folder** (sub)structure will be returned.", default: false, }, - noshares: { + noShares: { type: "boolean", label: "Exclude Shares?", description: "Exclude shared files and folders.", @@ -50,9 +42,9 @@ export default { () => this.pcloud.listContents( this.folderId, this.recursive, - this.showdeleted, - this.nofiles, - this.noshares, + this.showDeleted, + this.noFiles, + this.noShares, ), ); diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 7999f2ac09fc8..7ce9364924bc8 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -6,6 +6,14 @@ export default { type: "app", app: "pcloud", propDefinitions: { + fileId: { + type: "integer", + label: "File ID", + description: "ID of the file to copy.", + async options() { + return await this.pcloud.getFileOptions(); + }, + }, folderId: { type: "integer", label: "Folder ID", @@ -28,21 +36,21 @@ export default { type: "string", label: "Name", description: "Name of the folder to be created.", - optional: true, }, overwrite: { type: "boolean", label: "Overwrite?", description: - "If `true` and file(s) with the same name already exist, no overwriting will be performed and error `2004` will be returned.", + `If \`true\` and an entry with the same name already exists, it will be overwritten. + \\ + Otherwise, an error \`2004\` will be returned instead.`, default: false, optional: true, }, - showdeleted: { + showDeleted: { type: "boolean", label: "Show Deleted?", - description: - "If is set, deleted files that can be undeleted will be displayed.", + description: "If true, deleted files and folders that can be undeleted will be displayed.", default: false, optional: true, }, @@ -278,25 +286,25 @@ export default { * folder will be used. * @params {boolean} recursive - If is set full directory tree will be returned, which means * that all directories will have contents filed. - * @params {boolean} showdeleted - If is set, deleted files and folders that can be undeleted + * @params {boolean} showDeleted - If is set, deleted files and folders that can be undeleted * will be displayed. - * @params {boolean} nofiles - If is set, only the folder (sub)structure will be returned. - * @params {boolean} noshares - If is set, only user's own folders and files will be displayed. + * @params {boolean} noFiles - If is set, only the folder (sub)structure will be returned. + * @params {boolean} noShares - If is set, only user's own folders and files will be displayed. * @returns {metadata: array, result: integer } An array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of each of the retrieved files and folders, if `recursive` is set, an additional `contents` element will be presented for the contents of inner folders. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. */ - async listContents(folderId, recursive, showdeleted, nofiles, noshares) { + async listContents(folderId, recursive, showDeleted, noFiles, noShares) { const optionalParams = {}; if (recursive) { - optionalParams.recursive = 1; //Need to use an integer for `recursive`, `showdeleted`, `nofiles`, - //and `noshares` if `true` + optionalParams.recursive = 1; //Need to use an integer for `recursive`, `showDeleted`, `noFiles`, + //and `noShares` if `true` } - if (showdeleted) { + if (showDeleted) { optionalParams.showdeleted = 1; } - if (nofiles) { + if (noFiles) { optionalParams.nofiles = 1; } - if (noshares) { + if (noShares) { optionalParams.noshares = 1; } return await (await this.api()).listfolder(folderId, optionalParams); diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 0d3dfa038b8e1..0f4c2c024901b 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -38,10 +38,10 @@ export default { "Specify when to emit an event related to a given folder. Note that pCloud preserves files' `created` and `modified` timestamps on upload. If manually uploading via pCloud's `uploadfile` API, these timestamps can be set by specifying the `mtime` and `ctime` parameters, respectively.", default: "Created", }, - showdeleted: { + showDeleted: { propDefinition: [ pcloud, - "showdeleted", + "showDeleted", ], }, }, @@ -52,7 +52,7 @@ export default { () => this.pcloud.listContents( this.folderId, false, - this.showdeleted, + this.showDeleted, false, false, ), @@ -107,7 +107,7 @@ export default { () => this.pcloud.listContents( this.folderId, false, - this.showdeleted, + this.showDeleted, false, false, ), From bcdc203cdd386890c3e9590c6d8fc741fc747efb Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 21 Jun 2022 04:34:27 -0300 Subject: [PATCH 07/21] [App:pCloud] Further refining descriptions, plus fixes --- .../pcloud/actions/copy-folder/copy-folder.mjs | 2 +- .../pcloud/actions/list-contents/list-contents.mjs | 2 +- .../pcloud/actions/upload-file/upload-file.mjs | 14 +++++--------- components/pcloud/pcloud.app.mjs | 6 +++--- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index e1a95699cdf8b..fe1c907f9a82c 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -22,7 +22,7 @@ export default { type: "boolean", label: "Copy Content Only?", description: - "If it is set only the content of source folder will be copied otherwise the folder itself is copied.", + "If true, only the contents of source folder will be copied, otherwise the folder itself is copied.", default: false, optional: true, }, diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 5c4a42b423bd3..612ec00892c44 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -33,7 +33,7 @@ export default { noShares: { type: "boolean", label: "Exclude Shares?", - description: "Exclude shared files and folders.", + description: "If true, excludes shared files and folders.", default: true, }, }, diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 75dc4846eb815..afcc13145102d 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,5 +1,7 @@ -import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; +import { + folderId, name, +} from "../common/props.mjs"; export default { ...common, @@ -11,18 +13,12 @@ export default { props: { ...common.props, folderId: { - propDefinition: [ - pcloud, - "folderId", - ], + ...folderId, description: "ID of the folder where the file will be uploaded. If not specified, the root folder will be used.", }, name: { - propDefinition: [ - pcloud, - "name", - ], + ...name, description: `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. \\ [See the docs on how to work with files in your workflow.](https://pipedream.com/docs/code/nodejs/working-with-files/)`, diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 7ce9364924bc8..0398e993277f0 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -41,7 +41,7 @@ export default { type: "boolean", label: "Overwrite?", description: - `If \`true\` and an entry with the same name already exists, it will be overwritten. + `If true, and an entry with the same name already exists, it will be overwritten. \\ Otherwise, an error \`2004\` will be returned instead.`, default: false, @@ -335,10 +335,10 @@ export default { params.renameifexists = 1; } if (mtime) { - params.mtime = 1; + params.mtime = mtime; } if (ctime) { - params.ctime = 1; + params.ctime = ctime; } return await ( await this.api() From 2cfc399d72ead142586d3f97460e3d0d4c2436b1 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 21 Jun 2022 22:08:22 -0300 Subject: [PATCH 08/21] [App:pCloud] Prop sharing improvements --- components/pcloud/actions/common/props.mjs | 40 ----------- .../pcloud/actions/copy-file/copy-file.mjs | 22 ++---- .../actions/create-folder/create-folder.mjs | 2 +- .../actions/download-files/download-files.mjs | 9 +-- .../actions/list-contents/list-contents.mjs | 7 +- .../actions/upload-file/upload-file.mjs | 30 ++------ components/pcloud/pcloud.app.mjs | 52 +++++--------- components/pcloud/props.mjs | 70 +++++++++++++++++++ .../sources/watch-folder/watch-folder.mjs | 18 ++--- 9 files changed, 111 insertions(+), 139 deletions(-) delete mode 100644 components/pcloud/actions/common/props.mjs create mode 100644 components/pcloud/props.mjs diff --git a/components/pcloud/actions/common/props.mjs b/components/pcloud/actions/common/props.mjs deleted file mode 100644 index db22a6111d4a8..0000000000000 --- a/components/pcloud/actions/common/props.mjs +++ /dev/null @@ -1,40 +0,0 @@ -import pcloud from "../../pcloud.app.mjs"; - -const fileId = { - propDefinition: [ - pcloud, - "fileId", - ], -}; -const folderId = { - propDefinition: [ - pcloud, - "folderId", - ], -}; -const toFolderId = { - propDefinition: [ - pcloud, - "toFolderId", - ], -}; -const name = { - propDefinition: [ - pcloud, - "name", - ], -}; -const overwrite = { - propDefinition: [ - pcloud, - "overwrite", - ], -}; - -export default { - fileId, - folderId, - toFolderId, - name, - overwrite, -}; diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 9ae68ff9d17fc..2fa9f12073f2b 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,7 +1,7 @@ import common from "../common/base.mjs"; import { - fileId, toFolderId, name, overwrite, -} from "../common/props.mjs"; + fileId, toFolderId, name, overwrite, modifiedTime, createdTime, +} from "../../props.mjs"; export default { ...common, @@ -16,24 +16,12 @@ export default { toFolderId, name: { ...name, - label: "To Name", + label: "New Filename", description: "Name of the destination file.", }, overwrite, - modifiedTime: { - type: "integer", - label: "Modified Time", - description: "Must be Unix time (seconds).", - optional: true, - }, - createdTime: { - type: "integer", - label: "Created Time", - description: `Must be Unix time (seconds). - \\ - Requires \`Modified Time\` to be set.`, - optional: true, - }, + modifiedTime, + createdTime, }, async run({ $ }) { const response = await this.pcloud._withRetries(() => diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 1898f97ae68e5..106c0aa32af2a 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,7 +1,7 @@ import common from "../common/base.mjs"; import { folderId, name, -} from "../common/props.mjs"; +} from "../../props.mjs"; export default { ...common, diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index e9857ae094f57..de05ed16c08be 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,11 +1,11 @@ import common from "../common/base.mjs"; -import { folderId } from "../common/props.mjs"; +import { folderId } from "../../props.mjs"; export default { ...common, key: "pcloud-download-files", name: "Download File(s)", - description: "Download one or more files.", + description: "Download one or more files to a folder.", version: "0.0.1", type: "action", props: { @@ -15,10 +15,7 @@ export default { label: "URLs", description: "URL(s) of the files to download.", }, - folderId: { - ...folderId, - description: "ID of the folder, in which to download the files.", - }, + folderId, }, async run({ $ }) { const response = await this.pcloud._withRetries(() => diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 612ec00892c44..2894f7d6c425f 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,7 +1,7 @@ import common from "../common/base.mjs"; import { folderId, showDeleted, -} from "../common/props.mjs"; +} from "../../props.mjs"; export default { ...common, @@ -12,10 +12,7 @@ export default { type: "action", props: { ...common.props, - folderId: { - ...folderId, - description: "ID of the folder to list contents.", - }, + folderId, recursive: { type: "boolean", label: "Recursive?", diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index afcc13145102d..6befc0a41c960 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,7 +1,7 @@ import common from "../common/base.mjs"; import { - folderId, name, -} from "../common/props.mjs"; + folderId, name, modifiedTime, createdTime, +} from "../../props.mjs"; export default { ...common, @@ -12,11 +12,7 @@ export default { type: "action", props: { ...common.props, - folderId: { - ...folderId, - description: - "ID of the folder where the file will be uploaded. If not specified, the root folder will be used.", - }, + folderId, name: { ...name, description: `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. @@ -30,20 +26,8 @@ export default { "If true, the uploaded file will be renamed, if another file with the requested name already exists in the specified folder.", default: true, }, - mtime: { - type: "integer", - label: "Modified Time", - description: "Must be Unix time (seconds).", - optional: true, - }, - ctime: { - type: "integer", - label: "Created Time", - description: `Must be Unix time (seconds). - \\ - Requires \`Modified Time\` to be set.`, - optional: true, - }, + modifiedTime, + createdTime, }, async run({ $ }) { const response = await this.pcloud._withRetries( @@ -53,8 +37,8 @@ export default { this.noPartial, this.progressHash, this.renameIfExists, - this.mtime, - this.ctime, + this.modifiedTime, + this.createdTime, ), ); diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 0398e993277f0..b690e67f50432 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -9,7 +9,9 @@ export default { fileId: { type: "integer", label: "File ID", - description: "ID of the file to copy.", + description: `Select a **File** from the list. + \\ +Alternatively, you can provide a custom *File ID*.`, async options() { return await this.pcloud.getFileOptions(); }, @@ -17,7 +19,9 @@ export default { folderId: { type: "integer", label: "Folder ID", - description: "ID of the folder.", + description: `Select a **Folder** from the list. + \\ +Alternatively, you can provide a custom *Folder ID*.`, async options() { return await this.getFolderOptions(); }, @@ -25,35 +29,15 @@ export default { }, toFolderId: { type: "integer", - label: "To Folder ID", - description: "ID of destination folder.", + label: "Destination Folder ID", + description: `Select a **Destination Folder** from the list. + \\ +Alternatively, you can provide a custom *Folder ID*.`, async options() { return await this.getFolderOptions(); }, default: 0, }, - name: { - type: "string", - label: "Name", - description: "Name of the folder to be created.", - }, - overwrite: { - type: "boolean", - label: "Overwrite?", - description: - `If true, and an entry with the same name already exists, it will be overwritten. - \\ - Otherwise, an error \`2004\` will be returned instead.`, - default: false, - optional: true, - }, - showDeleted: { - type: "boolean", - label: "Show Deleted?", - description: "If true, deleted files and folders that can be undeleted will be displayed.", - default: false, - optional: true, - }, }, methods: { async api() { @@ -316,12 +300,12 @@ export default { * @params {boolean} renameIfExists - When `true`, the uploaded file will * be renamed, if file with * the requested name exists in the folder. - * @params {integer} mtime - If set, file modified time is set. Must be a unix timestamp. - * @params {integer} ctime - If set, file created time is set. Must be a unix timestamp. It's - * required to provide `mtime` to set `ctime`. + * @params {integer} modifiedTime - If set, file modified time is set. Must be a unix timestamp. + * @params {integer} createdTime - If set, file created time is set. Must be a unix timestamp. + * It's required to provide `modifiedTime` to set `createdTime`. * @returns {checksums: array, fileids: array, metadata: array, result: integer} A `checksums` array, each element with the file checksums calculated with `md5` and `sha1` algorithms, the `id` of the created file under the one element `fileids` array, and an array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly uploaded file. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. */ - async uploadFile(folderid, name, renameIfExists, mtime, ctime) { + async uploadFile(folderid, name, renameIfExists, modifiedTime, createdTime) { const params = { folderid, }; @@ -334,11 +318,11 @@ export default { if (renameIfExists) { params.renameifexists = 1; } - if (mtime) { - params.mtime = mtime; + if (modifiedTime) { + params.mtime = modifiedTime; } - if (ctime) { - params.ctime = ctime; + if (createdTime) { + params.ctime = createdTime; } return await ( await this.api() diff --git a/components/pcloud/props.mjs b/components/pcloud/props.mjs new file mode 100644 index 0000000000000..bf82ed8782489 --- /dev/null +++ b/components/pcloud/props.mjs @@ -0,0 +1,70 @@ +import pcloud from "./pcloud.app.mjs"; + +const fileId = { + propDefinition: [ + pcloud, + "fileId", + ], +}; +const folderId = { + propDefinition: [ + pcloud, + "folderId", + ], +}; +const toFolderId = { + propDefinition: [ + pcloud, + "toFolderId", + ], +}; + +const name = { + type: "string", + label: "Name", + description: "Name of the folder to be created.", +}; + +const overwrite = { + type: "boolean", + label: "Overwrite?", + description: `If true, and an entry with the same name already exists, it will be overwritten. + \\ + Otherwise, an error \`2004\` will be returned instead.`, + default: false, + optional: true, +}; + +const showDeleted = { + type: "boolean", + label: "Show Deleted?", + description: "If true, deleted files and folders that can be undeleted will be displayed.", + default: false, + optional: true, +}; + +const modifiedTime = { + type: "integer", + label: "Modified Time", + description: "Must be Unix time (seconds).", + optional: true, +}; +const createdTime = { + type: "integer", + label: "Created Time", + description: `Must be Unix time (seconds). + \\ + Requires \`Modified Time\` to be set.`, + optional: true, +}; + +export default { + fileId, + folderId, + toFolderId, + name, + overwrite, + showDeleted, + modifiedTime, + createdTime, +}; diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 0f4c2c024901b..416d60fc939aa 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -1,5 +1,8 @@ import pcloud from "../../pcloud.app.mjs"; import get from "lodash/get.js"; +import { + folderId, showDeleted, +} from "../../props.mjs"; export default { key: "pcloud-watch-folder", @@ -20,13 +23,7 @@ export default { intervalSeconds: 60 * 15, // by default, run every 15 minutes. }, }, - folderId: { - propDefinition: [ - pcloud, - "folderId", - ], - description: "ID of the folder you'd like to watch for created or modified files.", - }, + folderId, event: { type: "string", label: "Folder Event", @@ -38,12 +35,7 @@ export default { "Specify when to emit an event related to a given folder. Note that pCloud preserves files' `created` and `modified` timestamps on upload. If manually uploading via pCloud's `uploadfile` API, these timestamps can be set by specifying the `mtime` and `ctime` parameters, respectively.", default: "Created", }, - showDeleted: { - propDefinition: [ - pcloud, - "showDeleted", - ], - }, + showDeleted, }, hooks: { async deploy() { From a2bf74f7d368657ea0a297ccd11b78bf54c5e0b0 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Wed, 22 Jun 2022 04:04:27 -0300 Subject: [PATCH 09/21] [App:pCloud] Customizing shared prop descriptions per component --- .../pcloud/actions/copy-file/copy-file.mjs | 13 +++--- .../actions/copy-folder/copy-folder.mjs | 19 ++++----- .../actions/create-folder/create-folder.mjs | 9 ++--- .../actions/download-files/download-files.mjs | 4 +- .../actions/list-contents/list-contents.mjs | 19 +++++---- .../actions/upload-file/upload-file.mjs | 5 ++- components/pcloud/pcloud.app.mjs | 25 ++++-------- .../pcloud/props-custom-descriptions.mjs | 40 +++++++++++++++++++ components/pcloud/props.mjs | 26 +----------- .../sources/watch-folder/watch-folder.mjs | 7 ++-- 10 files changed, 85 insertions(+), 82 deletions(-) create mode 100644 components/pcloud/props-custom-descriptions.mjs diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 2fa9f12073f2b..7f6c01f46d458 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,22 +1,25 @@ import common from "../common/base.mjs"; import { - fileId, toFolderId, name, overwrite, modifiedTime, createdTime, + name, overwrite, modifiedTime, createdTime, } from "../../props.mjs"; +import { + propFileId, propToFolderId, +} from "../../props-custom-descriptions.mjs"; export default { ...common, key: "pcloud-copy-file", name: "Copy File", description: "Copy a file to the specified destination.", - version: "0.0.1", + version: "0.0.4", type: "action", props: { ...common.props, - fileId, - toFolderId, + fileId: propFileId(" to copy"), + toFolderId: propToFolderId(" to receive the copied file"), name: { ...name, - label: "New Filename", + label: "New File Name", description: "Name of the destination file.", }, overwrite, diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index fe1c907f9a82c..7c0ec562a7e59 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,7 +1,8 @@ import common from "../common/base.mjs"; +import { overwrite } from "../../props.mjs"; import { - folderId, toFolderId, overwrite, -} from "../common/props.mjs"; + propFolderId, propToFolderId, +} from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -12,11 +13,8 @@ export default { type: "action", props: { ...common.props, - folderId: { - ...folderId, - description: "ID of the source folder.", - }, - toFolderId, + folderId: propFolderId(" to copy"), + toFolderId: propToFolderId(" where the folder will be copied to"), overwrite, copyContentOnly: { type: "boolean", @@ -28,14 +26,13 @@ export default { }, }, async run({ $ }) { - const response = await this.pcloud._withRetries( - () => this.pcloud.copyFolder( + const response = await this.pcloud._withRetries(() => + this.pcloud.copyFolder( this.folderId, this.toFolderId, !this.overwrite, this.copyContentOnly, - ), - ); + )); $.export("$summary", "Copied folder successfully"); diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 106c0aa32af2a..9e209279381af 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,7 +1,6 @@ import common from "../common/base.mjs"; -import { - folderId, name, -} from "../../props.mjs"; +import { name } from "../../props.mjs"; +import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -13,10 +12,8 @@ export default { props: { ...common.props, folderId: { - ...folderId, + ...propFolderId(" to create the new folder within"), label: "Parent Folder ID", - description: - "ID of the parent folder where the new folder will be created.", }, name, }, diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index de05ed16c08be..25ccaabd4cb60 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,5 +1,5 @@ import common from "../common/base.mjs"; -import { folderId } from "../../props.mjs"; +import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -15,7 +15,7 @@ export default { label: "URLs", description: "URL(s) of the files to download.", }, - folderId, + folderId: propFolderId(" to receive the downloaded files"), }, async run({ $ }) { const response = await this.pcloud._withRetries(() => diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 2894f7d6c425f..60573d958491f 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,7 +1,6 @@ import common from "../common/base.mjs"; -import { - folderId, showDeleted, -} from "../../props.mjs"; +import { showDeleted } from "../../props.mjs"; +import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -12,11 +11,12 @@ export default { type: "action", props: { ...common.props, - folderId, + folderId: propFolderId(" to get the contents of"), recursive: { type: "boolean", label: "Recursive?", - description: "If true, returns contents of the folder **and all subfolders,** recursively.", + description: + "If true, returns contents of the folder **and all subfolders,** recursively.", default: false, }, showDeleted, @@ -24,7 +24,7 @@ export default { type: "boolean", label: "No Files?", description: - "If true, only the **folder** (sub)structure will be returned.", + "If true, only the **folder** (sub)structure will be returned.", default: false, }, noShares: { @@ -35,15 +35,14 @@ export default { }, }, async run({ $ }) { - const response = await this.pcloud._withRetries( - () => this.pcloud.listContents( + const response = await this.pcloud._withRetries(() => + this.pcloud.listContents( this.folderId, this.recursive, this.showDeleted, this.noFiles, this.noShares, - ), - ); + )); $.export("$summary", "Listed folder contents successfully"); diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 6befc0a41c960..549372110acc9 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,7 +1,8 @@ import common from "../common/base.mjs"; import { - folderId, name, modifiedTime, createdTime, + name, modifiedTime, createdTime, } from "../../props.mjs"; +import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -12,7 +13,7 @@ export default { type: "action", props: { ...common.props, - folderId, + folderId: propFolderId(" to receive the uploaded files"), name: { ...name, description: `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index b690e67f50432..023f57f220a2c 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -9,9 +9,6 @@ export default { fileId: { type: "integer", label: "File ID", - description: `Select a **File** from the list. - \\ -Alternatively, you can provide a custom *File ID*.`, async options() { return await this.pcloud.getFileOptions(); }, @@ -19,25 +16,19 @@ Alternatively, you can provide a custom *File ID*.`, folderId: { type: "integer", label: "Folder ID", - description: `Select a **Folder** from the list. - \\ -Alternatively, you can provide a custom *Folder ID*.`, - async options() { - return await this.getFolderOptions(); - }, - default: 0, - }, - toFolderId: { - type: "integer", - label: "Destination Folder ID", - description: `Select a **Destination Folder** from the list. - \\ -Alternatively, you can provide a custom *Folder ID*.`, async options() { return await this.getFolderOptions(); }, default: 0, }, + // toFolderId: { + // type: "integer", + // label: "Destination Folder ID", + // async options() { + // return await this.getFolderOptions(); + // }, + // default: 0, + // }, }, methods: { async api() { diff --git a/components/pcloud/props-custom-descriptions.mjs b/components/pcloud/props-custom-descriptions.mjs new file mode 100644 index 0000000000000..5d6759aba3ed5 --- /dev/null +++ b/components/pcloud/props-custom-descriptions.mjs @@ -0,0 +1,40 @@ +import pcloud from "./pcloud.app.mjs"; + +function propFileId(description = "") { + return { + propDefinition: [ + pcloud, + "fileId", + ], + description: `Select a **File**${description}. + \\ + Alternatively, you can provide a custom *File ID*.`, + }; +} +function propFolderId(description = "") { + return { + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder**${description}. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }; +} +function propToFolderId(description = "") { + return { + propDefinition: [ + pcloud, + "folderId", + ], + label: "Destination Folder ID", + description: `Select a **Destination Folder**${description}. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }; +} + +export { + propFileId, propFolderId, propToFolderId, +}; diff --git a/components/pcloud/props.mjs b/components/pcloud/props.mjs index bf82ed8782489..690e8c42831b9 100644 --- a/components/pcloud/props.mjs +++ b/components/pcloud/props.mjs @@ -1,24 +1,3 @@ -import pcloud from "./pcloud.app.mjs"; - -const fileId = { - propDefinition: [ - pcloud, - "fileId", - ], -}; -const folderId = { - propDefinition: [ - pcloud, - "folderId", - ], -}; -const toFolderId = { - propDefinition: [ - pcloud, - "toFolderId", - ], -}; - const name = { type: "string", label: "Name", @@ -58,10 +37,7 @@ const createdTime = { optional: true, }; -export default { - fileId, - folderId, - toFolderId, +export { name, overwrite, showDeleted, diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 416d60fc939aa..43986398569a3 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -1,8 +1,7 @@ import pcloud from "../../pcloud.app.mjs"; import get from "lodash/get.js"; -import { - folderId, showDeleted, -} from "../../props.mjs"; +import { showDeleted } from "../../props.mjs"; +import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { key: "pcloud-watch-folder", @@ -23,7 +22,7 @@ export default { intervalSeconds: 60 * 15, // by default, run every 15 minutes. }, }, - folderId, + folderId: propFolderId(" to watch for changes"), event: { type: "string", label: "Folder Event", From 41afdc064a2bcc57cfad4610ab8d263e2fd03d11 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Wed, 22 Jun 2022 20:54:23 -0300 Subject: [PATCH 10/21] [App:pCloud] Creating location validation --- components/pcloud/actions/common/base.mjs | 20 ++++++++++++++++++ .../pcloud/actions/copy-file/copy-file.mjs | 21 ++++++++++--------- .../actions/copy-folder/copy-folder.mjs | 19 +++++++++-------- .../actions/create-folder/create-folder.mjs | 14 ++++++------- .../actions/download-files/download-files.mjs | 14 ++++++------- .../actions/list-contents/list-contents.mjs | 16 +++++++------- .../actions/upload-file/upload-file.mjs | 17 +++++++-------- components/pcloud/pcloud.app.mjs | 4 ++-- 8 files changed, 73 insertions(+), 52 deletions(-) diff --git a/components/pcloud/actions/common/base.mjs b/components/pcloud/actions/common/base.mjs index 1a76439542b0f..d2fa29baf3209 100644 --- a/components/pcloud/actions/common/base.mjs +++ b/components/pcloud/actions/common/base.mjs @@ -4,4 +4,24 @@ export default { props: { pcloud, }, + async run({ $ }) { + const VALID_LOCATIONS = [ + "0", + "1", + ]; + const locationId = this.pcloud.$auth.locationid; + + if (!VALID_LOCATIONS.includes(locationId)) { + throw new Error( + "Unable to retrieve your account's Location ID - try reconnecting your pCloud account to Pipedream.", + ); + } + + const requestMethod = this.requestMethod; + const response = await this.pcloud._withRetries(() => requestMethod()); + + $.export("$summary", this.getSummary()); + + return response; + }, }; diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 7f6c01f46d458..39be262f7d2ac 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -3,7 +3,8 @@ import { name, overwrite, modifiedTime, createdTime, } from "../../props.mjs"; import { - propFileId, propToFolderId, + propFileId, + propToFolderId, } from "../../props-custom-descriptions.mjs"; export default { @@ -11,7 +12,7 @@ export default { key: "pcloud-copy-file", name: "Copy File", description: "Copy a file to the specified destination.", - version: "0.0.4", + version: "0.0.10", type: "action", props: { ...common.props, @@ -26,19 +27,19 @@ export default { modifiedTime, createdTime, }, - async run({ $ }) { - const response = await this.pcloud._withRetries(() => - this.pcloud.copyFile( + methods: { + getSummary() { + return `Copied file "${this.name}" successfully`; + }, + async requestMethod() { + return this.pcloud.copyFile( this.fileId, this.toFolderId, this.name, !this.overwrite, this.modifiedTime, this.createdTime, - )); - - $.export("$summary", `Copied file "${this.name}" successfully`); - - return response; + ); + }, }, }; diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 7c0ec562a7e59..d0c1e435d31e3 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,7 +1,8 @@ import common from "../common/base.mjs"; import { overwrite } from "../../props.mjs"; import { - propFolderId, propToFolderId, + propFolderId, + propToFolderId, } from "../../props-custom-descriptions.mjs"; export default { @@ -25,17 +26,17 @@ export default { optional: true, }, }, - async run({ $ }) { - const response = await this.pcloud._withRetries(() => - this.pcloud.copyFolder( + methods: { + getSummary() { + return "Copied folder successfully"; + }, + async requestMethod() { + return this.pcloud.copyFolder( this.folderId, this.toFolderId, !this.overwrite, this.copyContentOnly, - )); - - $.export("$summary", "Copied folder successfully"); - - return response; + ); + }, }, }; diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 9e209279381af..631de59f57ccb 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -17,12 +17,12 @@ export default { }, name, }, - async run({ $ }) { - const response = await this.pcloud._withRetries(() => - this.pcloud.createFolder(this.name, this.folderId)); - - $.export("$summary", `Created folder "${this.name}" successfully`); - - return response; + methods: { + getSummary() { + return `Created folder "${this.name}" successfully`; + }, + async requestMethod() { + return this.pcloud.createFolder(this.name, this.folderId); + }, }, }; diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index 25ccaabd4cb60..95bbee76f8fa2 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -17,12 +17,12 @@ export default { }, folderId: propFolderId(" to receive the downloaded files"), }, - async run({ $ }) { - const response = await this.pcloud._withRetries(() => - this.pcloud.downloadFiles(this.urls, this.folderId)); - - $.export("$summary", `Downloaded ${this.urls.length} files successfully`); - - return response; + methods: { + getSummary() { + return `Downloaded ${this.urls.length} files successfully`; + }, + async requestMethod() { + return this.pcloud.downloadFiles(this.urls, this.folderId); + }, }, }; diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 60573d958491f..395225154e578 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -34,18 +34,18 @@ export default { default: true, }, }, - async run({ $ }) { - const response = await this.pcloud._withRetries(() => - this.pcloud.listContents( + methods: { + getSummary() { + return "Listed folder contents successfully"; + }, + async requestMethod() { + return this.pcloud.listContents( this.folderId, this.recursive, this.showDeleted, this.noFiles, this.noShares, - )); - - $.export("$summary", "Listed folder contents successfully"); - - return response; + ); + }, }, }; diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 549372110acc9..91c147503a873 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -30,9 +30,12 @@ export default { modifiedTime, createdTime, }, - async run({ $ }) { - const response = await this.pcloud._withRetries( - () => this.pcloud.uploadFile( + methods: { + getSummary() { + return `Uploaded file "${this.name}" successfully`; + }, + async requestMethod() { + return this.pcloud.uploadFile( this.folderId, this.name, this.noPartial, @@ -40,11 +43,7 @@ export default { this.renameIfExists, this.modifiedTime, this.createdTime, - ), - ); - - $.export("$summary", `Uploaded file "${this.name}" successfully`); - - return response; + ); + }, }, }; diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 023f57f220a2c..e0f9e2a8606f9 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -10,7 +10,7 @@ export default { type: "integer", label: "File ID", async options() { - return await this.pcloud.getFileOptions(); + return await this.getFileOptions(); }, }, folderId: { @@ -32,7 +32,7 @@ export default { }, methods: { async api() { - global.locationid = 1; + global.locationid = Number(this.$auth.locationid); // eslint-disable-next-line no-unused-vars /* const locations = { From b20e5875efe177a176010b3194281157502e8687 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Wed, 22 Jun 2022 23:46:17 -0300 Subject: [PATCH 11/21] Initial PR adjustments --- components/pcloud/actions/copy-file/copy-file.mjs | 2 +- .../pcloud/sources/watch-folder/watch-folder.mjs | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 39be262f7d2ac..a41aebcef135e 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -12,7 +12,7 @@ export default { key: "pcloud-copy-file", name: "Copy File", description: "Copy a file to the specified destination.", - version: "0.0.10", + version: "0.0.1", type: "action", props: { ...common.props, diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 43986398569a3..13ebb000689d1 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -73,20 +73,11 @@ export default { this.$emit(pCloudEvent, metadata); }, getEventData(pcloudEvent) { - const newOrModified = [ - "Created", - ].includes(this.event) - ? "New created" - : "Modified"; - const eventDate = [ - "Created", - ].includes(this.event) - ? pcloudEvent.created - : pcloudEvent.modified; + const eventDate = pcloudEvent[this.event.toLowerCase()]; const ts = +new Date(eventDate); return { id: ts, - summary: `${newOrModified} file "${pcloudEvent.name}"`, + summary: `${this.event} file "${pcloudEvent.name}"`, ts, }; }, From 3bb90c9add06044263a8a00935dc616e48b0d3c1 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 23 Jun 2022 18:59:37 -0300 Subject: [PATCH 12/21] [App:pCloud] Creating file validation --- components/pcloud/actions/common/base.mjs | 32 ++++++++++++++----- .../pcloud/actions/copy-file/copy-file.mjs | 1 + .../actions/copy-folder/copy-folder.mjs | 1 + .../actions/create-folder/create-folder.mjs | 1 + .../actions/download-files/download-files.mjs | 1 + .../actions/list-contents/list-contents.mjs | 1 + .../actions/upload-file/upload-file.mjs | 14 +++++++- 7 files changed, 42 insertions(+), 9 deletions(-) diff --git a/components/pcloud/actions/common/base.mjs b/components/pcloud/actions/common/base.mjs index d2fa29baf3209..1c3e510c0f18b 100644 --- a/components/pcloud/actions/common/base.mjs +++ b/components/pcloud/actions/common/base.mjs @@ -4,17 +4,33 @@ export default { props: { pcloud, }, + methods: { + validateLocationId() { + const VALID_LOCATIONS = [ + "0", + "1", + ]; + const locationId = this.pcloud.$auth.locationid; + + if (!VALID_LOCATIONS.includes(locationId)) { + return "Unable to retrieve your account's Location ID - try reconnecting your pCloud account to Pipedream"; + } + + return true; + }, + async validateInputs() { + return true; + }, + }, async run({ $ }) { - const VALID_LOCATIONS = [ - "0", - "1", + const validations = [ + this.validateLocationId(), + await this.validateInputs(), ]; - const locationId = this.pcloud.$auth.locationid; - if (!VALID_LOCATIONS.includes(locationId)) { - throw new Error( - "Unable to retrieve your account's Location ID - try reconnecting your pCloud account to Pipedream.", - ); + const errors = validations.filter((result) => result !== true); + if (errors.length) { + throw new Error(errors.join("; ")); } const requestMethod = this.requestMethod; diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index a41aebcef135e..27c6e363bd602 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -28,6 +28,7 @@ export default { createdTime, }, methods: { + ...common.methods, getSummary() { return `Copied file "${this.name}" successfully`; }, diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index d0c1e435d31e3..ec77b6eee4f68 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -27,6 +27,7 @@ export default { }, }, methods: { + ...common.methods, getSummary() { return "Copied folder successfully"; }, diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 631de59f57ccb..29599d0b90c61 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -18,6 +18,7 @@ export default { name, }, methods: { + ...common.methods, getSummary() { return `Created folder "${this.name}" successfully`; }, diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index 95bbee76f8fa2..44b984ff0228b 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -18,6 +18,7 @@ export default { folderId: propFolderId(" to receive the downloaded files"), }, methods: { + ...common.methods, getSummary() { return `Downloaded ${this.urls.length} files successfully`; }, diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 395225154e578..de4c424e6f192 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -35,6 +35,7 @@ export default { }, }, methods: { + ...common.methods, getSummary() { return "Listed folder contents successfully"; }, diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index 91c147503a873..e49e3c5fe1893 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -3,13 +3,14 @@ import { name, modifiedTime, createdTime, } from "../../props.mjs"; import { propFolderId } from "../../props-custom-descriptions.mjs"; +import { promises as fsPromises } from "fs"; export default { ...common, key: "pcloud-upload-file", name: "Upload File", description: "Upload a file to the specified folder.", - version: "0.0.1", + version: "0.0.9", type: "action", props: { ...common.props, @@ -31,6 +32,17 @@ export default { createdTime, }, methods: { + ...common.methods, + async validateInputs() { + const files = await fsPromises.readdir("/tmp"); + const fileName = this.name; + + if (!files.includes(fileName)) { + return `File "${this.name}" not found in the /tmp directory`; + } + + return true; + }, getSummary() { return `Uploaded file "${this.name}" successfully`; }, From 3427f319180eaa17824962dd580299fecb025a4f Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 23 Jun 2022 19:36:40 -0300 Subject: [PATCH 13/21] [App:pCloud] Watch folder improvements --- .../sources/watch-folder/watch-folder.mjs | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 13ebb000689d1..6363e46721232 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -39,15 +39,7 @@ export default { hooks: { async deploy() { const files = []; - const pCloudContentsData = await this.pcloud._withRetries( - () => this.pcloud.listContents( - this.folderId, - false, - this.showDeleted, - false, - false, - ), - ); + const pCloudContentsData = await this.getContents(); const hasContents = get(pCloudContentsData, [ "contents", ]); @@ -68,6 +60,17 @@ export default { }, }, methods: { + async getContents() { + return this.pcloud._withRetries( + () => this.pcloud.listContents( + this.folderId, + false, + this.showDeleted, + false, + false, + ), + ); + }, emitpCloudEvent(pCloudEvent) { const metadata = this.getEventData(pCloudEvent); this.$emit(pCloudEvent, metadata); @@ -85,29 +88,14 @@ export default { async run() { const lastPolledTime = this.db.get("lastPolledTime"); const files = []; - const pCloudContentsData = await this.pcloud._withRetries( - () => this.pcloud.listContents( - this.folderId, - false, - this.showDeleted, - false, - false, - ), - ); + const pCloudContentsData = await this.getContents(); const hasContents = get(pCloudContentsData, [ "contents", ]); if (hasContents) { for (const folderItem of pCloudContentsData.contents) { if (!folderItem.isfolder) { - let fileTime; - if ([ - "Created", - ].includes(this.event)) { - fileTime = +new Date(folderItem.created); - } else { - fileTime = +new Date(folderItem.modified); - } + let fileTime = +new Date(folderItem[this.event.toLowerCase()]); if (fileTime > lastPolledTime) { files.push(folderItem); } From 87dd3a0b440aa8db16766799c74f5dafd6754d04 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Thu, 23 Jun 2022 20:38:38 -0300 Subject: [PATCH 14/21] [App:pCloud] Description updates --- components/pcloud/actions/list-contents/list-contents.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index de4c424e6f192..a54bb4ea7746f 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -22,7 +22,7 @@ export default { showDeleted, noFiles: { type: "boolean", - label: "No Files?", + label: "Folders Only?", description: "If true, only the **folder** (sub)structure will be returned.", default: false, From 81b7c707aa3a63cc18139618d68b3bc12f790ede Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Fri, 24 Jun 2022 20:33:25 -0300 Subject: [PATCH 15/21] [App:pCloud] Including docs in descriptions --- components/pcloud/actions/copy-file/copy-file.mjs | 2 +- components/pcloud/actions/copy-folder/copy-folder.mjs | 2 +- components/pcloud/actions/create-folder/create-folder.mjs | 2 +- components/pcloud/actions/download-files/download-files.mjs | 2 +- components/pcloud/actions/list-contents/list-contents.mjs | 2 +- components/pcloud/actions/upload-file/upload-file.mjs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 27c6e363bd602..491f8fb656c2c 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -11,7 +11,7 @@ export default { ...common, key: "pcloud-copy-file", name: "Copy File", - description: "Copy a file to the specified destination.", + description: "Copy a file to the specified destination. [See the docs here](https://docs.pcloud.com/methods/file/copyfile.html)", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index ec77b6eee4f68..89a2eac9da864 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -9,7 +9,7 @@ export default { ...common, key: "pcloud-copy-folder", name: "Copy Folder", - description: "Copy a folder to the specified folder.", + description: "Copy a folder to the specified folder. [See the docs here](https://docs.pcloud.com/methods/folder/copyfolder.html)", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 29599d0b90c61..8cdc114e4a119 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -6,7 +6,7 @@ export default { ...common, key: "pcloud-create-folder", name: "Create Folder", - description: "Create a folder in the specified folder.", + description: "Create a folder in the specified folder. [See the docs here](https://docs.pcloud.com/methods/folder/createfolder.html)", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index 44b984ff0228b..0cd6d432b5081 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -5,7 +5,7 @@ export default { ...common, key: "pcloud-download-files", name: "Download File(s)", - description: "Download one or more files to a folder.", + description: "Download one or more files to a folder. [See the docs here](https://docs.pcloud.com/methods/file/downloadfile.html)", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index a54bb4ea7746f..54377d4a097cc 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -6,7 +6,7 @@ export default { ...common, key: "pcloud-list-contents", name: "List Contents", - description: "Get the contents of the specified folder.", + description: "Get the contents of the specified folder. [See the docs here](https://docs.pcloud.com/methods/folder/listfolder.html)", version: "0.0.1", type: "action", props: { diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index e49e3c5fe1893..f278006488078 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -9,8 +9,8 @@ export default { ...common, key: "pcloud-upload-file", name: "Upload File", - description: "Upload a file to the specified folder.", - version: "0.0.9", + description: "Upload a file to the specified folder. [See the docs here](https://docs.pcloud.com/methods/file/uploadfile.html)", + version: "0.0.1", type: "action", props: { ...common.props, From abf810599939bec6f2bfbd7da5c773de45703cee Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Mon, 27 Jun 2022 14:16:38 -0300 Subject: [PATCH 16/21] pnpm-lock.yaml pCloud #938 --- pnpm-lock.yaml | 1413 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 1302 insertions(+), 111 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c92b0934d2ed1..706f338abe6c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -867,6 +867,16 @@ importers: dependencies: '@pipedream/platform': 0.10.0 + components/pcloud: + specifiers: + async-retry: ^1.3.1 + lodash: ^4.17.20 + pcloud-sdk-js: ^2.0.0 + dependencies: + async-retry: 1.3.3 + lodash: 4.17.21 + pcloud-sdk-js: 2.0.0 + components/pipedream: specifiers: axios: ^0.21.1 @@ -1452,7 +1462,6 @@ packages: dependencies: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.10 - dev: true /@apimatic/schema/0.6.0: resolution: {integrity: sha512-JgG32LQRLphHRWsn64vIt7wD2m+JH46swM6ZrY7g1rdiGiKV5m+A+TBrJKoUUQRmS14azMgePNZY30NauWqzLg==} @@ -3100,17 +3109,35 @@ packages: - encoding dev: false + /@babel/cli/7.17.10_@babel+core@7.17.10: + resolution: {integrity: sha512-OygVO1M2J4yPMNOW9pb+I6kFGpQK77HmG44Oz3hg8xQIl5L/2zq+ZohwAdSaqYgVwM0SfmPHZHphH4wR8qzVYw==} + engines: {node: '>=6.9.0'} + hasBin: true + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@jridgewell/trace-mapping': 0.3.10 + commander: 4.1.1 + convert-source-map: 1.8.0 + fs-readdir-recursive: 1.1.0 + glob: 7.2.0 + make-dir: 2.1.0 + slash: 2.0.0 + optionalDependencies: + '@nicolo-ribaudo/chokidar-2': 2.1.8-no-fsevents.3 + chokidar: 3.5.3 + dev: false + /@babel/code-frame/7.16.7: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.17.9 - dev: true /@babel/compat-data/7.17.10: resolution: {integrity: sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==} engines: {node: '>=6.9.0'} - dev: true /@babel/core/7.17.10: resolution: {integrity: sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==} @@ -3133,7 +3160,6 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color - dev: true /@babel/eslint-parser/7.17.0_annt2i75qyqp7sfsklqkwkfeaa: resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} @@ -3156,7 +3182,30 @@ packages: '@babel/types': 7.17.10 '@jridgewell/gen-mapping': 0.1.1 jsesc: 2.5.2 - dev: true + + /@babel/generator/7.18.2: + resolution: {integrity: sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + '@jridgewell/gen-mapping': 0.3.2 + jsesc: 2.5.2 + dev: false + + /@babel/helper-annotate-as-pure/7.16.7: + resolution: {integrity: sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + dev: false + + /@babel/helper-builder-binary-assignment-operator-visitor/7.16.7: + resolution: {integrity: sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-explode-assignable-expression': 7.16.7 + '@babel/types': 7.18.4 + dev: false /@babel/helper-compilation-targets/7.17.10_@babel+core@7.17.10: resolution: {integrity: sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==} @@ -3169,14 +3218,84 @@ packages: '@babel/helper-validator-option': 7.16.7 browserslist: 4.20.3 semver: 6.3.0 - dev: true + + /@babel/helper-compilation-targets/7.18.2_@babel+core@7.17.10: + resolution: {integrity: sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.17.10 + '@babel/core': 7.17.10 + '@babel/helper-validator-option': 7.16.7 + browserslist: 4.20.3 + semver: 6.3.0 + dev: false + + /@babel/helper-create-class-features-plugin/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.17.9 + '@babel/helper-member-expression-to-functions': 7.17.7 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/helper-replace-supers': 7.18.2 + '@babel/helper-split-export-declaration': 7.16.7 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/helper-create-regexp-features-plugin/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-b2aZrV4zvutr9AIa6/gA3wsZKRwTKYoDxYiFKcESS3Ug2GTXzwBEvMuuFLhCQpEnRXs1zng4ISAXSUxxKBIcxw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-annotate-as-pure': 7.16.7 + regexpu-core: 5.0.1 + dev: false + + /@babel/helper-define-polyfill-provider/0.3.1_@babel+core@7.17.10: + resolution: {integrity: sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==} + peerDependencies: + '@babel/core': ^7.4.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-compilation-targets': 7.18.2_@babel+core@7.17.10 + '@babel/helper-module-imports': 7.16.7 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/traverse': 7.17.10 + debug: 4.3.4 + lodash.debounce: 4.0.8 + resolve: 1.22.0 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: false /@babel/helper-environment-visitor/7.16.7: resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.17.10 - dev: true + + /@babel/helper-environment-visitor/7.18.2: + resolution: {integrity: sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==} + engines: {node: '>=6.9.0'} + dev: false + + /@babel/helper-explode-assignable-expression/7.16.7: + resolution: {integrity: sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + dev: false /@babel/helper-function-name/7.17.9: resolution: {integrity: sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==} @@ -3184,21 +3303,25 @@ packages: dependencies: '@babel/template': 7.16.7 '@babel/types': 7.17.10 - dev: true /@babel/helper-hoist-variables/7.16.7: resolution: {integrity: sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.17.10 - dev: true + + /@babel/helper-member-expression-to-functions/7.17.7: + resolution: {integrity: sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + dev: false /@babel/helper-module-imports/7.16.7: resolution: {integrity: sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.17.10 - dev: true /@babel/helper-module-transforms/7.17.7: resolution: {integrity: sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==} @@ -3214,26 +3337,88 @@ packages: '@babel/types': 7.17.10 transitivePeerDependencies: - supports-color - dev: true + + /@babel/helper-module-transforms/7.18.0: + resolution: {integrity: sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.18.2 + '@babel/helper-module-imports': 7.16.7 + '@babel/helper-simple-access': 7.18.2 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/helper-validator-identifier': 7.16.7 + '@babel/template': 7.16.7 + '@babel/traverse': 7.18.5 + '@babel/types': 7.18.4 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/helper-optimise-call-expression/7.16.7: + resolution: {integrity: sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + dev: false /@babel/helper-plugin-utils/7.16.7: resolution: {integrity: sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==} engines: {node: '>=6.9.0'} dev: true + /@babel/helper-plugin-utils/7.17.12: + resolution: {integrity: sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==} + engines: {node: '>=6.9.0'} + + /@babel/helper-remap-async-to-generator/7.16.8: + resolution: {integrity: sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-wrap-function': 7.16.8 + '@babel/types': 7.18.4 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/helper-replace-supers/7.18.2: + resolution: {integrity: sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.18.2 + '@babel/helper-member-expression-to-functions': 7.17.7 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/traverse': 7.18.5 + '@babel/types': 7.18.4 + transitivePeerDependencies: + - supports-color + dev: false + /@babel/helper-simple-access/7.17.7: resolution: {integrity: sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.17.10 - dev: true + + /@babel/helper-simple-access/7.18.2: + resolution: {integrity: sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + dev: false + + /@babel/helper-skip-transparent-expression-wrappers/7.16.0: + resolution: {integrity: sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.4 + dev: false /@babel/helper-split-export-declaration/7.16.7: resolution: {integrity: sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.17.10 - dev: true /@babel/helper-validator-identifier/7.16.7: resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==} @@ -3242,7 +3427,18 @@ packages: /@babel/helper-validator-option/7.16.7: resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==} engines: {node: '>=6.9.0'} - dev: true + + /@babel/helper-wrap-function/7.16.8: + resolution: {integrity: sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-function-name': 7.17.9 + '@babel/template': 7.16.7 + '@babel/traverse': 7.18.5 + '@babel/types': 7.18.4 + transitivePeerDependencies: + - supports-color + dev: false /@babel/helpers/7.17.9: resolution: {integrity: sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==} @@ -3253,7 +3449,6 @@ packages: '@babel/types': 7.17.10 transitivePeerDependencies: - supports-color - dev: true /@babel/highlight/7.17.9: resolution: {integrity: sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==} @@ -3262,7 +3457,6 @@ packages: '@babel/helper-validator-identifier': 7.16.7 chalk: 2.4.2 js-tokens: 4.0.0 - dev: true /@babel/parser/7.17.10: resolution: {integrity: sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==} @@ -3271,124 +3465,836 @@ packages: dependencies: '@babel/types': 7.17.10 - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.17.10: - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + /@babel/parser/7.18.5: + resolution: {integrity: sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.18.4 + dev: false + + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-xCJQXl4EeQ3J9C4yOmpTrtVGmzpm2iSzyxbkZHw7UCnZBftHpF/hpII80uWVyVrc40ytIClHjgWGTG1g/yB+aw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-/vt0hpIw0x4b6BLKUkwlvEoiGZYYLNZ96CzyHYPbtG2jZGz6LBe7/V+drYrc/d+ovrF9NBi0pmtvmNb/FsWtRQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.13.0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-skip-transparent-expression-wrappers': 7.16.0 + '@babel/plugin-proposal-optional-chaining': 7.17.12_@babel+core@7.17.10 + dev: false + + /@babel/plugin-proposal-async-generator-functions/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-RWVvqD1ooLKP6IqWTA5GyFVX2isGEgC5iFxKzfYOIy/QEFdxYyCybBDtIGjipHpb9bDWHzcqGqFakf+mVmBTdQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-remap-async-to-generator': 7.16.8 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.17.10 + transitivePeerDependencies: + - supports-color + dev: false - /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.17.10: - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + /@babel/plugin-proposal-class-properties/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-create-class-features-plugin': 7.18.0_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + transitivePeerDependencies: + - supports-color + dev: false - /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.17.10: - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + /@babel/plugin-proposal-class-static-block/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-t+8LsRMMDE74c6sV7KShIw13sqbqd58tlqNrsWoWBTIMw7SVQ0cZ905wLNS/FBCy/3PyooRHLFFlfrUNyyz5lA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.12.0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-create-class-features-plugin': 7.18.0_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-class-static-block': 7.14.5_@babel+core@7.17.10 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-proposal-dynamic-import/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.10: - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + /@babel/plugin-proposal-export-namespace-from/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-j7Ye5EWdwoXOpRmo5QmRyHPsDIe6+u70ZYZrd7uz+ebPYFKfRcLcNu3Ro0vOlJ5zuv8rU7xa+GttNiRzX56snQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-export-namespace-from': 7.8.3_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.17.10: - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + /@babel/plugin-proposal-json-strings/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-rKJ+rKBoXwLnIn7n6o6fulViHMrOThz99ybH+hKHcOZbnN14VuMnH9fo2eHE69C8pO4uX1Q7t2HYYIDmv8VYkg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.17.10: - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + /@babel/plugin-proposal-logical-assignment-operators/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-EqFo2s1Z5yy+JeJu7SFfbIUtToJTVlC61/C7WLKDntSw4Sz6JNAIfL7zQ74VvirxpjB5kz/kIx0gCcb+5OEo2Q==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.17.10: - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + /@babel/plugin-proposal-nullish-coalescing-operator/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.17.10: - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + /@babel/plugin-proposal-numeric-separator/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.17.10: - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + /@babel/plugin-proposal-object-rest-spread/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-nbTv371eTrFabDfHLElkn9oyf9VG+VKK6WMzhY2o4eHKaG19BToD9947zzGMO6I/Irstx9d8CwX6njPNIAR/yw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: + '@babel/compat-data': 7.17.10 '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-compilation-targets': 7.18.2_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-transform-parameters': 7.17.12_@babel+core@7.17.10 + dev: false - /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.17.10: - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + /@babel/plugin-proposal-optional-catch-binding/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.17.10 + dev: false + + /@babel/plugin-proposal-optional-chaining/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-skip-transparent-expression-wrappers': 7.16.0 + '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.17.10 + dev: false + + /@babel/plugin-proposal-private-methods/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-SllXoxo19HmxhDWm3luPz+cPhtoTSKLJE9PXshsfrOzBqs60QP0r8OaJItrPhAj0d7mZMnNF0Y1UUggCDgMz1A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-create-class-features-plugin': 7.18.0_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-proposal-private-property-in-object/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-/6BtVi57CJfrtDNKfK5b66ydK2J5pXUKBKSPD2G1whamMuEnZWgoOIfO8Vf9F/DoD4izBLD/Au4NMQfruzzykg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-create-class-features-plugin': 7.18.0_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-syntax-private-property-in-object': 7.14.5_@babel+core@7.17.10 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-proposal-unicode-property-regex/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-Wb9qLjXf3ZazqXA7IvI7ozqRIXIGPtSo+L5coFmEkhTQK18ao4UDDD0zdTGAarmbLj2urpRwrc6893cu5Bfh0A==} + engines: {node: '>=4'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-create-regexp-features-plugin': 7.17.12_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.17.10: + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.16.7 + dev: true + + /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.17.10: + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-class-static-block/7.14.5_@babel+core@7.17.10: + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-syntax-dynamic-import/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-syntax-export-namespace-from/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-syntax-import-assertions/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-n/loy2zkq9ZEM8tEOwON9wTQSTNDTDEz6NujPtJGLU7qObzT1N4c4YZZf8E6ATB2AjNQg/Ib2AIpO03EZaCehw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.10: + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.16.7 + dev: true + + /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.17.10: + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.17.10: + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.17.10: + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-private-property-in-object/7.14.5_@babel+core@7.17.10: + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.17.10: + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + + /@babel/plugin-syntax-typescript/7.17.10_@babel+core@7.17.10: + resolution: {integrity: sha512-xJefea1DWXW09pW4Tm9bjwVlPDyYA2it3fWlmEjpYz6alPvTUjL0EOzNzI/FEOyI3r4/J7uVH5UqKgl1TQ5hqQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.16.7 + dev: true + + /@babel/plugin-transform-arrow-functions/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-async-to-generator/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-J8dbrWIOO3orDzir57NRsjg4uxucvhby0L/KZuGsWDj0g7twWK3g7JhJhOrXtuXiw8MeiSdJ3E0OW9H8LYEzLQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-module-imports': 7.16.7 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-remap-async-to-generator': 7.16.8 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-block-scoped-functions/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-block-scoping/7.18.4_@babel+core@7.17.10: + resolution: {integrity: sha512-+Hq10ye+jlvLEogSOtq4mKvtk7qwcUQ1f0Mrueai866C82f844Yom2cttfJdMdqRLTxWpsbfbkIkOIfovyUQXw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-classes/7.18.4_@babel+core@7.17.10: + resolution: {integrity: sha512-e42NSG2mlKWgxKUAD9EJJSkZxR67+wZqzNxLSpc51T8tRU5SLFHsPmgYR5yr7sdgX4u+iHA1C5VafJ6AyImV3A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-environment-visitor': 7.18.2 + '@babel/helper-function-name': 7.17.9 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-replace-supers': 7.18.2 + '@babel/helper-split-export-declaration': 7.16.7 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-computed-properties/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-destructuring/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-Mo69klS79z6KEfrLg/1WkmVnB8javh75HX4pi2btjvlIoasuxilEyjtsQW6XPrubNd7AQy0MMaNIaQE4e7+PQw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-dotall-regex/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-create-regexp-features-plugin': 7.17.12_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-duplicate-keys/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-EA5eYFUG6xeerdabina/xIoB95jJ17mAkR8ivx6ZSu9frKShBjpOGZPn511MTDTkiCO+zXnzNczvUM69YSf3Zw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-exponentiation-operator/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.16.7 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-for-of/7.18.1_@babel+core@7.17.10: + resolution: {integrity: sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-function-name/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-compilation-targets': 7.18.2_@babel+core@7.17.10 + '@babel/helper-function-name': 7.17.9 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-literals/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-member-expression-literals/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-modules-amd/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-h8FjOlYmdZwl7Xm2Ug4iX2j7Qy63NANI+NQVWQzv6r25fqgg7k2dZl03p95kvqNclglHs4FZ+isv4p1uXMA+QA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-module-transforms': 7.18.0 + '@babel/helper-plugin-utils': 7.17.12 + babel-plugin-dynamic-import-node: 2.3.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-modules-commonjs/7.18.2_@babel+core@7.17.10: + resolution: {integrity: sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-module-transforms': 7.18.0 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-simple-access': 7.18.2 + babel-plugin-dynamic-import-node: 2.3.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-modules-systemjs/7.18.5_@babel+core@7.17.10: + resolution: {integrity: sha512-SEewrhPpcqMF1V7DhnEbhVJLrC+nnYfe1E0piZMZXBpxi9WvZqWGwpsk7JYP7wPWeqaBh4gyKlBhHJu3uz5g4Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-hoist-variables': 7.16.7 + '@babel/helper-module-transforms': 7.18.0 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-validator-identifier': 7.16.7 + babel-plugin-dynamic-import-node: 2.3.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-modules-umd/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-d/zZ8I3BWli1tmROLxXLc9A6YXvGK8egMxHp+E/rRwMh1Kip0AP77VwZae3snEJ33iiWwvNv2+UIIhfalqhzZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-module-transforms': 7.18.0 + '@babel/helper-plugin-utils': 7.17.12 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-named-capturing-groups-regex/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-vWoWFM5CKaTeHrdUJ/3SIOTRV+MBVGybOC9mhJkaprGNt5demMymDW24yC74avb915/mIRe3TgNb/d8idvnCRA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-create-regexp-features-plugin': 7.17.12_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-new-target/7.18.5_@babel+core@7.17.10: + resolution: {integrity: sha512-TuRL5uGW4KXU6OsRj+mLp9BM7pO8e7SGNTEokQRRxHFkXYMFiy2jlKSZPFtI/mKORDzciH+hneskcSOp0gU8hg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-object-super/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-replace-supers': 7.18.2 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/plugin-transform-parameters/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-6qW4rWo1cyCdq1FkYri7AHpauchbGLXpdwnYsfxFb+KtddHENfsY5JZb35xUwkK5opOLcJ3BNd2l7PhRYGlwIA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-property-literals/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-regenerator/7.18.0_@babel+core@7.17.10: + resolution: {integrity: sha512-C8YdRw9uzx25HSIzwA7EM7YP0FhCe5wNvJbZzjVNHHPGVcDJ3Aie+qGYYdS1oVQgn+B3eAIJbWFLrJ4Jipv7nw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + regenerator-transform: 0.15.0 + dev: false + + /@babel/plugin-transform-reserved-words/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-1KYqwbJV3Co03NIi14uEHW8P50Md6KqFgt0FfpHdK6oyAHQVTosgPuPSiWud1HX0oYJ1hGRRlk0fP87jFpqXZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-shorthand-properties/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-spread/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-skip-transparent-expression-wrappers': 7.16.0 + dev: false + + /@babel/plugin-transform-sticky-regex/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-template-literals/7.18.2_@babel+core@7.17.10: + resolution: {integrity: sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-typeof-symbol/7.17.12_@babel+core@7.17.10: + resolution: {integrity: sha512-Q8y+Jp7ZdtSPXCThB6zjQ74N3lj0f6TDh1Hnf5B+sYlzQ8i5Pjp8gW0My79iekSpT4WnI06blqP6DT0OmaXXmw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false + + /@babel/plugin-transform-unicode-escapes/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + dev: false - /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.17.10: - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + /@babel/plugin-transform-unicode-regex/7.16.7_@babel+core@7.17.10: + resolution: {integrity: sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-create-regexp-features-plugin': 7.17.12_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + dev: false - /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.17.10: - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + /@babel/preset-env/7.18.2_@babel+core@7.17.10: + resolution: {integrity: sha512-PfpdxotV6afmXMU47S08F9ZKIm2bJIQ0YbAAtDfIENX7G1NUAXigLREh69CWDjtgUy7dYn7bsMzkgdtAlmS68Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: + '@babel/compat-data': 7.17.10 '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-compilation-targets': 7.18.2_@babel+core@7.17.10 + '@babel/helper-plugin-utils': 7.17.12 + '@babel/helper-validator-option': 7.16.7 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-async-generator-functions': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-class-properties': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-class-static-block': 7.18.0_@babel+core@7.17.10 + '@babel/plugin-proposal-dynamic-import': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-proposal-export-namespace-from': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-json-strings': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-logical-assignment-operators': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-nullish-coalescing-operator': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-numeric-separator': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-proposal-object-rest-spread': 7.18.0_@babel+core@7.17.10 + '@babel/plugin-proposal-optional-catch-binding': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-proposal-optional-chaining': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-private-methods': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-private-property-in-object': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-proposal-unicode-property-regex': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.17.10 + '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.17.10 + '@babel/plugin-syntax-class-static-block': 7.14.5_@babel+core@7.17.10 + '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-export-namespace-from': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-import-assertions': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.17.10 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.17.10 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.17.10 + '@babel/plugin-syntax-private-property-in-object': 7.14.5_@babel+core@7.17.10 + '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.17.10 + '@babel/plugin-transform-arrow-functions': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-async-to-generator': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-block-scoped-functions': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-block-scoping': 7.18.4_@babel+core@7.17.10 + '@babel/plugin-transform-classes': 7.18.4_@babel+core@7.17.10 + '@babel/plugin-transform-computed-properties': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-destructuring': 7.18.0_@babel+core@7.17.10 + '@babel/plugin-transform-dotall-regex': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-duplicate-keys': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-exponentiation-operator': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-for-of': 7.18.1_@babel+core@7.17.10 + '@babel/plugin-transform-function-name': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-literals': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-member-expression-literals': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-modules-amd': 7.18.0_@babel+core@7.17.10 + '@babel/plugin-transform-modules-commonjs': 7.18.2_@babel+core@7.17.10 + '@babel/plugin-transform-modules-systemjs': 7.18.5_@babel+core@7.17.10 + '@babel/plugin-transform-modules-umd': 7.18.0_@babel+core@7.17.10 + '@babel/plugin-transform-named-capturing-groups-regex': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-new-target': 7.18.5_@babel+core@7.17.10 + '@babel/plugin-transform-object-super': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-parameters': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-property-literals': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-regenerator': 7.18.0_@babel+core@7.17.10 + '@babel/plugin-transform-reserved-words': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-shorthand-properties': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-spread': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-sticky-regex': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-template-literals': 7.18.2_@babel+core@7.17.10 + '@babel/plugin-transform-typeof-symbol': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-unicode-escapes': 7.16.7_@babel+core@7.17.10 + '@babel/plugin-transform-unicode-regex': 7.16.7_@babel+core@7.17.10 + '@babel/preset-modules': 0.1.5_@babel+core@7.17.10 + '@babel/types': 7.18.4 + babel-plugin-polyfill-corejs2: 0.3.1_@babel+core@7.17.10 + babel-plugin-polyfill-corejs3: 0.5.2_@babel+core@7.17.10 + babel-plugin-polyfill-regenerator: 0.3.1_@babel+core@7.17.10 + core-js-compat: 3.23.3 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: false - /@babel/plugin-syntax-typescript/7.17.10_@babel+core@7.17.10: - resolution: {integrity: sha512-xJefea1DWXW09pW4Tm9bjwVlPDyYA2it3fWlmEjpYz6alPvTUjL0EOzNzI/FEOyI3r4/J7uVH5UqKgl1TQ5hqQ==} - engines: {node: '>=6.9.0'} + /@babel/preset-modules/0.1.5_@babel+core@7.17.10: + resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.17.10 - '@babel/helper-plugin-utils': 7.16.7 - dev: true + '@babel/helper-plugin-utils': 7.17.12 + '@babel/plugin-proposal-unicode-property-regex': 7.17.12_@babel+core@7.17.10 + '@babel/plugin-transform-dotall-regex': 7.16.7_@babel+core@7.17.10 + '@babel/types': 7.18.4 + esutils: 2.0.3 + dev: false /@babel/runtime/7.18.0: resolution: {integrity: sha512-YMQvx/6nKEaucl0MY56mwIG483xk8SDNdlUwb2Ts6FUpr7fm85DxEmsY18LXBNhcTz6tO6JwZV8w1W06v8UKeg==} @@ -3404,7 +4310,6 @@ packages: '@babel/code-frame': 7.16.7 '@babel/parser': 7.17.10 '@babel/types': 7.17.10 - dev: true /@babel/traverse/7.17.10: resolution: {integrity: sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==} @@ -3422,7 +4327,24 @@ packages: globals: 11.12.0 transitivePeerDependencies: - supports-color - dev: true + + /@babel/traverse/7.18.5: + resolution: {integrity: sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.16.7 + '@babel/generator': 7.18.2 + '@babel/helper-environment-visitor': 7.18.2 + '@babel/helper-function-name': 7.17.9 + '@babel/helper-hoist-variables': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/parser': 7.18.5 + '@babel/types': 7.18.4 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: false /@babel/types/7.17.10: resolution: {integrity: sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A==} @@ -3431,6 +4353,14 @@ packages: '@babel/helper-validator-identifier': 7.16.7 to-fast-properties: 2.0.0 + /@babel/types/7.18.4: + resolution: {integrity: sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.16.7 + to-fast-properties: 2.0.0 + dev: false + /@bandwidth/messaging/4.0.3: resolution: {integrity: sha512-ue63rSLSbFdpgYZ/asEoeGRph/UmK2VPbBtCxylydh0x+xritZWX0oplfkCTBXh5TJiXhKJTPrmVvoJsxF6TuA==} engines: {node: '>=10'} @@ -3483,22 +4413,22 @@ packages: - encoding dev: false - /@definitelytyped/header-parser/0.0.116: - resolution: {integrity: sha512-92q+fYoTtpUZg8Fl+PzKrvuYTjpdz3CyKB1+D1ibfGsi+2CRcxNZI3XJtxz2jaqofCVPlGlNExiFi4vfXVXj2g==} + /@definitelytyped/header-parser/0.0.118: + resolution: {integrity: sha512-dlOlN+SFetncKK+ecvpJxdk6j6SsZiTv3yrubpme4XR65UHqyt+iYtGUHpufMoTI6QNw85EpxlmT4OPIZ4Y3Jw==} dependencies: - '@definitelytyped/typescript-versions': 0.0.116 + '@definitelytyped/typescript-versions': 0.0.118 '@types/parsimmon': 1.10.6 parsimmon: 1.18.1 dev: true - /@definitelytyped/typescript-versions/0.0.116: - resolution: {integrity: sha512-QKe3KNYsAW7uvoVpwz5U52gt9u3eXb3LZylrz6vdNjQ/onvYUxn/vZh4OFA3hg8guNRoCSRQ24aT+hJfa5vIAQ==} + /@definitelytyped/typescript-versions/0.0.118: + resolution: {integrity: sha512-XcQNmK1KLLdtEv6BZpjhBzLOo+qMZI1R18r1JmJcaL9RvdlJaOsCIjPAUrf6sEaqHZRdXwJuWm2kFGG9uPrBBA==} dev: true - /@definitelytyped/utils/0.0.116: - resolution: {integrity: sha512-w5UMjBKYo3aIJhi90QXr9ms8xfUImMyotQ/m6AFg9E71RZpcaLsyAfvTCIQ6tVqGexaVBzBqMWxvzz7ITXo1zw==} + /@definitelytyped/utils/0.0.118: + resolution: {integrity: sha512-yk1xILGHje/1+FJ+LcWFJ5DP/NENcKkHBNSeRLLGLB9ZIrP3zN31OeaPXxif0QDRuLs6xkRAGY3yOfKrJNmilw==} dependencies: - '@definitelytyped/typescript-versions': 0.0.116 + '@definitelytyped/typescript-versions': 0.0.118 '@qiwi/npm-registry-client': 8.9.1 '@types/node': 14.18.18 charm: 1.0.2 @@ -4173,28 +5103,32 @@ packages: dependencies: '@jridgewell/set-array': 1.1.1 '@jridgewell/sourcemap-codec': 1.4.13 - dev: true + + /@jridgewell/gen-mapping/0.3.2: + resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.1 + '@jridgewell/sourcemap-codec': 1.4.13 + '@jridgewell/trace-mapping': 0.3.10 + dev: false /@jridgewell/resolve-uri/3.0.7: resolution: {integrity: sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==} engines: {node: '>=6.0.0'} - dev: true /@jridgewell/set-array/1.1.1: resolution: {integrity: sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==} engines: {node: '>=6.0.0'} - dev: true /@jridgewell/sourcemap-codec/1.4.13: resolution: {integrity: sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==} - dev: true /@jridgewell/trace-mapping/0.3.10: resolution: {integrity: sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==} dependencies: '@jridgewell/resolve-uri': 3.0.7 '@jridgewell/sourcemap-codec': 1.4.13 - dev: true /@linear/sdk/1.22.0: resolution: {integrity: sha512-QNWmtar3ZvxWmCdsAwpRU9EWHkxnopb8fsL/6JBvTiFyy4+DWRb9kW9s262njPy/Em07dU3FWSk8gcjQaoZ3kA==} @@ -4278,6 +5212,12 @@ packages: - supports-color dev: false + /@nicolo-ribaudo/chokidar-2/2.1.8-no-fsevents.3: + resolution: {integrity: sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==} + requiresBuild: true + dev: false + optional: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -6587,7 +7527,6 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 - dev: true /ansi-styles/4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -6615,7 +7554,6 @@ packages: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - dev: true /aproba/1.2.0: resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} @@ -6912,6 +7850,12 @@ packages: - supports-color dev: true + /babel-plugin-dynamic-import-node/2.3.3: + resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} + dependencies: + object.assign: 4.1.2 + dev: false + /babel-plugin-istanbul/6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} @@ -6935,6 +7879,42 @@ packages: '@types/babel__traverse': 7.17.1 dev: true + /babel-plugin-polyfill-corejs2/0.3.1_@babel+core@7.17.10: + resolution: {integrity: sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/compat-data': 7.17.10 + '@babel/core': 7.17.10 + '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.17.10 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: false + + /babel-plugin-polyfill-corejs3/0.5.2_@babel+core@7.17.10: + resolution: {integrity: sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.17.10 + core-js-compat: 3.23.3 + transitivePeerDependencies: + - supports-color + dev: false + + /babel-plugin-polyfill-regenerator/0.3.1_@babel+core@7.17.10: + resolution: {integrity: sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.10 + '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.17.10 + transitivePeerDependencies: + - supports-color + dev: false + /babel-preset-current-node-syntax/1.0.1_@babel+core@7.17.10: resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: @@ -7021,6 +8001,12 @@ packages: resolution: {integrity: sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==} dev: false + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: false + optional: true + /binascii/0.0.2: resolution: {integrity: sha512-rA2CrUl1+6yKrn+XgLs8Hdy18OER1UW146nM+ixzhQXDY+Bd3ySkyIJGwF2a4I45JwbvF1mDL/nWkqBwpOcdBA==} dev: false @@ -7110,7 +8096,17 @@ packages: escalade: 3.1.1 node-releases: 2.0.4 picocolors: 1.0.0 - dev: true + + /browserslist/4.21.0: + resolution: {integrity: sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001359 + electron-to-chromium: 1.4.170 + node-releases: 2.0.5 + update-browserslist-db: 1.0.4_browserslist@4.21.0 + dev: false /bs-logger/0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} @@ -7250,7 +8246,10 @@ packages: /caniuse-lite/1.0.30001338: resolution: {integrity: sha512-1gLHWyfVoRDsHieO+CaeYe7jSo/MT7D7lhaXUiwwbuR5BwQxORs0f1tAwUSQr3YbxRXJvxHM/PA5FfPQRnsPeQ==} - dev: true + + /caniuse-lite/1.0.30001359: + resolution: {integrity: sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw==} + dev: false /cardinal/0.4.4: resolution: {integrity: sha512-3MxV0o9wOpQcobrcSrRpaSxlYkohCcZu0ytOjJUww/Yo/223q4Ecloo7odT+M0SI5kPgb1JhvSaF4EEuVXOLAQ==} @@ -7281,7 +8280,6 @@ packages: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 - dev: true /chalk/4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -7305,6 +8303,23 @@ packages: inherits: 2.0.4 dev: true + /chokidar/3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + requiresBuild: true + dependencies: + anymatch: 3.1.2 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: false + optional: true + /chownr/2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -7450,7 +8465,7 @@ packages: color-name: 1.1.4 /color-name/1.1.3: - resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} /color-name/1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -7517,6 +8532,11 @@ packages: /commander/2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + /commander/4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: false + /commander/8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} @@ -7597,12 +8617,18 @@ packages: resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} dependencies: safe-buffer: 5.1.2 - dev: true /cookiejar/2.1.3: resolution: {integrity: sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==} dev: false + /core-js-compat/3.23.3: + resolution: {integrity: sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==} + dependencies: + browserslist: 4.21.0 + semver: 7.0.0 + dev: false + /core-util-is/1.0.2: resolution: {integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=} @@ -7883,6 +8909,14 @@ packages: engines: {node: '>= 12'} dev: false + /deep-assign/3.0.0: + resolution: {integrity: sha512-YX2i9XjJ7h5q/aQ/IM9PEwEnDqETAIYbggmdDB3HLTlSgo1CxPsj6pvhPG68rq6SVE0+p+6Ywsm5fTYNrYtBWw==} + engines: {node: '>=0.10.0'} + deprecated: Check out `lodash.merge` or `merge-options` instead. + dependencies: + is-obj: 1.0.1 + dev: false + /deep-extend/0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -8178,7 +9212,7 @@ packages: peerDependencies: typescript: '*' dependencies: - '@definitelytyped/header-parser': 0.0.116 + '@definitelytyped/header-parser': 0.0.118 command-exists: 1.2.9 rimraf: 3.0.2 semver: 6.3.0 @@ -8194,9 +9228,9 @@ packages: peerDependencies: typescript: '>= 3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev || >= 3.8.0-dev || >= 3.9.0-dev || >= 4.0.0-dev' dependencies: - '@definitelytyped/header-parser': 0.0.116 - '@definitelytyped/typescript-versions': 0.0.116 - '@definitelytyped/utils': 0.0.116 + '@definitelytyped/header-parser': 0.0.118 + '@definitelytyped/typescript-versions': 0.0.118 + '@definitelytyped/utils': 0.0.118 dts-critic: 3.3.11_typescript@4.6.4 fs-extra: 6.0.1 json-stable-stringify: 1.0.1 @@ -8247,7 +9281,10 @@ packages: /electron-to-chromium/1.4.137: resolution: {integrity: sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==} - dev: true + + /electron-to-chromium/1.4.170: + resolution: {integrity: sha512-rZ8PZLhK4ORPjFqLp9aqC4/S1j4qWFsPPz13xmWdrbBkU/LlxMcok+f+6f8YnQ57MiZwKtOaW15biZZsY5Igvw==} + dev: false /elf-cam/0.1.1: resolution: {integrity: sha512-tKSFTWOp5OwJSp6MKyQDX7umYDkvUuI8rxHXw8BuUQ63d9Trj9xLeo6SHyoTGSoZNNZVitFa+RuHHXuoAzN3Rw==} @@ -9125,6 +10162,10 @@ packages: minipass: 3.1.6 dev: true + /fs-readdir-recursive/1.1.0: + resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==} + dev: false + /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -9133,7 +10174,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true - dev: true optional: true /fstream/1.0.12: @@ -9251,7 +10291,6 @@ packages: /gensync/1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} - dev: true /get-amd-module-type/3.0.2: resolution: {integrity: sha512-PcuKwB8ouJnKuAPn6Hk3UtdfKoUV3zXRqVEvj8XGIXqjWfgd1j7QGdXy5Z9OdQfzVt1Sk29HVe/P+X74ccOuqw==} @@ -9375,7 +10414,6 @@ packages: /globals/11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - dev: true /globals/13.14.0: resolution: {integrity: sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==} @@ -9661,7 +10699,6 @@ packages: /has-flag/3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} - dev: true /has-flag/4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -9935,6 +10972,12 @@ packages: side-channel: 1.0.4 dev: false + /invariant/2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + dependencies: + loose-envify: 1.4.0 + dev: false + /io-ts/2.2.16_fp-ts@2.12.1: resolution: {integrity: sha512-y5TTSa6VP6le0hhmIyN0dqEXkrZeJLeC5KApJq6VLci3UEKF80lZ+KuoUs02RhBxNWlrqSNxzfI7otLX1Euv8Q==} peerDependencies: @@ -9961,6 +11004,14 @@ packages: has-bigints: 1.0.2 dev: false + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: false + optional: true + /is-boolean-object/1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} @@ -10045,6 +11096,11 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + /is-obj/1.0.1: + resolution: {integrity: sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==} + engines: {node: '>=0.10.0'} + dev: false + /is-obj/2.0.0: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} @@ -10772,7 +11828,6 @@ packages: /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true /js-yaml/3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} @@ -10834,11 +11889,15 @@ packages: - utf-8-validate dev: true + /jsesc/0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + dev: false + /jsesc/2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true - dev: true /json-2-csv/3.17.1: resolution: {integrity: sha512-i6QynVy42GGMgY8fYde0mp6nYteptvk8oJsphOLiT3CITzw7NBBAiRwHV35kDOBii/elDQe1HCWLqaBPJ3istQ==} @@ -10893,7 +11952,6 @@ packages: resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} engines: {node: '>=6'} hasBin: true - dev: true /jsonc-eslint-parser/1.4.1: resolution: {integrity: sha512-hXBrvsR1rdjmB2kQmUjf1rEIa+TqHBGMge8pwi++C+Si1ad7EjZrJcpgwym+QGK/pqTx+K7keFAtLlVNdLRJOg==} @@ -11210,6 +12268,10 @@ packages: resolution: {integrity: sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=} dev: false + /lodash.debounce/4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + dev: false + /lodash.defaults/4.2.0: resolution: {integrity: sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=} dev: false @@ -11350,6 +12412,13 @@ packages: resolution: {integrity: sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg==} dev: true + /loose-envify/1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + dev: false + /lower-case/2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: @@ -11425,6 +12494,14 @@ packages: uue: 3.1.2 dev: false + /make-dir/2.1.0: + resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} + engines: {node: '>=6'} + dependencies: + pify: 4.0.1 + semver: 5.7.1 + dev: false + /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -12111,7 +13188,10 @@ packages: /node-releases/2.0.4: resolution: {integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==} - dev: true + + /node-releases/2.0.5: + resolution: {integrity: sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==} + dev: false /node-source-walk/4.3.0: resolution: {integrity: sha512-8Q1hXew6ETzqKRAs3jjLioSxNfT1cx74ooiF8RlAONwVMcfq+UdzLC2eB5qcPldUxaE5w3ytLkrmV1TGddhZTA==} @@ -12562,6 +13642,23 @@ packages: through: 2.3.8 dev: true + /pcloud-sdk-js/2.0.0: + resolution: {integrity: sha512-T5m5YQT/X3bkDyvaylwPtHCMntJu/ZKdIlfKqu2fhnaFHwWLEx1G08N85EQGZV8wnpciqbnuhsxIVXDJyd5bTA==} + engines: {node: '>= 4.0.0'} + dependencies: + '@babel/cli': 7.17.10_@babel+core@7.17.10 + '@babel/core': 7.17.10 + '@babel/preset-env': 7.18.2_@babel+core@7.17.10 + '@babel/runtime': 7.18.0 + deep-assign: 3.0.0 + form-data: 3.0.1 + invariant: 2.2.4 + superagent: 5.3.1 + yarn: 1.22.19 + transitivePeerDependencies: + - supports-color + dev: false + /performance-now/2.1.0: resolution: {integrity: sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=} @@ -12632,7 +13729,6 @@ packages: /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true /picomatch/2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -12647,7 +13743,6 @@ packages: /pify/4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - dev: true /pipedrive/13.3.4: resolution: {integrity: sha512-4/o4wNFBd4rlN4oKlUfYc4NDuWhNwFUT0F/oPdRUh5xev7EoiMj0NgjEansiqyC3OvvGUjij7DQu09+MQBvjmA==} @@ -13276,6 +14371,14 @@ packages: string_decoder: 1.3.0 util-deprecate: 1.0.2 + /readdirp/3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: false + optional: true + /redent/3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -13303,10 +14406,27 @@ packages: engines: {node: '>=6'} dev: true + /regenerate-unicode-properties/10.0.1: + resolution: {integrity: sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==} + engines: {node: '>=4'} + dependencies: + regenerate: 1.4.2 + dev: false + + /regenerate/1.4.2: + resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} + dev: false + /regenerator-runtime/0.13.9: resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} dev: false + /regenerator-transform/0.15.0: + resolution: {integrity: sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==} + dependencies: + '@babel/runtime': 7.18.0 + dev: false + /regexp-tree/0.1.24: resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} hasBin: true @@ -13326,6 +14446,29 @@ packages: engines: {node: '>=8'} dev: true + /regexpu-core/5.0.1: + resolution: {integrity: sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==} + engines: {node: '>=4'} + dependencies: + regenerate: 1.4.2 + regenerate-unicode-properties: 10.0.1 + regjsgen: 0.6.0 + regjsparser: 0.8.4 + unicode-match-property-ecmascript: 2.0.0 + unicode-match-property-value-ecmascript: 2.0.0 + dev: false + + /regjsgen/0.6.0: + resolution: {integrity: sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==} + dev: false + + /regjsparser/0.8.4: + resolution: {integrity: sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: false + /remark-lint-blockquote-indentation/3.1.1: resolution: {integrity: sha512-u9cjedM6zcK8vRicis5n/xeOSDIC3FGBCKc3K9pqw+nNrOjY85FwxDQKZZ/kx7rmkdRZEhgyHak+wzPBllcxBQ==} dependencies: @@ -13656,7 +14799,6 @@ packages: is-core-module: 2.9.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true /resolve/2.0.0-next.3: resolution: {integrity: sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==} @@ -13857,6 +14999,11 @@ packages: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + /semver/7.0.0: + resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==} + hasBin: true + dev: false + /semver/7.3.7: resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} engines: {node: '>=10'} @@ -13948,6 +15095,11 @@ packages: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true + /slash/2.0.0: + resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==} + engines: {node: '>=6'} + dev: false + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -14575,7 +15727,6 @@ packages: engines: {node: '>=4'} dependencies: has-flag: 3.0.0 - dev: true /supports-color/7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -14606,7 +15757,6 @@ packages: /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - dev: true /svg-tags/1.0.0: resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=} @@ -14780,7 +15930,7 @@ packages: dev: true /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} /to-regex-range/5.0.1: @@ -15135,6 +16285,29 @@ packages: resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==} dev: false + /unicode-canonical-property-names-ecmascript/2.0.0: + resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} + engines: {node: '>=4'} + dev: false + + /unicode-match-property-ecmascript/2.0.0: + resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} + engines: {node: '>=4'} + dependencies: + unicode-canonical-property-names-ecmascript: 2.0.0 + unicode-property-aliases-ecmascript: 2.0.0 + dev: false + + /unicode-match-property-value-ecmascript/2.0.0: + resolution: {integrity: sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==} + engines: {node: '>=4'} + dev: false + + /unicode-property-aliases-ecmascript/2.0.0: + resolution: {integrity: sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==} + engines: {node: '>=4'} + dev: false + /unified-lint-rule/2.1.1: resolution: {integrity: sha512-vsLHyLZFstqtGse2gvrGwasOmH8M2y+r2kQMoDSWzSqUkQx2MjHjvZuGSv5FUaiv4RQO1bHRajy7lSGp7XWq5A==} dependencies: @@ -15269,6 +16442,17 @@ packages: engines: {node: '>= 0.8'} dev: false + /update-browserslist-db/1.0.4_browserslist@4.21.0: + resolution: {integrity: sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.0 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: false + /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -15304,7 +16488,7 @@ packages: dev: false /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} /uue/3.1.2: resolution: {integrity: sha512-axKLXVqwtdI/czrjG0X8hyV1KLgeWx8F4KvSbvVCnS+RUvsQMGRjx0kfuZDXXqj0LYvVJmx3B9kWlKtEdRrJLg==} @@ -15832,6 +17016,13 @@ packages: y18n: 5.0.8 yargs-parser: 20.2.9 + /yarn/1.22.19: + resolution: {integrity: sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ==} + engines: {node: '>=4.0.0'} + hasBin: true + requiresBuild: true + dev: false + /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} From 045ab5b7773fadc7e02877e38b227d8fa913c3be Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 28 Jun 2022 20:40:00 -0300 Subject: [PATCH 17/21] [App:pCloud] Code review requested adjustments #1 --- .../pcloud/actions/copy-file/copy-file.mjs | 26 ++++++++++++++----- .../actions/copy-folder/copy-folder.mjs | 17 ++++++++---- components/pcloud/pcloud.app.mjs | 14 +++------- .../pcloud/props-custom-descriptions.mjs | 25 +----------------- 4 files changed, 36 insertions(+), 46 deletions(-) diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index 491f8fb656c2c..b513036faf355 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,11 +1,8 @@ +import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; import { name, overwrite, modifiedTime, createdTime, } from "../../props.mjs"; -import { - propFileId, - propToFolderId, -} from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -16,8 +13,25 @@ export default { type: "action", props: { ...common.props, - fileId: propFileId(" to copy"), - toFolderId: propToFolderId(" to receive the copied file"), + fileId: { + propDefinition: [ + pcloud, + "fileId", + ], + description: `Select a **File** to copy. + \\ + Alternatively, you can provide a custom *File ID*.`, + }, + toFolderId: { + propDefinition: [ + pcloud, + "folderId", + ], + label: "Destination Folder ID", + description: `Select a **Destination Folder** to receive the copied file. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, name: { ...name, label: "New File Name", diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 89a2eac9da864..6bf2059e504cb 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,9 +1,7 @@ +import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; import { overwrite } from "../../props.mjs"; -import { - propFolderId, - propToFolderId, -} from "../../props-custom-descriptions.mjs"; +import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -15,7 +13,16 @@ export default { props: { ...common.props, folderId: propFolderId(" to copy"), - toFolderId: propToFolderId(" where the folder will be copied to"), + toFolderId: { + propDefinition: [ + pcloud, + "folderId", + ], + label: "Destination Folder ID", + description: `Select a **Destination Folder** where the folder will be copied to. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, overwrite, copyContentOnly: { type: "boolean", diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index e0f9e2a8606f9..24ebcb96415bb 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -10,25 +10,17 @@ export default { type: "integer", label: "File ID", async options() { - return await this.getFileOptions(); + return this.getFileOptions(); }, }, folderId: { type: "integer", label: "Folder ID", async options() { - return await this.getFolderOptions(); + return this.getFolderOptions(); }, default: 0, }, - // toFolderId: { - // type: "integer", - // label: "Destination Folder ID", - // async options() { - // return await this.getFolderOptions(); - // }, - // default: 0, - // }, }, methods: { async api() { @@ -46,7 +38,7 @@ export default { ); }, _isRetriableStatusCode(statusCode) { - [ + return [ 408, 429, 500, diff --git a/components/pcloud/props-custom-descriptions.mjs b/components/pcloud/props-custom-descriptions.mjs index 5d6759aba3ed5..6423fc5b40835 100644 --- a/components/pcloud/props-custom-descriptions.mjs +++ b/components/pcloud/props-custom-descriptions.mjs @@ -1,16 +1,5 @@ import pcloud from "./pcloud.app.mjs"; -function propFileId(description = "") { - return { - propDefinition: [ - pcloud, - "fileId", - ], - description: `Select a **File**${description}. - \\ - Alternatively, you can provide a custom *File ID*.`, - }; -} function propFolderId(description = "") { return { propDefinition: [ @@ -22,19 +11,7 @@ function propFolderId(description = "") { Alternatively, you can provide a custom *Folder ID*.`, }; } -function propToFolderId(description = "") { - return { - propDefinition: [ - pcloud, - "folderId", - ], - label: "Destination Folder ID", - description: `Select a **Destination Folder**${description}. - \\ - Alternatively, you can provide a custom *Folder ID*.`, - }; -} export { - propFileId, propFolderId, propToFolderId, + propFolderId, }; From 22a58326e25a6f2f24d26e71d219da1c8843426f Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 28 Jun 2022 22:57:41 -0300 Subject: [PATCH 18/21] [App:pCloud] Adjusting custom description props --- .../pcloud/actions/copy-folder/copy-folder.mjs | 11 +++++++++-- .../actions/create-folder/create-folder.mjs | 13 ++++++++++--- .../actions/download-files/download-files.mjs | 12 ++++++++++-- .../actions/list-contents/list-contents.mjs | 12 ++++++++++-- .../pcloud/actions/upload-file/upload-file.mjs | 12 ++++++++++-- components/pcloud/props-custom-descriptions.mjs | 17 ----------------- .../sources/watch-folder/watch-folder.mjs | 11 +++++++++-- 7 files changed, 58 insertions(+), 30 deletions(-) delete mode 100644 components/pcloud/props-custom-descriptions.mjs diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 6bf2059e504cb..d288c81e6d8cd 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,7 +1,6 @@ import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; import { overwrite } from "../../props.mjs"; -import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -12,7 +11,15 @@ export default { type: "action", props: { ...common.props, - folderId: propFolderId(" to copy"), + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder** to copy. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, toFolderId: { propDefinition: [ pcloud, diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 8cdc114e4a119..1400f9f59ee10 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,18 +1,25 @@ +import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; import { name } from "../../props.mjs"; -import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, key: "pcloud-create-folder", name: "Create Folder", - description: "Create a folder in the specified folder. [See the docs here](https://docs.pcloud.com/methods/folder/createfolder.html)", + description: + "Create a folder in the specified folder. [See the docs here](https://docs.pcloud.com/methods/folder/createfolder.html)", version: "0.0.1", type: "action", props: { ...common.props, folderId: { - ...propFolderId(" to create the new folder within"), + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder** to create the new folder within. + \\ + Alternatively, you can provide a custom *Folder ID*.`, label: "Parent Folder ID", }, name, diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index 0cd6d432b5081..d793c9a5a5b95 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,5 +1,5 @@ +import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; -import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -15,7 +15,15 @@ export default { label: "URLs", description: "URL(s) of the files to download.", }, - folderId: propFolderId(" to receive the downloaded files"), + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder** to receive the downloaded files. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, }, methods: { ...common.methods, diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 54377d4a097cc..9cb09a05ffe19 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,6 +1,6 @@ +import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; import { showDeleted } from "../../props.mjs"; -import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { ...common, @@ -11,7 +11,15 @@ export default { type: "action", props: { ...common.props, - folderId: propFolderId(" to get the contents of"), + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder** to get the contents of. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, recursive: { type: "boolean", label: "Recursive?", diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index f278006488078..f29de92c94a39 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,8 +1,8 @@ +import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; import { name, modifiedTime, createdTime, } from "../../props.mjs"; -import { propFolderId } from "../../props-custom-descriptions.mjs"; import { promises as fsPromises } from "fs"; export default { @@ -14,7 +14,15 @@ export default { type: "action", props: { ...common.props, - folderId: propFolderId(" to receive the uploaded files"), + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder** to receive the uploaded file. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, name: { ...name, description: `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. diff --git a/components/pcloud/props-custom-descriptions.mjs b/components/pcloud/props-custom-descriptions.mjs deleted file mode 100644 index 6423fc5b40835..0000000000000 --- a/components/pcloud/props-custom-descriptions.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import pcloud from "./pcloud.app.mjs"; - -function propFolderId(description = "") { - return { - propDefinition: [ - pcloud, - "folderId", - ], - description: `Select a **Folder**${description}. - \\ - Alternatively, you can provide a custom *Folder ID*.`, - }; -} - -export { - propFolderId, -}; diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index 6363e46721232..f8d3a12d822e8 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -1,7 +1,6 @@ import pcloud from "../../pcloud.app.mjs"; import get from "lodash/get.js"; import { showDeleted } from "../../props.mjs"; -import { propFolderId } from "../../props-custom-descriptions.mjs"; export default { key: "pcloud-watch-folder", @@ -22,7 +21,15 @@ export default { intervalSeconds: 60 * 15, // by default, run every 15 minutes. }, }, - folderId: propFolderId(" to watch for changes"), + folderId: { + propDefinition: [ + pcloud, + "folderId", + ], + description: `Select a **Folder** to watch for changes. + \\ + Alternatively, you can provide a custom *Folder ID*.`, + }, event: { type: "string", label: "Folder Event", From 87b5952e7f8dab4ac2cd980b68bf752ac44c32a9 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Tue, 28 Jun 2022 23:32:18 -0300 Subject: [PATCH 19/21] [App:pCloud] Changing common props to propDefinitions --- .../pcloud/actions/copy-file/copy-file.mjs | 32 +++++++++---- .../actions/copy-folder/copy-folder.mjs | 9 +++- .../actions/create-folder/create-folder.mjs | 8 +++- .../actions/list-contents/list-contents.mjs | 9 +++- .../actions/upload-file/upload-file.mjs | 25 +++++++--- components/pcloud/pcloud.app.mjs | 44 +++++++++++++++++- components/pcloud/props.mjs | 46 ------------------- .../sources/watch-folder/watch-folder.mjs | 15 +++--- 8 files changed, 114 insertions(+), 74 deletions(-) delete mode 100644 components/pcloud/props.mjs diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index b513036faf355..e2c0b4bda0d9f 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,14 +1,12 @@ import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; -import { - name, overwrite, modifiedTime, createdTime, -} from "../../props.mjs"; export default { ...common, key: "pcloud-copy-file", name: "Copy File", - description: "Copy a file to the specified destination. [See the docs here](https://docs.pcloud.com/methods/file/copyfile.html)", + description: + "Copy a file to the specified destination. [See the docs here](https://docs.pcloud.com/methods/file/copyfile.html)", version: "0.0.1", type: "action", props: { @@ -33,13 +31,31 @@ export default { Alternatively, you can provide a custom *Folder ID*.`, }, name: { - ...name, + propDefinition: [ + pcloud, + "name", + ], label: "New File Name", description: "Name of the destination file.", }, - overwrite, - modifiedTime, - createdTime, + overwrite: { + propDefinition: [ + pcloud, + "overwrite", + ], + }, + modifiedTime: { + propDefinition: [ + pcloud, + "modifiedTime", + ], + }, + createdTime: { + propDefinition: [ + pcloud, + "createdTime", + ], + }, }, methods: { ...common.methods, diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index d288c81e6d8cd..2e5025159dee6 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,6 +1,5 @@ import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; -import { overwrite } from "../../props.mjs"; export default { ...common, @@ -30,7 +29,13 @@ export default { \\ Alternatively, you can provide a custom *Folder ID*.`, }, - overwrite, + + overwrite: { + propDefinition: [ + pcloud, + "overwrite", + ], + }, copyContentOnly: { type: "boolean", label: "Copy Content Only?", diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 1400f9f59ee10..95900720f66d2 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,6 +1,5 @@ import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; -import { name } from "../../props.mjs"; export default { ...common, @@ -22,7 +21,12 @@ export default { Alternatively, you can provide a custom *Folder ID*.`, label: "Parent Folder ID", }, - name, + name: { + propDefinition: [ + pcloud, + "name", + ], + }, }, methods: { ...common.methods, diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 9cb09a05ffe19..9c36735e19819 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,6 +1,5 @@ import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; -import { showDeleted } from "../../props.mjs"; export default { ...common, @@ -27,7 +26,13 @@ export default { "If true, returns contents of the folder **and all subfolders,** recursively.", default: false, }, - showDeleted, + + showDeleted: { + propDefinition: [ + pcloud, + "showDeleted", + ], + }, noFiles: { type: "boolean", label: "Folders Only?", diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index f29de92c94a39..e1c6895d1b2ba 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,15 +1,13 @@ import pcloud from "./pcloud.app.mjs"; import common from "../common/base.mjs"; -import { - name, modifiedTime, createdTime, -} from "../../props.mjs"; import { promises as fsPromises } from "fs"; export default { ...common, key: "pcloud-upload-file", name: "Upload File", - description: "Upload a file to the specified folder. [See the docs here](https://docs.pcloud.com/methods/file/uploadfile.html)", + description: + "Upload a file to the specified folder. [See the docs here](https://docs.pcloud.com/methods/file/uploadfile.html)", version: "0.0.1", type: "action", props: { @@ -24,7 +22,10 @@ export default { Alternatively, you can provide a custom *Folder ID*.`, }, name: { - ...name, + propDefinition: [ + pcloud, + "name", + ], description: `Name of the file to upload. This must be a file in the workflow's \`/tmp\` directory. \\ [See the docs on how to work with files in your workflow.](https://pipedream.com/docs/code/nodejs/working-with-files/)`, @@ -36,8 +37,18 @@ export default { "If true, the uploaded file will be renamed, if another file with the requested name already exists in the specified folder.", default: true, }, - modifiedTime, - createdTime, + modifiedTime: { + propDefinition: [ + pcloud, + "modifiedTime", + ], + }, + createdTime: { + propDefinition: [ + pcloud, + "createdTime", + ], + }, }, methods: { ...common.methods, diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 24ebcb96415bb..d2c67c10a9dca 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -21,6 +21,42 @@ export default { }, default: 0, }, + name: { + type: "string", + label: "Name", + description: "Name of the folder to be created.", + }, + overwrite: { + type: "boolean", + label: "Overwrite?", + description: `If true, and an entry with the same name already exists, it will be overwritten. + \\ + Otherwise, an error \`2004\` will be returned instead.`, + default: false, + optional: true, + }, + showDeleted: { + type: "boolean", + label: "Show Deleted?", + description: + "If true, deleted files and folders that can be undeleted will be displayed.", + default: false, + optional: true, + }, + modifiedTime: { + type: "integer", + label: "Modified Time", + description: "Must be Unix time (seconds).", + optional: true, + }, + createdTime: { + type: "integer", + label: "Created Time", + description: `Must be Unix time (seconds). + \\ + Requires \`Modified Time\` to be set.`, + optional: true, + }, }, methods: { async api() { @@ -288,7 +324,13 @@ export default { * It's required to provide `modifiedTime` to set `createdTime`. * @returns {checksums: array, fileids: array, metadata: array, result: integer} A `checksums` array, each element with the file checksums calculated with `md5` and `sha1` algorithms, the `id` of the created file under the one element `fileids` array, and an array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly uploaded file. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. */ - async uploadFile(folderid, name, renameIfExists, modifiedTime, createdTime) { + async uploadFile( + folderid, + name, + renameIfExists, + modifiedTime, + createdTime, + ) { const params = { folderid, }; diff --git a/components/pcloud/props.mjs b/components/pcloud/props.mjs deleted file mode 100644 index 690e8c42831b9..0000000000000 --- a/components/pcloud/props.mjs +++ /dev/null @@ -1,46 +0,0 @@ -const name = { - type: "string", - label: "Name", - description: "Name of the folder to be created.", -}; - -const overwrite = { - type: "boolean", - label: "Overwrite?", - description: `If true, and an entry with the same name already exists, it will be overwritten. - \\ - Otherwise, an error \`2004\` will be returned instead.`, - default: false, - optional: true, -}; - -const showDeleted = { - type: "boolean", - label: "Show Deleted?", - description: "If true, deleted files and folders that can be undeleted will be displayed.", - default: false, - optional: true, -}; - -const modifiedTime = { - type: "integer", - label: "Modified Time", - description: "Must be Unix time (seconds).", - optional: true, -}; -const createdTime = { - type: "integer", - label: "Created Time", - description: `Must be Unix time (seconds). - \\ - Requires \`Modified Time\` to be set.`, - optional: true, -}; - -export { - name, - overwrite, - showDeleted, - modifiedTime, - createdTime, -}; diff --git a/components/pcloud/sources/watch-folder/watch-folder.mjs b/components/pcloud/sources/watch-folder/watch-folder.mjs index f8d3a12d822e8..e8f7cd4b03e7b 100644 --- a/components/pcloud/sources/watch-folder/watch-folder.mjs +++ b/components/pcloud/sources/watch-folder/watch-folder.mjs @@ -1,6 +1,5 @@ import pcloud from "../../pcloud.app.mjs"; import get from "lodash/get.js"; -import { showDeleted } from "../../props.mjs"; export default { key: "pcloud-watch-folder", @@ -41,7 +40,12 @@ export default { "Specify when to emit an event related to a given folder. Note that pCloud preserves files' `created` and `modified` timestamps on upload. If manually uploading via pCloud's `uploadfile` API, these timestamps can be set by specifying the `mtime` and `ctime` parameters, respectively.", default: "Created", }, - showDeleted, + showDeleted: { + propDefinition: [ + pcloud, + "showDeleted", + ], + }, }, hooks: { async deploy() { @@ -68,15 +72,14 @@ export default { }, methods: { async getContents() { - return this.pcloud._withRetries( - () => this.pcloud.listContents( + return this.pcloud._withRetries(() => + this.pcloud.listContents( this.folderId, false, this.showDeleted, false, false, - ), - ); + )); }, emitpCloudEvent(pCloudEvent) { const metadata = this.getEventData(pCloudEvent); From 133b56781490faa326e790b877a986050c77c710 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Wed, 29 Jun 2022 15:29:33 -0300 Subject: [PATCH 20/21] [App:pCloud] Code review adjustments --- .../pcloud/actions/copy-file/copy-file.mjs | 2 +- .../actions/copy-folder/copy-folder.mjs | 3 +-- .../actions/create-folder/create-folder.mjs | 6 ++--- .../actions/download-files/download-files.mjs | 2 +- .../actions/list-contents/list-contents.mjs | 3 +-- .../actions/upload-file/upload-file.mjs | 2 +- components/pcloud/pcloud.app.mjs | 24 +++++++++---------- 7 files changed, 20 insertions(+), 22 deletions(-) diff --git a/components/pcloud/actions/copy-file/copy-file.mjs b/components/pcloud/actions/copy-file/copy-file.mjs index e2c0b4bda0d9f..c48cd29ce29e6 100644 --- a/components/pcloud/actions/copy-file/copy-file.mjs +++ b/components/pcloud/actions/copy-file/copy-file.mjs @@ -1,4 +1,4 @@ -import pcloud from "./pcloud.app.mjs"; +import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; export default { diff --git a/components/pcloud/actions/copy-folder/copy-folder.mjs b/components/pcloud/actions/copy-folder/copy-folder.mjs index 2e5025159dee6..12d64e8486825 100644 --- a/components/pcloud/actions/copy-folder/copy-folder.mjs +++ b/components/pcloud/actions/copy-folder/copy-folder.mjs @@ -1,4 +1,4 @@ -import pcloud from "./pcloud.app.mjs"; +import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; export default { @@ -29,7 +29,6 @@ export default { \\ Alternatively, you can provide a custom *Folder ID*.`, }, - overwrite: { propDefinition: [ pcloud, diff --git a/components/pcloud/actions/create-folder/create-folder.mjs b/components/pcloud/actions/create-folder/create-folder.mjs index 95900720f66d2..39c1d4ba64d76 100644 --- a/components/pcloud/actions/create-folder/create-folder.mjs +++ b/components/pcloud/actions/create-folder/create-folder.mjs @@ -1,4 +1,4 @@ -import pcloud from "./pcloud.app.mjs"; +import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; export default { @@ -17,8 +17,8 @@ export default { "folderId", ], description: `Select a **Folder** to create the new folder within. - \\ - Alternatively, you can provide a custom *Folder ID*.`, + \\ + Alternatively, you can provide a custom *Folder ID*.`, label: "Parent Folder ID", }, name: { diff --git a/components/pcloud/actions/download-files/download-files.mjs b/components/pcloud/actions/download-files/download-files.mjs index d793c9a5a5b95..f8a736c275b5b 100644 --- a/components/pcloud/actions/download-files/download-files.mjs +++ b/components/pcloud/actions/download-files/download-files.mjs @@ -1,4 +1,4 @@ -import pcloud from "./pcloud.app.mjs"; +import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; export default { diff --git a/components/pcloud/actions/list-contents/list-contents.mjs b/components/pcloud/actions/list-contents/list-contents.mjs index 9c36735e19819..324e3242ff9be 100644 --- a/components/pcloud/actions/list-contents/list-contents.mjs +++ b/components/pcloud/actions/list-contents/list-contents.mjs @@ -1,4 +1,4 @@ -import pcloud from "./pcloud.app.mjs"; +import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; export default { @@ -26,7 +26,6 @@ export default { "If true, returns contents of the folder **and all subfolders,** recursively.", default: false, }, - showDeleted: { propDefinition: [ pcloud, diff --git a/components/pcloud/actions/upload-file/upload-file.mjs b/components/pcloud/actions/upload-file/upload-file.mjs index e1c6895d1b2ba..d488e83533772 100644 --- a/components/pcloud/actions/upload-file/upload-file.mjs +++ b/components/pcloud/actions/upload-file/upload-file.mjs @@ -1,4 +1,4 @@ -import pcloud from "./pcloud.app.mjs"; +import pcloud from "../../pcloud.app.mjs"; import common from "../common/base.mjs"; import { promises as fsPromises } from "fs"; diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index d2c67c10a9dca..803a45b76a115 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -30,8 +30,8 @@ export default { type: "boolean", label: "Overwrite?", description: `If true, and an entry with the same name already exists, it will be overwritten. - \\ - Otherwise, an error \`2004\` will be returned instead.`, + \\ + Otherwise, an error \`2004\` will be returned instead.`, default: false, optional: true, }, @@ -53,8 +53,8 @@ export default { type: "integer", label: "Created Time", description: `Must be Unix time (seconds). - \\ - Requires \`Modified Time\` to be set.`, + \\ + Requires \`Modified Time\` to be set.`, optional: true, }, }, @@ -68,7 +68,7 @@ export default { 2: "eapi.pcloud.com", }; */ - return await pcloudSdk.createClient( + return pcloudSdk.createClient( this.$auth.oauth_access_token, "oauth", ); @@ -87,7 +87,7 @@ export default { }; return retry(async (bail) => { try { - return await apiCall(); + return apiCall(); } catch (err) { const statusCode = [ get(err, [ @@ -153,7 +153,7 @@ export default { if (createdTime) { params.ctime = createdTime; } - return await ( + return ( await this.api() ).api("copyfile", { params, @@ -179,7 +179,7 @@ export default { if (copyContentOnly) { params.copycontentonly = 1; } - return await ( + return ( await this.api() ).api("copyfolder", { params, @@ -192,7 +192,7 @@ export default { * @returns {metadata: array, result: integer } An array with the [metadata](https://docs.pcloud.com/structures/metadata.html) of the newly created folder. A `result` integer that indicates the results of the API operation, 0 means success, a non-zero result means an error occurred, when the result is non-zero an `error` message is included. */ async createFolder(name, folderId) { - return await (await this.api()).createfolder(name, folderId); + return (await this.api()).createfolder(name, folderId); }, /** * Downloads one or more files from links supplied in the url parameter. @@ -205,7 +205,7 @@ export default { * included. */ async downloadFiles(urls, folderId) { - return await (await this.api()).remoteupload(urls.join(" "), folderId); + return (await this.api()).remoteupload(urls.join(" "), folderId); }, /** * Gets the dynamically populated options for file related props. @@ -310,7 +310,7 @@ export default { if (noShares) { optionalParams.noshares = 1; } - return await (await this.api()).listfolder(folderId, optionalParams); + return (await this.api()).listfolder(folderId, optionalParams); }, /** * Uploads a file to the user's filesystem. @@ -349,7 +349,7 @@ export default { if (createdTime) { params.ctime = createdTime; } - return await ( + return ( await this.api() ).api("uploadfile", { method: "post", From 4c32d7f6a55697b5b66bc38a0be9693f6ff873e3 Mon Sep 17 00:00:00 2001 From: "guilherme.falcao" Date: Wed, 29 Jun 2022 15:54:00 -0300 Subject: [PATCH 21/21] [App:pCloud] Fixing await inside try/catch --- components/pcloud/pcloud.app.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pcloud/pcloud.app.mjs b/components/pcloud/pcloud.app.mjs index 803a45b76a115..621f8cd6a541e 100644 --- a/components/pcloud/pcloud.app.mjs +++ b/components/pcloud/pcloud.app.mjs @@ -87,7 +87,7 @@ export default { }; return retry(async (bail) => { try { - return apiCall(); + return await apiCall(); } catch (err) { const statusCode = [ get(err, [