diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3e68c1..fffc9c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14, 16, 18, 20, 21] + node: [14, 16, 18, 20, 21, 22, 23] name: Test Node ${{ matrix.node }} steps: - uses: actions/checkout@v2 diff --git a/.npmignore b/.npmignore index 6968632..70bf981 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,3 @@ *.tgz .idea -.travis.yml coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8cb298d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "node" -before_script: -script: npm test \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 330cb15..93db033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,112 +1,135 @@ -# RELEASE NOTES +# Release notes + +## 3.5.2 (Dec 05, 2024) + +### Features/Enhancements + +* Updated various dependencies. ## 3.5.1 (Sep 10, 2024) -#### IMPROVEMENTS: +### Features/Enhancements -* Updated various dependencies +* Updated various dependencies. ## 3.5.0 (Jul 02, 2024) -#### IMPROVEMENTS: +### Features/Enhancements -* Updated various dependencies +* Updated various dependencies. -#### BUG FIXES: +### Bug fixes -* `max_body` is deprecated, ignored and replaced with constant value of 131072 bytes +* `max_body` is deprecated, ignored and replaced with a constant value of 131072 bytes. ## 3.4.5 (Apr 3, 2024) -#### BUG FIXES +### Bug fixes + * Fixed a bug where the `max_body` parameter was not utilized when generating the authentication header. -* Implemented support for the `max_body` parameter when the configuration is provided as function parameter. +* Implemented support for the `max_body` parameter when the configuration is provided as a function parameter. + +### Features/Enhancements -#### IMPROVEMENTS: -* Updated various dependencies +* Updated various dependencies. ## 3.4.4 (Nov 15, 2023) -#### IMPROVEMENTS: -* Update various dependencies +### Features/Enhancements + +* Updated various dependencies. ## 3.4.3 (Oct 23, 2023) -#### IMPROVEMENTS: -* Update various dependencies +### Features/Enhancements + +* Updated various dependencies. ## 3.4.2 (Sep 12, 2023) -#### BUG FIXES -* Don't set the default `''` (empty) body in the requests +### Bug fixes + +* Don't set the default `''` (empty) body in the requests. + +### Features/Enhancements -#### IMPROVEMENTS: -* Update various dependencies +* Updated various dependencies. ## 3.4.1 (May 09, 2023) -#### IMPROVEMENTS: -* Update various dependencies +### Features/Enhancements + +* Updated various dependencies. ## 3.4.0 (Jan 26, 2023) -#### IMPROVEMENTS: -* Reads 'max_body' (alias 'max-body') field from `.edgerc` config file with default value of `131072` ([PR#1](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/1)) -* Add default Accept header (related to [PR#43](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/43) - and [I#33](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/33)) -* Add README section explaining how to use proxy (related to [PR#35](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/35) - and [I#59](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/59)) -* Add README section explaining how to change request encoding (related to [PR#58](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/58)) -* Update various dependencies +### Features/Enhancements + +* Added reading of the `max_body` (alias `max-body`) field from `.edgerc` config file with a default value of `131072` ([PR#1](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/1)). +* Added a default Accept header (related to [PR#43](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/43) and [I#33](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/33)). +* Added the README section explaining how to use proxy (related to [PR#35](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/35) and [I#59](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/59)). +* Added the README section explaining how to change request encoding (related to [PR#58](https://github.com/akamai/AkamaiOPEN-edgegrid-node/pull/58)). +* Updated various dependencies. ## 3.3.0 (Nov 08, 2022) -#### IMPROVEMENTS: -* Update various dependencies +### Features/Enhancements -#### BUG FIXES -* Fix adding `User-Agent` header to the request +* Updated various dependencies. + +### Bug fixes + +* Fixed adding the `User-Agent` header to the request. ## 3.2.0 (Apr 26, 2022) -#### IMPROVEMENTS: -* Add Typescript declaration file ([#71](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/71)) +### Features/Enhancements + +* Added the Typescript declaration file ([#71](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/71)). ## 3.1.4 (Mar 24, 2022) -#### IMPROVEMENTS: -* Remove deprecated `moment` dependency +### Features/Enhancements -#### BUG FIXES -* Fix response when Content-Type is `application/gzip` ([#83](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/83)) +* Removed a deprecated `moment` dependency. + +### Bug fixes + +* Fixed the response when Content-Type is `application/gzip` ([#83](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/83)). ## 3.1.3 (Feb 22, 2022) -#### IMPROVEMENTS: -* Update various dependencies +### Features/Enhancements + +* Updated various dependencies. -#### BUG FIXES -* Bump axios to 0.26.0 to get rid of vulnerability in [follow-redirects](https://security.snyk.io/vuln/SNYK-JS-FOLLOWREDIRECTS-2396346) +### Bug fixes + +* Bumped axios to 0.26.0 to get rid of vulnerability in [follow-redirects](https://security.snyk.io/vuln/SNYK-JS-FOLLOWREDIRECTS-2396346). ## 3.1.2 (Nov 3, 2021) -#### NOTES: -* [IMPORTANT] Change npm package name from `edgegrid` to `akamai-edgegrid` -* Clean up README.md to include working examples and get rid of inconsistencies +### Notes + +* [IMPORTANT] Changed the npm package name from `edgegrid` to `akamai-edgegrid`. +* Cleaned up `README.md` to include working examples and got rid of inconsistencies. ## 3.1.1 (Sep 28, 2021) -#### BUG FIXES: -* Update version of axios to 0.21.4 to get rid of ReDoS vulnerability +### Bug fixes + +* Updated the version of axios to 0.21.4 to get rid of the ReDoS vulnerability. ## 3.1.0 (Sep 27, 2021) -#### BUG FIXES: -* Fix support of environment variables ([#27](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/27)) -* Fix error when Tarball exceeds maxbody size ([#33](https://github.com/akamai/cli-edgeworkers/issues/33)) +### Bug fixes + +* Fixed support of environment variables ([#27](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/27)). +* Fixed an error when Tarball exceeds a max-body size ([#33](https://github.com/akamai/cli-edgeworkers/issues/33)). + +### Features/Enhancements -#### FEATURES/ENHANCEMENTS -* Replace 'request' package with axios ([#64](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/64)) -* Fix code quality issues -* Update version of mocha -* Add resolving ~ sign in edgerc path +* Replaced the `request` package with axios ([#64](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues/64)). +* Fixed code quality issues. +* Updated the version of mocha. +* Added a resolving ~ sign in the edgerc path. diff --git a/LICENSE b/LICENSE index 37ec93a..1d9c527 100644 --- a/LICENSE +++ b/LICENSE @@ -176,10 +176,10 @@ recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2024 Akamai Technologies, Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 diff --git a/README.md b/README.md index 7fb340f..c79c8ba 100644 --- a/README.md +++ b/README.md @@ -2,48 +2,69 @@ ![Build Status](https://github.com/akamai/AkamaiOPEN-edgegrid-node/actions/workflows/test.yml/badge.svg) +This library implements an Authentication handler for the Akamai EdgeGrid Authentication scheme in Node.js for Node v14 and above. -This library implements an Authentication handler for the Akamai EdgeGrid Authentication scheme in Node.js. - -It’s Akamai’s current and officially supported version of AkamaiOPEN EdgeGrid for Node.js. You can find the most up-to-date package in [NPM](https://www.npmjs.com/package/akamai-edgegrid) under `akamai-edgegrid`. -> __IMPORTANT:__ Akamai will not maintain the `edgegrid` package in NPM going forward. - ## Install `npm install --save akamai-edgegrid` -## Example +## Authentication + +You can obtain the authentication credentials through an API client. Requests to the API are marked with a timestamp and a signature and are executed immediately. + +1. [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials). + +2. Place your credentials in an EdgeGrid file `~/.edgerc`, in the `[default]` section. -### Credentials + ``` + [default] + client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN= + host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net + access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij + client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj + ``` -Before you begin, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) in [Control Center](https://control.akamai.com). +3. Use your local `.edgerc` by providing the path to your resource file and credentials' section header. -### .edgerc authentication + ```javascript + var eg = new EdgeGrid({ + path: '/path/to/.edgerc', + section: '' + }); + ``` -The preferred method of using the library involves providing the path to an `.edgerc` file. This file contains the authentication credentials used to sign your requests. + Alternatively, you can hard code your credentials by passing the credential values to the `EdgeGrid()` method. -> __NOTE__: Requests to the API are signed with a timestamp and are executed immediately. + ```javascript + var clientToken = "akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj", + clientSecret = "C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=", + accessToken = "akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij", + baseUri = "akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net"; + + var eg = new EdgeGrid(clientToken, clientSecret, accessToken, baseUri); + ``` + +## Use + +To use the library, provide the path to your `.edgerc`, your credentials section header, and the appropriate endpoint information. ```javascript var EdgeGrid = require('akamai-edgegrid'); -var data = 'bodyData'; - -// Supply the path to your .edgerc file and name -// of the section with authorization to the client -// you are calling (default section is 'default') var eg = new EdgeGrid({ path: '/path/to/.edgerc', - section: 'section-name' + section: 'section-header' }); eg.auth({ - path: '/diagnostic-tools/v1/locations', + path: '/identity-management/v3/user-profile', method: 'GET', - headers: {}, - body: data + headers: { + 'Accept': "application/json" + }, + body: {} }); eg.send(function(error, response, body) { @@ -51,63 +72,48 @@ eg.send(function(error, response, body) { }); ``` -An `.edgerc` file contains sections for each of your API client credentials and is usually hosted in your home directory: - -```plaintext -[default] -host = akaa-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.luna.akamaiapis.net/ -client_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX -client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -access_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX -max-body = 131072 - -[section-name] -host = akaa-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.luna.akamaiapis.net/ -client_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX -client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -access_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX -max-body = 131072 -``` - -### Manual authentication - -You can also authenticate manually by hard coding your credential values and passing them to the EdgeGrid client: - -```javascript -var clientToken = "akab-client-token-xxx-xxxxxxxxxxxxxxxx", - clientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=", - accessToken = "akab-access-token-xxx-xxxxxxxxxxxxxxxx", - baseUri = "https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/"; - -var eg = new EdgeGrid(clientToken, clientSecret, accessToken, baseUri); -``` - ### Chaining -You can also chain calls using the `akamai-edgegrid` like in this example: +You can also chain calls by combining the execution of `auth` and `send` methods. ```javascript -... eg.auth({ - path: '/papi/v1/groups', + path: '/identity-management/v3/user-profile', method: 'GET', headers: {}, + body: {} }).send(function (error, response, body) { console.log(body); }); ``` -This is an example of an API call to [List groups in your property](https://developer.akamai.com/api/core_features/property_manager/v1.html#getgroups). Change the `path` element to reference an endpoint in any of the [Akamai APIs](https://developer.akamai.com/api). +### Query string parameters + +When entering query parameters use the `qs` property under the `auth` method. Set up the parameters as name-value pairs in a object. + +```javascript +eg.auth({ + path: '/identity-management/v3/user-profile', + method: 'GET', + headers: {}, + qs: { + authGrants: true, + notifications: true, + actions: true + }, + body: {} +}) +``` ### Headers -Enter request headers as name-value pairs in an object. +Enter request headers as name-value pairs in an object. -> **NOTE:** You don't need to include the `Content-Type` and `Content-Length` headers. The authentication layer adds these values. +> **Note:** You don't need to include the `Content-Type` and `Content-Length` headers. The authentication layer adds these values. ```javascript eg.auth({ - path: '/papi/v1/groups', + path: '/identity-management/v3/user-profile', method: 'GET', headers: { 'Accept': "application/json" @@ -117,43 +123,30 @@ eg.auth({ ### Body data -You can provide the request `body` as either an object or as a POST data form string. +Provide the request body as an object or as a POST data formatted string. ```javascript // Object eg.auth({ - path: '/papi/v1/cpcodes?contractId=ctr_1234&groupId=grp_1234', - method: 'POST', + path: '/identity-management/v3/user-profile/basic-info', + method: 'PUT', + headers: {}, body: { - cpcodeName: "test-cpcode", - productId: "prd_Site_Accel" - } + contactType: "Billing", + country: "USA", + firstName: "John", + lastName: "Smith", + phone: "3456788765", + preferredLanguage: "English", + sessionTimeOut: 30, + timeZone: "GMT" + } }); ``` - -### Query string parameters - -When entering query parameters use the `qs` property under the `auth` method. Set up the parameters as name-value pairs in a object. - -```javascript -eg.auth({ - path: '/papi/v1/cpcodes', - method: 'POST', - headers: {}, - qs: { - contractId: "ctr_1234", - groupId: "grp_1234", - }, - body: data -}) - -// Produces request URL similar to: -// https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/papi/v1/cpcodes?contractId=ctr_1234&groupId=grp_1234 -``` ### Encoding -When interacting with binary data, such as during retrieval of PDF invoices, `responseType` should be specified as `arraybuffer` during the `auth` method call. Omission of `responseType` will cause an unreadable or blank response. +When interacting with binary data, such as during the retrieval of PDF invoices, specify the `responseType` as an `arraybuffer` in the `auth` method call. Omitting the `responseType` will cause an unreadable or blank response. ```javascript const fs = require('fs'); @@ -176,95 +169,71 @@ eg.auth({ ``` ### Proxy -To use edgegrid with proxy, you can configure it with `proxy` field: -```javascript -eg.auth({ - path : `/papi/v1/cpcodes`, - method: 'GET', - proxy: { - host: 'my.proxy.com', - protocol: "https", - port: 3128, - auth: { - username: 'my-user', - password: 'my-password' +To use edgegrid with proxy, you can configure it with one of these methods: + +- Add the `proxy` argument to the `EdgeGrid()` method. + + ```javascript + eg.auth({ + path : `/identity-management/v3/user-profile`, + method: 'GET', + proxy: { + host: 'my.proxy.com', + protocol: "https", + port: 3128, + auth: { + username: 'my-user', + password: 'my-password' + } } - } -}).send((err, response) => { - if (err) { - return console.log(err); - } - console.log('Success!'); - // Do something with response -}); -``` + }).send((err, response) => { + if (err) { + return console.log(err); + } + console.log('Success!'); + // Do something with the response + }); + ``` -or use environment variable: +- Set the `HTTPS_PROXY` environment variable. -```shell -$ export https_proxy=https://username:password@host:port -$ node myapp.js -``` + ```shell + $ export HTTPS_PROXY=https://username:password@host:port + $ node myapp.js + ``` ### Debug -With EdgeGrid you can enable debugging either as part of the EdgeGrid instantiation object -or by setting the `EG_VERBOSE` environment variable. When enabled, EdgeGrid provides -additional information about the request that's helpful for debugging. +Enable debugging to get additional information about a request. You can configure this with one of these methods: -Here's an EdgeGrid example: +- Add the `debug` argument to the `EdgeGrid()` method. -```javascript -// Set debug via EdgeGrid property -var eg = new EdgeGrid({ - path: edgercPath, - section: sectionName, - debug: true -}); -``` + ```javascript + var eg = new EdgeGrid({ + path: '/path/to/.edgerc', + section: 'section-header' + debug: true + }); + ``` -And here's an example for a command-line argument: +- Set the `EG_VERBOSE` environment variable. + + ```shell + $ export EG_VERBOSE=true + $ node src/main.js + ``` -```bash -// Set debug via environment variable -$ export EG_VERBOSE=true -$ node src/main.js -Starting Request { - url: 'https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/papi/v1/groups', - method: 'get', - data: '', - headers: { - common: { Accept: 'application/json, text/plain, */*' }, - delete: {}, -... -Response: { - status: 200, - statusText: 'OK', - headers: { - server: 'nginx', - 'content-type': 'application/json;charset=UTF-8', -... -} -``` ## Reporting issues -To report a problem or make a suggestion, create a new [GitHub issue](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues). +To report an issue or make a suggestion, create a new [GitHub issue](https://github.com/akamai/AkamaiOPEN-edgegrid-node/issues). ## License -Copyright 2021 Akamai Technologies, Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +Copyright 2024 Akamai Technologies, Inc. All rights reserved. - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..8b978a4 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,35 @@ +# Examples + +This directory contains executable CRUD examples for Akamai API using the EdgeGrid Node library. API calls used in these examples are available to all users. But, if you find one of the write examples does not work for you, talk with your account's admin about your privilege level. + +## Run + +To run any of the files: + +1. Append the path to your `.edgerc`. The default is set to the home directory. +2. Provide the section heading for the set of credentials you'd like to use. The default is `default`. +3. For update and delete operations, replace the dummy `credentialId` with your valid `credentialId`. +4. Open a Terminal or shell instance and run the .js file. + + ```shell + $ node examples/.js + ``` + +## Sample files + +The example in each file contains a call to one of the Identity and Access Management (IAM) API endpoints. See the [IAM API reference](https://techdocs.akamai.com/iam-api/reference/api) doc for more information on each of the calls used. + +| Operation | Method | Endpoint | +|---|---|---| +| [`List your API client credentials.`](/examples/get-credentials.js)| `GET` | `/identity-management/v3/api-clients/self/credentials`| +| [`Create new API client credentials.`](/examples/create-credentials.js)
This is a *quick* client and grants you the default permissions associated with your account. | `POST` | `/identity-management/v3/api-clients/self/credentials` | +| [`Update your credentials by ID.`](/examples/update-credentials.js) | `PUT` | `/identity-management/v3/api-clients/self/credentials/{credentialId}`| +| [`Delete your credentials by ID.`](/examples/delete-credentials.js) | `DELETE` | `/identity-management/v3/api-clients/self/credentials/{credentialId}`| + +Suggested chained call order: + +1. Get credentials to see your base information. +2. Create client to create a new set of credentials. +3. Update credentials to inactivate the newly created set from step 2. +4. Delete client to delete the inactivated credentials. +5. Get credentials and verify the credentials are gone (status will be `DELETED`). \ No newline at end of file diff --git a/examples/create-credentials.js b/examples/create-credentials.js new file mode 100644 index 0000000..d6a7215 --- /dev/null +++ b/examples/create-credentials.js @@ -0,0 +1,34 @@ +// This example creates your new API client credentials. +// +// To run this example: +// +// 1. Specify the path to your `.edgerc` file and the section header of the set of credentials to use. +// +// The defaults here expect the `.edgerc` at your home directory and use the credentials under the heading of `default`. +// +// 2. Open a Terminal or shell instance and run "node examples/create-credentials.js". +// +// A successful call returns a new API client with its `credentialId`. Use this ID in both the update and delete examples. +// +// For more information on the call used in this example, see https://techdocs.akamai.com/iam-api/reference/post-self-credentials. + +var EdgeGrid = require('akamai-edgegrid'); + +var eg = new EdgeGrid({ + path: '~/.edgerc', + section: 'default', + debug: true +}); + +eg.auth({ + path: '/identity-management/v3/api-clients/self/credentials', + method: 'POST', + headers: { + 'Accept': "application/json" + }, + body: {} +}); + +eg.send(function(error, response, body) { + console.log(body, error); +}); \ No newline at end of file diff --git a/examples/delete-credentials.js b/examples/delete-credentials.js new file mode 100644 index 0000000..08e4bf5 --- /dev/null +++ b/examples/delete-credentials.js @@ -0,0 +1,38 @@ +// This example deletes your API client credentials. +// +// To run this example: +// +// 1. Specify the path to your `.edgerc` file and the section header of the set of credentials to use. +// +// The defaults here expect the `.edgerc` at your home directory and use the credentials under the heading of `default`. +// +// 2. Add the `credentialId` from the update example to the path. You can only delete inactive credentials. Sending the request on an active set will return a 400. Use the update credentials example for deactivation. +// +// **Important:** Don't use your actual credentials for this operation. Otherwise, you'll block your access to the Akamai APIs. +// +// 3. Open a Terminal or shell instance and run "node example/delete-credentials.js". +// +// A successful call returns an empty response body. +// +// For more information on the call used in this example, see https://techdocs.akamai.com/iam-api/reference/delete-self-credential. + + +var EdgeGrid = require('akamai-edgegrid'); + +var eg = new EdgeGrid({ + path: '~/.edgerc', + section: 'default' +}); + +eg.auth({ + path: '/identity-management/v3/api-clients/self/credentials/123456', + method: 'DELETE', + headers: { + 'Accept': "application/json" + }, + body: {} +}); + +eg.send(function(error, response, body) { + console.log(body, error); +}); \ No newline at end of file diff --git a/examples/get-credentials.js b/examples/get-credentials.js new file mode 100644 index 0000000..0069b5e --- /dev/null +++ b/examples/get-credentials.js @@ -0,0 +1,34 @@ +// This example returns a list of your API client credentials. +// +// To run this example: +// +// 1. Specify the path to your `.edgerc` file and the section header of the set of credentials to use. +// +// The defaults here expect the `.edgerc` at your home directory and use the credentials under the heading of `default`. +// +// 2. Open a Terminal or shell instance and run "node example/get-credentials.js". +// +// A successful call returns your credentials grouped by `credentialId`. +// +// For more information on the call used in this example, see https://techdocs.akamai.com/iam-api/reference/get-self-credentials. + + +var EdgeGrid = require('akamai-edgegrid'); + +var eg = new EdgeGrid({ + path: '~/.edgerc', + section: 'default' +}); + +eg.auth({ + path: '/identity-management/v3/api-clients/self/credentials', + method: 'GET', + headers: { + 'Accept': "application/json" + }, + body: {} +}); + +eg.send(function(error, response, body) { + console.log(body, error); +}); \ No newline at end of file diff --git a/examples/update-credentials.js b/examples/update-credentials.js new file mode 100644 index 0000000..18d0840 --- /dev/null +++ b/examples/update-credentials.js @@ -0,0 +1,43 @@ +// This example updates the credentials from the create credentials example. +// +// To run this example: +// +// 1. Specify the path to your `.edgerc` file and the section header of the set of credentials to use. +// +// The defaults here expect the `.edgerc` at your home directory and use the credentials under the heading of `default`. +// +// 2. Add the `credentialId` for the set of credentials created using the create example as a path parameter. +// +// 3. Edit the `expiresOn` date to today's date. Optionally, you can change the `description` value. +// +// 4. Open a Terminal or shell instance and run "node example/update-credentials.js". +// +// A successful call returns an object with modified credentials. +// +// For more information on the call used in this example, see https://techdocs.akamai.com/iam-api/reference/put-self-credential. + +var EdgeGrid = require('akamai-edgegrid'); + +var eg = new EdgeGrid({ + path: '~/.edgerc', + section: 'default', + debug: true +}); + +eg.auth({ + path: '/identity-management/v3/api-clients/self/credentials/123456', + method: 'PUT', + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json' + }, + body: { + description: 'Update this credential', + status: 'INACTIVE', + expiresOn: '2024-12-25T22:09:24.000Z' // the date cannot be more than two years out or it will return a 400 + } +}); + +eg.send(function(error, response, body) { + console.log(error, body); +}); \ No newline at end of file diff --git a/index.test-d.ts b/index.test-d.ts index 07a86fd..760f65a 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -3,16 +3,16 @@ import EdgeGrid = require('.') const eg = new EdgeGrid({ path: '/path/to/.edgerc', - section: 'section-name' + section: 'section-header' }); expectType(eg) var req = { - path: '/diagnostic-tools/v1/locations', + path: '/identity-management/v3/user-profile', method: 'GET', headers: {}, - body: 'bodyData' + body: {} } expectType(eg.auth(req)) diff --git a/package-lock.json b/package-lock.json index 2877bf3..6ec00ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "akamai-edgegrid", - "version": "3.5.1", + "version": "3.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "akamai-edgegrid", - "version": "3.5.1", + "version": "3.5.2", "license": "Apache-2.0", "dependencies": { "axios": "^1.1.2", @@ -14,7 +14,7 @@ "uuid": "^10.0.0" }, "devDependencies": { - "mocha": "^10.0.0", + "mocha": "^11.0.1", "mocha-junit-reporter": "^2.1.0", "nock": "^13.2.2", "nyc": "^17.0.0", @@ -428,6 +428,109 @@ "node": ">=6.9.0" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -548,6 +651,17 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@sinclair/typebox": { "version": "0.25.24", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", @@ -987,10 +1101,11 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1119,6 +1234,13 @@ "node": ">=8" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.4.796", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.796.tgz", @@ -1850,6 +1972,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jest-diff": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", @@ -2108,12 +2246,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -2183,6 +2322,16 @@ "node": ">=0.10.0" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -2199,10 +2348,11 @@ } }, "node_modules/mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", + "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", @@ -2211,7 +2361,7 @@ "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", - "glob": "^8.1.0", + "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", @@ -2230,7 +2380,7 @@ "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 14.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/mocha-junit-reporter": { @@ -2260,6 +2410,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -2303,20 +2454,55 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mocha/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2354,6 +2540,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2391,6 +2578,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -2653,6 +2853,13 @@ "node": ">=8" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -2704,6 +2911,30 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -3239,6 +3470,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -3251,6 +3498,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -3508,6 +3769,25 @@ "node": ">=8" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3960,6 +4240,71 @@ "to-fast-properties": "^2.0.0" } }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -4053,6 +4398,13 @@ "fastq": "^1.6.0" } }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "@sinclair/typebox": { "version": "0.25.24", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", @@ -4375,9 +4727,9 @@ "dev": true }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -4470,6 +4822,12 @@ "path-type": "^4.0.0" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "electron-to-chromium": { "version": "1.4.796", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.796.tgz", @@ -5001,6 +5359,16 @@ "istanbul-lib-report": "^3.0.0" } }, + "jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "jest-diff": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", @@ -5194,12 +5562,12 @@ "dev": true }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, @@ -5250,6 +5618,12 @@ } } }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + }, "mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -5257,9 +5631,9 @@ "dev": true }, "mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", + "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", "dev": true, "requires": { "ansi-colors": "^4.1.3", @@ -5269,7 +5643,7 @@ "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", - "glob": "^8.1.0", + "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", @@ -5326,17 +5700,39 @@ "path-exists": "^4.0.0" } }, + "foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + } + }, "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "dependencies": { + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "js-yaml": { @@ -5384,6 +5780,12 @@ "p-limit": "^3.0.2" } }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -5599,6 +6001,12 @@ "release-zalgo": "^1.0.0" } }, + "package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -5635,6 +6043,24 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + } + } + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -6022,6 +6448,17 @@ "strip-ansi": "^6.0.0" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -6031,6 +6468,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -6201,6 +6647,17 @@ "strip-ansi": "^6.0.0" } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index f7fb692..0c87d0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "akamai-edgegrid", - "version": "3.5.1", + "version": "3.5.2", "description": "Authentication handler for the Akamai OPEN EdgeGrid Authentication scheme in Node.js", "main": "index.js", "scripts": { @@ -17,12 +17,6 @@ "api", "edgegrid" ], - "author": "Jonathan Bennett", - "contributors": [ - "Darius Kazemi", - "Mike Ball", - "Kyle Tyacke" - ], "license": "Apache-2.0", "dependencies": { "axios": "^1.1.2", @@ -30,7 +24,7 @@ "uuid": "^10.0.0" }, "devDependencies": { - "mocha": "^10.0.0", + "mocha": "^11.0.1", "mocha-junit-reporter": "^2.1.0", "nock": "^13.2.2", "nyc": "^17.0.0", diff --git a/src/api.js b/src/api.js index 72f3905..7a4182c 100644 --- a/src/api.js +++ b/src/api.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const axios = require('axios'), auth = require('./auth'), edgerc = require('./edgerc'), diff --git a/src/auth.js b/src/auth.js index ef8ede8..e296f42 100644 --- a/src/auth.js +++ b/src/auth.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const uuid = require('uuid'), helpers = require('./helpers'), logger = require('./logger'), diff --git a/src/edgerc.js b/src/edgerc.js index 3c2b129..5e1a510 100644 --- a/src/edgerc.js +++ b/src/edgerc.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const fs = require('fs'), logger = require('./logger'), helpers = require('./helpers'); diff --git a/src/helpers.js b/src/helpers.js index 4e8fda4..92d7495 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const crypto = require('crypto'), logger = require('./logger'), path = require('path'), diff --git a/src/logger.js b/src/logger.js index 0a9673f..a510d92 100644 --- a/src/logger.js +++ b/src/logger.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const log4js = require('log4js'), logger = log4js.getLogger(); diff --git a/test/src/api_test.js b/test/src/api_test.js index f5873b7..a3e3d08 100644 --- a/test/src/api_test.js +++ b/test/src/api_test.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const assert = require('assert'), nock = require('nock'), path = require('path'), diff --git a/test/src/edgerc_test.js b/test/src/edgerc_test.js index bed318f..66f218f 100644 --- a/test/src/edgerc_test.js +++ b/test/src/edgerc_test.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const assert = require('assert'), path = require('path'), edgerc = require('../../src/edgerc'); diff --git a/test/src/helpers_test.js b/test/src/helpers_test.js index 03864c2..9455ed1 100644 --- a/test/src/helpers_test.js +++ b/test/src/helpers_test.js @@ -1,17 +1,3 @@ -// Copyright 2014 Akamai Technologies, Inc. All Rights Reserved -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - const assert = require('assert'), helpers = require('../../src/helpers'), os = require('os');