Skip to content

Commit

Permalink
fix: rename delete to del (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Jul 13, 2023
1 parent c4e490a commit c27ebb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/denylist-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:
type: string
operation:
required: true
description: Operation to be performed in the remote denylist. Default is add
description: Operation to be performed in the remote denylist ("add" or "del"). Default is add
options:
- add
- delete
- del
default: add

jobs:
Expand Down
2 changes: 1 addition & 1 deletion packages/denylist/scripts/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ prog
.action(denylistAddCmd)
.command('denylist update-remote <url>')
.option('--env', 'Wrangler environment to use.', env)
.option('--operation', 'Operation to be performed in the remote denylist for items in list ("add" or "delete")', 'add')
.option('--operation', 'Operation to be performed in the remote denylist for items in list ("add" or "del")', 'add')
.describe(
'Add the content of a given file to the remote deny list.'
)
Expand Down
4 changes: 2 additions & 2 deletions packages/denylist/scripts/denylist.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function denylistSyncCmd ({ env }) {
}

export async function denylistUpdateRemoteCmd (url, { env, reason, operation }) {
if (operation !== 'add' && operation !== 'delete') {
if (operation !== 'add' && operation !== 'del') {
throw new Error(`operation must be one of {add, delete}. Received: ${operation}`)
}
const {
Expand All @@ -74,7 +74,7 @@ export async function denylistUpdateRemoteCmd (url, { env, reason, operation })
}))
console.log(`update ${bulk.length} remote denylist: ${operation}`)
await writeKVMulti(cfApiToken, cfAccountId, denyListKv.id, bulk, {
delete: operation === 'delete'
delete: operation === 'del'
})
console.log('✅ Done')
}
Expand Down

0 comments on commit c27ebb0

Please sign in to comment.