diff --git a/components/cloudflare_api_key/actions/change-zone-development-mode/change-zone-development-mode.mjs b/components/cloudflare_api_key/actions/change-zone-development-mode/change-zone-development-mode.mjs index e3fed4671e28c..be56d44fc430b 100644 --- a/components/cloudflare_api_key/actions/change-zone-development-mode/change-zone-development-mode.mjs +++ b/components/cloudflare_api_key/actions/change-zone-development-mode/change-zone-development-mode.mjs @@ -1,37 +1,48 @@ import cloudflare from "../../cloudflare_api_key.app.mjs"; -import constants from "../../common/constants.mjs"; export default { key: "cloudflare_api_key-change-zone-development-mode", name: "Change Development Mode", - description: "Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's accelerated cache and slow down your site. [See the docs here](https://api.cloudflare.com/#zone-settings-change-development-mode-setting)", - version: "0.0.4", + description: "Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's accelerated cache and slow down your site. [See the documentation](https://developers.cloudflare.com/api/node/resources/zones/subresources/settings/methods/edit/)", + version: "0.0.5", type: "action", props: { cloudflare, - zoneIdentifier: { + zoneId: { propDefinition: [ cloudflare, "zoneIdentifier", ], }, - developmentMode: { + value: { type: "string", label: "Development Mode", - description: "Development mode value", - options: constants.DEVELOPMENT_MODE_OPTIONS, + description: "Turn development mode on or off for the zone", + options: [ + { + label: "On", + value: "on", + }, + { + label: "Off", + value: "off", + }, + ], + default: "off", }, }, async run({ $ }) { - const zoneId = this.zoneIdentifier; - const developmentMode = this.developmentMode; + const { + zoneId, + value, + } = this; const response = await this.cloudflare.editZoneSetting({ settingId: "development_mode", zone_id: zoneId, - value: developmentMode, + value, }); - $.export("$summary", `Turned ${developmentMode} development mode for #${zoneId}`); + $.export("$summary", "Successfully changed zone to development mode"); return response; }, diff --git a/components/cloudflare_api_key/actions/update-zone-security-level/update-zone-security-level.mjs b/components/cloudflare_api_key/actions/update-zone-security-level/update-zone-security-level.mjs index 04a2d6c96f0d1..b40c4994edb63 100644 --- a/components/cloudflare_api_key/actions/update-zone-security-level/update-zone-security-level.mjs +++ b/components/cloudflare_api_key/actions/update-zone-security-level/update-zone-security-level.mjs @@ -1,37 +1,64 @@ import cloudflare from "../../cloudflare_api_key.app.mjs"; -import constants from "../../common/constants.mjs"; export default { key: "cloudflare_api_key-update-zone-security-level", name: "Update Zone Security Level", - description: "Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. [See the docs here](https://api.cloudflare.com/#zone-settings-change-security-level-setting)", - version: "0.0.4", + description: "Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. [See the documentation](https://developers.cloudflare.com/api/node/resources/zones/subresources/settings/methods/edit/)", + version: "0.0.5", type: "action", props: { cloudflare, - zoneIdentifier: { + zoneId: { propDefinition: [ cloudflare, "zoneIdentifier", ], }, - securityLevel: { + value: { type: "string", label: "Security Level", - description: "Security level value", - options: constants.ZONE_SECURITY_LEVEL_OPTIONS, + description: "Choose the appropriate security profile for your website", + options: [ + { + label: "Off", + value: "off", + }, + { + label: "Essentially Off", + value: "essentially_off", + }, + { + label: "Low", + value: "low", + }, + { + label: "Medium", + value: "medium", + }, + { + label: "High", + value: "high", + }, + { + label: "Under Attack", + value: "under_attack", + }, + ], + default: "medium", }, }, async run({ $ }) { - const zoneId = this.zoneIdentifier; - const securityLevel = this.securityLevel; + const { + zoneId, + value, + } = this; const response = await this.cloudflare.editZoneSetting({ settingId: "security_level", zone_id: zoneId, - value: securityLevel, + value, }); - $.export("$summary", `Successfully updated zone #${zoneId} security level to '${securityLevel}'`); + $.export("$summary", "Successfully updated zone with security level"); return response; }, diff --git a/components/cloudflare_api_key/package.json b/components/cloudflare_api_key/package.json index 8b8d904dfa216..c9adccaf3574b 100644 --- a/components/cloudflare_api_key/package.json +++ b/components/cloudflare_api_key/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/cloudflare_api_key", - "version": "1.0.1", + "version": "1.0.2", "description": "Pipedream Cloudflare Components", "main": "cloudflare_api_key.app.mjs", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e27c4a5bf631d..7a6bab68c5a77 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29571,22 +29571,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} @@ -36517,8 +36517,6 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) - transitivePeerDependencies: - - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: