{"_id":"@akamai-consulting/edgegrid-js-fetch","_rev":"5-dc93daffc0b2de6978a1bbc127860058","name":"@akamai-consulting/edgegrid-js-fetch","dist-tags":{"latest":"0.1.5","next":"0.1.5-rc.2"},"versions":{"0.0.1-rc.1":{"name":"@akamai-consulting/edgegrid-js-fetch","version":"0.0.1-rc.1","keywords":["akamai","open","api","edgegrid","fetch","wintertc","wintercg"],"license":"Apache-2.0","_id":"@akamai-consulting/edgegrid-js-fetch@0.0.1-rc.1","maintainers":[{"name":"joshjohnson","email":"josjohns@akamai.com"}],"homepage":"https://github.com/akamai-consulting/edgegrid-js-fetch#readme","bugs":{"url":"https://github.com/akamai-consulting/edgegrid-js-fetch/issues"},"dist":{"shasum":"79b20de5a8c2ea24c7ae956bf9cc93818f5b3c95","tarball":"https://registry.npmjs.org/@akamai-consulting/edgegrid-js-fetch/-/edgegrid-js-fetch-0.0.1-rc.1.tgz","fileCount":40,"integrity":"sha512-0aaZgZTL/wGu/waJl428m70u09cw75hk/M2uYTov4wXGYneG2ZxIXrvCQYMKVaXqwX+jgvl3KdTTkfoyj885dA==","signatures":[{"sig":"MEUCIQD3nu3DXtKurA2ZsUkG3J9zW03e4bKIf8Gr0rkrTLLOTQIgTg2UHhGCMRZ1qvCiTkkEfINfwfn9AXOaqJVUcUJmcMM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":136642},"main":"dist/cjs/index.js","types":"dist/types/index.d.js","module":"dist/esm/index.js","gitHead":"318ab6f5ec9d97f166debcbf90502e92b1512764","scripts":{"test":"jest --no-cache --runInBand","build":"npm run build:cjs && npm run build:esm && npm run build:types","test:cov":"jest --coverage --no-cache --runInBand","build:cjs":"node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json","build:esm":"node tools/cleanup esm && tsc -p config/tsconfig.esm.json","build:types":"node tools/cleanup types && tsc -p config/tsconfig.types.json"},"_npmUser":{"name":"joshjohnson","email":"josjohns@akamai.com"},"repository":{"url":"git+https://github.com/akamai-consulting/edgegrid-js-fetch.git","type":"git"},"_npmVersion":"11.3.0","description":"Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec","directories":{},"_nodeVersion":"24.0.2","_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.32.0","tsx":"^4.19.4","jest":"^29.7.0","nock":"^14.0.4","ts-jest":"^29.3.4","typescript":"^5.8.3","@types/jest":"^29.5.14","@types/node":"^22.15.18"},"_npmOperationalInternal":{"tmp":"tmp/edgegrid-js-fetch_0.0.1-rc.1_1747513327660_0.24260835608419384","host":"s3://npm-registry-packages-npm-production"}},"0.0.1-rc.2":{"name":"@akamai-consulting/edgegrid-js-fetch","version":"0.0.1-rc.2","keywords":["akamai","open","api","edgegrid","fetch","wintertc","wintercg"],"license":"Apache-2.0","_id":"@akamai-consulting/edgegrid-js-fetch@0.0.1-rc.2","maintainers":[{"name":"joshjohnson","email":"josjohns@akamai.com"}],"homepage":"https://github.com/akamai-consulting/edgegrid-js-fetch#readme","bugs":{"url":"https://github.com/akamai-consulting/edgegrid-js-fetch/issues"},"dist":{"shasum":"b701eab2712830c74d02016aa5d612e58e4ff903","tarball":"https://registry.npmjs.org/@akamai-consulting/edgegrid-js-fetch/-/edgegrid-js-fetch-0.0.1-rc.2.tgz","fileCount":40,"integrity":"sha512-Prim1LpbYHPRS/YJvdpqPM5+PsEaK+Qf6dVuVo8qrwDbp/wgAwu2PZC3tuMeSEW7r9SqBhRw6c4PV1fG3NCe7A==","signatures":[{"sig":"MEUCIEx9gbR4z3XeD8pGxoNtRcf2jl+E0xgeQaKxgd+cWc8JAiEA73ZWXNfByaVJwyVepLHeX0ozr20XhwsO7JID8SJCnXc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":136642},"main":"dist/cjs/index.js","types":"dist/types/index.d.js","module":"dist/esm/index.js","gitHead":"7d48e32b4a269c5ac3576316d4a7c037af8dcc5d","scripts":{"test":"jest --no-cache --runInBand","build":"npm run build:cjs && npm run build:esm && npm run build:types","test:cov":"jest --coverage --no-cache --runInBand","build:cjs":"node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json","build:esm":"node tools/cleanup esm && tsc -p config/tsconfig.esm.json","build:types":"node tools/cleanup types && tsc -p config/tsconfig.types.json"},"_npmUser":{"name":"joshjohnson","email":"josjohns@akamai.com"},"repository":{"url":"git+https://github.com/akamai-consulting/edgegrid-js-fetch.git","type":"git"},"_npmVersion":"11.3.0","description":"Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec","directories":{},"_nodeVersion":"24.0.2","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsd":"^0.32.0","tsx":"^4.19.4","jest":"^29.7.0","nock":"^14.0.4","ts-jest":"^29.3.4","typescript":"^5.8.3","@types/jest":"^29.5.14","@types/node":"^22.15.18"},"_npmOperationalInternal":{"tmp":"tmp/edgegrid-js-fetch_0.0.1-rc.2_1747680857137_0.18458569299698668","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@akamai-consulting/edgegrid-js-fetch","version":"0.0.1","keywords":["akamai","open","api","edgegrid","fetch","wintertc","wintercg"],"license":"Apache-2.0","_id":"@akamai-consulting/edgegrid-js-fetch@0.0.1","maintainers":[{"name":"joshjohnson","email":"josjohns@akamai.com"}],"homepage":"https://github.com/akamai-consulting/edgegrid-js-fetch#readme","bugs":{"url":"https://github.com/akamai-consulting/edgegrid-js-fetch/issues"},"dist":{"shasum":"c5e047e1c85d8d4c3b9b4ff867d3ed71da8bfd32","tarball":"https://registry.npmjs.org/@akamai-consulting/edgegrid-js-fetch/-/edgegrid-js-fetch-0.0.1.tgz","fileCount":40,"integrity":"sha512-ooRlgO9AycjSj2X30rHtoA0M/AlyFKcmEcJacwwGxH4eXp876X2ujx2M7b8tBN1QEObSeGZvwrfXRa4Zh3ctwA==","signatures":[{"sig":"MEQCHzAZFVBJCKNXGsyyeLGrAxou8YLaQ8zmAXkUwpZ8Pc0CIQCxc/tvyb7oz6Uiss8FKUqDmV5C0+U2LGpFsPWzayu9qA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":136637},"main":"dist/cjs/index.js","types":"dist/types/index.d.js","module":"dist/esm/index.js","gitHead":"f9e8dd44978035b1006ed77a742009ec539f06ae","scripts":{"test":"jest --no-cache --runInBand","build":"npm run build:cjs && npm run build:esm && npm run build:types","test:cov":"jest --coverage --no-cache --runInBand","build:cjs":"node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json","build:esm":"node tools/cleanup esm && tsc -p config/tsconfig.esm.json","build:types":"node tools/cleanup types && tsc -p config/tsconfig.types.json"},"_npmUser":{"name":"joshjohnson","email":"josjohns@akamai.com"},"repository":{"url":"git+https://github.com/akamai-consulting/edgegrid-js-fetch.git","type":"git"},"_npmVersion":"11.3.0","description":"Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec","directories":{},"_nodeVersion":"24.1.0","_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.32.0","tsx":"^4.19.4","jest":"^29.7.0","nock":"^14.0.4","ts-jest":"^29.3.4","typescript":"^5.8.3","@types/jest":"^29.5.14","@types/node":"^22.15.18"},"_npmOperationalInternal":{"tmp":"tmp/edgegrid-js-fetch_0.0.1_1748814652671_0.015449419007762977","host":"s3://npm-registry-packages-npm-production"}},"0.1.5-rc.2":{"name":"@akamai-consulting/edgegrid-js-fetch","version":"0.1.5-rc.2","keywords":["akamai","open","api","edgegrid","fetch","wintertc","wintercg"],"license":"Apache-2.0","_id":"@akamai-consulting/edgegrid-js-fetch@0.1.5-rc.2","maintainers":[{"name":"joshjohnson","email":"josjohns@akamai.com"}],"homepage":"https://github.com/akamai-consulting/edgegrid-js-fetch#readme","bugs":{"url":"https://github.com/akamai-consulting/edgegrid-js-fetch/issues"},"dist":{"shasum":"2bc5ef86926393aa123af13a0da1084e351b11f0","tarball":"https://registry.npmjs.org/@akamai-consulting/edgegrid-js-fetch/-/edgegrid-js-fetch-0.1.5-rc.2.tgz","fileCount":40,"integrity":"sha512-I4S8eeenO8EoyrUHuKAKf3/O/gbxjA1/iYfsSVsMwsBvopSCO9gK9sxMKS2oOQn1w6PV47ssqpTEHZnYTujaeQ==","signatures":[{"sig":"MEYCIQCvsE7zFeam6khEEqMPw0Vi1xkMZ5jYzpUz4pFHNN6JFQIhAO6Q5zFXTP3uNcT2cJ1OlF/o6fNUdjOrjaQ9TXxdoeI0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@akamai-consulting%2fedgegrid-js-fetch@0.1.5-rc.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":136626},"main":"dist/cjs/index.js","types":"dist/types/index.d.js","module":"dist/esm/index.js","gitHead":"4c837512df35f872e2d3d4c7dd32db7e95539863","scripts":{"test":"jest --no-cache --runInBand","build":"npm run build:cjs && npm run build:esm && npm run build:types","test:cov":"jest --coverage --no-cache --runInBand","build:cjs":"node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json","build:esm":"node tools/cleanup esm && tsc -p config/tsconfig.esm.json","build:types":"node tools/cleanup types && tsc -p config/tsconfig.types.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:71ad5c84-8bc5-4ee4-9e16-5fd9502298b3"}},"repository":{"url":"git+https://github.com/akamai-consulting/edgegrid-js-fetch.git","type":"git"},"_npmVersion":"11.6.0","description":"Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec","directories":{},"_nodeVersion":"24.8.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsd":"^0.32.0","tsx":"^4.19.4","jest":"^29.7.0","nock":"^14.0.4","ts-jest":"^29.3.4","typescript":"^5.8.3","@types/jest":"^29.5.14","@types/node":"^24.4.0"},"_npmOperationalInternal":{"tmp":"tmp/edgegrid-js-fetch_0.1.5-rc.2_1757959964196_0.6792165269325077","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@akamai-consulting/edgegrid-js-fetch","version":"0.1.5","description":"Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/types/index.d.js","scripts":{"build":"npm run build:cjs && npm run build:esm && npm run build:types","build:cjs":"node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json","build:esm":"node tools/cleanup esm && tsc -p config/tsconfig.esm.json","build:types":"node tools/cleanup types && tsc -p config/tsconfig.types.json","test":"jest --no-cache --runInBand","test:cov":"jest --coverage --no-cache --runInBand"},"repository":{"type":"git","url":"git+https://github.com/akamai-consulting/edgegrid-js-fetch.git"},"keywords":["akamai","open","api","edgegrid","fetch","wintertc","wintercg"],"license":"Apache-2.0","devDependencies":{"@types/jest":"^29.5.14","@types/node":"^24.4.0","jest":"^29.7.0","nock":"^14.0.4","ts-jest":"^29.3.4","tsd":"^0.32.0","tsx":"^4.19.4","typescript":"^5.8.3"},"_id":"@akamai-consulting/edgegrid-js-fetch@0.1.5","gitHead":"0171bd3ea4c3bf4110ddba70e06c4a633039b027","bugs":{"url":"https://github.com/akamai-consulting/edgegrid-js-fetch/issues"},"homepage":"https://github.com/akamai-consulting/edgegrid-js-fetch#readme","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-9MnOO/FldFVVQYHzn8/MIkb8FwqDxTa/4Q0Y4DXGHRpVJcV8jObBS5if1cKbhhlsddiHyVq6ivS8HqBDN64p0Q==","shasum":"9c57445b8af89d12c02afbbff04c5d66f732ba3f","tarball":"https://registry.npmjs.org/@akamai-consulting/edgegrid-js-fetch/-/edgegrid-js-fetch-0.1.5.tgz","fileCount":40,"unpackedSize":136621,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@akamai-consulting%2fedgegrid-js-fetch@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCFJ59hZz6DP+/RsYgM6rBL0N2IktNp9UBrTKjQINVTiwIgOTPRDWQkbOhxQPsCGOvYZhvfq3X74W2G7twIUo/90ao="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:71ad5c84-8bc5-4ee4-9e16-5fd9502298b3"}},"directories":{},"maintainers":[{"name":"joshjohnson","email":"josjohns@akamai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/edgegrid-js-fetch_0.1.5_1757960068340_0.11124813166201841"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-17T20:22:07.581Z","modified":"2025-09-15T18:14:28.885Z","0.0.1-rc.1":"2025-05-17T20:22:07.841Z","0.0.1-rc.2":"2025-05-19T18:54:17.379Z","0.0.1":"2025-06-01T21:50:52.866Z","0.1.5-rc.2":"2025-09-15T18:12:44.366Z","0.1.5":"2025-09-15T18:14:28.514Z"},"bugs":{"url":"https://github.com/akamai-consulting/edgegrid-js-fetch/issues"},"license":"Apache-2.0","homepage":"https://github.com/akamai-consulting/edgegrid-js-fetch#readme","keywords":["akamai","open","api","edgegrid","fetch","wintertc","wintercg"],"repository":{"type":"git","url":"git+https://github.com/akamai-consulting/edgegrid-js-fetch.git"},"description":"Signing and fetch library the Akamai OPEN EdgeGrid Authentication scheme in a JS environment that supports the fetch spec","maintainers":[{"name":"joshjohnson","email":"josjohns@akamai.com"}],"readme":"# EdgeGrid for Node.js\n\n![Build Status](https://github.com/akamai/AkamaiOPEN-edgegrid-node/actions/workflows/test.yml/badge.svg)\n\nThis library implements an Authentication handler for the Akamai EdgeGrid Authentication scheme in JavaScript for environments supporting the [WHATWG Fetch Standard](https://fetch.spec.whatwg.org/)\n\n## Install\n\n`npm install --save @akamai-consulting/edgegrid-js-fetch`\n\n## Authentication\n\nYou 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.\n\n1. [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).\n\n2. Place your credentials in an EdgeGrid file `~/.edgerc`, in the `[default]` section.\n\n    ```\n    [default]\n    client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=\n    host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net\n    access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij\n    client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj\n    ```\n\n3. Use your local `.edgerc` by creating a stream providing contents of your edgerc file.\n\n    ```javascript\n    import {EdgeGridCredentials, EdgeGrid}  from '@akamai-consulting/edgegrid-js-fetch';\n\n    const config = await EdgeGridCredentials.parseEdgercStream(\n      Readable.toWeb(fs.createReadStream(\n        path.join(os.homedir(), '.edgerc')\n      ))\n    );\n    ```\n\n    Alternatively, you can hard code your credentials by passing the credential values to the `EdgeGridCredentials()` constructor.\n\n    ```javascript\n    import {EdgeGridCredentials, EdgeGrid}  from '@akamai-consulting/edgegrid-js-fetch';\n\n    const clientSecret = \"C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=\",\n          host = \"akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net\";\n          accessToken = \"akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij\",\n          clientToken = \"akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj\",\n        \n\n    const config = new EdgeGridCredentials(client_secret, host, access_token, client_token);\n    ```\n\n## Use\n\nThe `EdgeGrid` class can be used to create a signed `Request` object\n\n```javascript\n// Create EdgeGrid object from config\nconst eg = new EdgeGrid(config);\n\n// Create Signed Request to get list of EdgeWorkers\nconst request = await eg.signRequest('/edgeworkers/v1/ids');\n\n// Make request using the standard `fetch`\nconst response = await fetch(request);\n```\n\nThe `EdgeGrid` class can also be used to directly perform a fetch, with the same options as the standard `fetch`\n\n```javascript\n// Create EdgeGrid object from config\nconst eg = new EdgeGrid(config);\n\n// Sign and fetch in a single step\nconst response = await eg.fetch('/edgeworkers/v1/ids');\n```\n\n\n## Reporting issues\n\nTo report an issue or make a suggestion, create a new [GitHub issue](https://github.com/akamai-consulting/edgegrid-js-fetch/issues).\n\n## License\n\nCopyright 2025 Akamai Technologies, Inc. All rights reserved.\n\nLicensed 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.\n\nUnless 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.","readmeFilename":"README.md"}