Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: akamai/cli-edgeworkers
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: guillaume-fr/cli-edgeworkers
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 14, 2022

  1. Copy the full SHA
    1901ff3 View commit details
  2. auth token - loose hostname validation

    increment package version and remove is-valid-domain dependency
    guillaume-fr authored Mar 14, 2022
    Copy the full SHA
    7d75aaf View commit details
Showing with 3 additions and 5 deletions.
  1. +1 −2 package.json
  2. +2 −3 src/edgeworkers/ew-cli-main.ts
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "akamai-edgeworkers-cli",
"version": "1.4.1",
"version": "1.4.2",
"description": "A tool that makes it easier to manage Akamai EdgeWorkers code bundles and EdgeKV databases. Call the EdgeWorkers and EdgeKV API from the command line.",
"repository": "https://github.com/akamai/cli-edgeworkers",
"scripts": {
@@ -25,7 +25,6 @@
"edgegrid": "^3.0.8",
"from-seconds": "^1.0.2",
"inquirer": "6.2.0",
"is-valid-domain": "^0.0.19",
"jwt-decode": "^3.1.2",
"readline-sync": "^1.4.10",
"sha256-file": "^1.0.0",
5 changes: 2 additions & 3 deletions src/edgeworkers/ew-cli-main.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import * as httpEdge from '../cli-httpRequest'
import * as edgeWorkersClientSvc from './client-manager';
import * as pkginfo from '../../package.json';
var program = require('commander');
const isValidDomain = require('is-valid-domain')
const copywrite = '\nCopyright (c) 2019-2021 Akamai Technologies, Inc. Licensed under Apache 2 license.\nYour use of Akamai\'s products and services is subject to the terms and provisions outlined in Akamai\'s legal policies.\nVisit http://github.com/akamai/cli-edgeworkers for detailed documentation';

/* ========== EdgeWorkers CLI Program Commands ========== */
@@ -411,9 +410,9 @@ exclusive to the --acl option; only use one or the other.")
.action(async function (hostName, options) {
try {
// deprecation msg for people using older CLI. This will be removed eventually.
if (!isValidDomain(hostName)) {
if (hostName.match(/^[0-9a-fA-F]{64}$/)) {
cliUtils.logAndExit(1, 'ERROR: Creating auth token with secret is deprecated with version CLI 1.1.0. Please use your host name to create an authentication token.');
}
}

await cliHandler.createAuthToken(hostName, options);
} catch (e) {