Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
},
Expand Down
2 changes: 1 addition & 1 deletion components/cloudflare_api_key/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
10 changes: 4 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading